writeHistoryFile arms the 2 s self-write suppress window, so the
file-change event for an undo/redo write is swallowed and the SDK
in-memory doc stays on pre-undo content. Expose forceReload() from
useSdkSession (s7.4) and call it in useAppHotkeys after a successful
undo/redo that touched the active composition path.
Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
* feat(sdk,studio): stage 7 step 3a — persistPath + SDK session reload-on-change
Stage 7 Step 3a — SDK plumbing for routing Studio commits through the SDK
session. No behavior change: the session stays idle (no op routed yet).
SDK:
- Add OpenCompositionOptions.persistPath; thread to createPersistQueue so the
persist queue writes back to the composition's real path instead of the
"composition.html" default (blocker A).
Studio (useSdkSession):
- Pass persistPath = activeCompPath so a future dispatch persists the right file.
- Re-open the session when the active composition file changes on disk (HMR
hf:file-change / SSE file-change), scoped to activeCompPath, so the in-memory
linkedom document never goes stale under code-editor/agent/server edits
(blocker C). Re-opening is additive while the session is idle; 3c must add
self-write suppression once dispatch writes.
Tests: SDK persistPath default + override; shouldReloadSdkSession path-match.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(sdk): document persistPath as immutable for session lifetime
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>