Repository navigation
fix(studio): the preview reloads when any write a commit saved is not patched on screen - #4920
Merged
Merged
Conversation
miguel-heygen
force-pushed
the
fix/studio-resize-size-preview
branch
2 times, most recently
from
October 3, 2026 08:38
c53d689 to
74364d0
Compare
miguel-heygen
marked this pull request as ready for review
October 3, 2026 18:47
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
…ce patch A corner resize saves size and position in one batch; only the position had an in-place patch, so the preview patched it and skipped the reload, and the new size snapped back until reload.
… at the group's end A group drag defers each member's preview sync and carries a missed patch to the final render. A write with no patch at all never set that latch, so a last member that patched in place skipped the reload and the earlier member kept its old position on screen.
miguel-heygen
force-pushed
the
fix/studio-resize-size-preview
branch
from
October 3, 2026 20:29
986aab4 to
16f74dc
Compare
Contributor
Edit accuracy: accurate 1301 (base branch 1301), smooth 1138 of thoseThe gate passes. Quarantined, measured but not gated (0) |
miguel-heygen
added a commit
that referenced
this pull request
Oct 3, 2026
miguel-heygen
added a commit
that referenced
this pull request
Oct 3, 2026
… the start (#4935) * fix(parsers): a keyframe edit no longer overrides an earlier tween at the start Writing a keyframe into a tween that starts later added a t=0 hold for every position prop of its first keyframe, so a from() that already moves x before it lost its start value. The hold now skips props an earlier tween on the same target writes; both writers share one helper. * fix(parsers): keep the hold for label-placed tweens and re-sync one-line scripts stably The recast parser leaves a label start unresolved; an unknown start no longer counts as earlier, so the hold stays. The acorn insert now ends the hold on its own line when the next statement shares the timeline line, matching what removal takes, so a second sync changes no bytes. * fix(parsers): the recast hold sync reads tween starts from the acorn parse The recast parser cannot resolve label positions, so an earlier label-placed tween looked unordered and kept a hold it should not. Both writers now decide holds on the same parse. * revert(parsers): keep the recast hold sync on its own parse Deciding recast holds on the acorn parse lost selectors only recast resolves (an element bound through a helper). Recast is the migration fallback and keeps its old hold for a start it cannot resolve; the earlier-label case is decided by the default acorn writer, which resolves labels. * style(parsers): name the hold insert's line ending instead of commenting it * style(parsers): fit the hold helper's doc in four lines * test(studio): bank the from/to edits this fix makes accurate and the resizes #4920 fixed
This branch was successfully deployed
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.
What
Two preview-sync fixes in the one place every GSAP commit's preview update goes through (
applyPreviewSyncand its batch caller inuseGsapScriptCommits.ts). Both are about a write that is saved but not yet on screen.Edit bench
resize-size-px-r0-root-z100-mid, 6 runs each on one devbox: main drop 120.36 px in 6/6; #4889 alone drop 120.36 in 6/6; #4889 with this PR drop 0 in 6/6 (reload the same). A rare run passes without the fix, which is the batch race: the size and position writes only miss the reload when they land in one batch. The case's remaining undo failure is the separate undo-restore cause.Full grid, one devbox: #4889 (acc76b9) with #4935 and this PR against #4889 alone. 261 of 1,562 cases are inaccurate with the stack, and every one of them is also inaccurate on #4889 alone, so the stack turns no passing case red.
Before
After a corner resize at 1 s the Size field reads 370, 247 but the preview box has snapped back to the old size.
After
The preview box shows the new size right after the drop.
Test plan
useGsapScriptCommits.test.tsx: a batch of [size write without a patch, position write with one] soft-reloads once and never fully reloads (fails without fix 1: 0 soft reloads); a deferred write with no patch sets the latch and the final render soft-reloads (fails without fix 2). 35/35 in the file, the new cases 3 runs in a row.Rebased onto main after #4889 merged; the commits are unchanged.
Kept as its own PR under the size floor: it is the resize root fix, reviewed and bench-checked on its own, and folding it into #4935 (parsers) would mix two packages and reset both reviews.