fix(studio): resolve cross-cutting SDK-cutover review findings#1471
Open
vanceingalls wants to merge 1 commit into
Conversation
Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
This was referenced Jun 15, 2026
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Addresses the cross-cutting findings from the §3.0–§3.5 SDK-cutover stack review. The isolated keyframe-merge fix (#11 core) was folded into #1470 where it belongs; everything here is the shared/architectural set that can't be split without breaking intermediate builds.
Root causes fixed
useSdkSession); Studio'swriteProjectFileis the sole writer. Kills double-write, duplicate-on-write-throw, and the undo flush race.forceReloadSdkSession()after every server-authoritative write (timeline delete/asset-drop/move-fallback, GSAPcommitMutation, DOM server path, element delete) so a later SDK edit can't serialize the pre-write doc and revert it. Replaces the deadonDomEditPersistedhook.sdkCutoverpersist fns compareserialize()before/after; an unchanged dispatch (stale id, unsupported op) returnsfalse→ server fallback, no phantom undo entry. Subsumes the inconsistentgetElementguards.batch()everywhere. All GSAP/timing/delete dispatches wrapped for atomic rollback on mid-op throw.wrongCompositionFilecheck refuses edits whosetargetPath≠ the session's composition.@font-facepreserved. Skip the SDK path whenprepareContentis set (custom-font injection).skipRefresh/ soft-reload honored.CutoverOptions.skipRefresh+ arefreshhook that soft-reloads (preserves playhead via newextractGsapScriptText) and invalidates the panel cache — matching the server path.sdkDeps. One memoized deps object shared by the 3 GSAP hooks (fixes the per-render debounce-flush regression; also collapses 3 duplicate interfaces).addGsapAnimationskips the SDK path when an id was just server-assigned.Known limitation (documented)
Server-fallback element delete does not GSAP-cascade like the SDK path (ponytail note + upgrade path in
useElementLifecycleOps); the fallback only fires for elements absent from the SDK doc.Verification
bun run buildclean;sdkCutover40/0,gsapWriter.acorn22/0 (+ new sibling-preservation regression test); zero new failures vs baseline in the studio suite.🤖 Generated with Claude Code