Repository navigation
fix(studio): an unsealed recording on an empty timeline records up to the composition's end - #8606
Merged
Merged
Conversation
… the composition's end
terencecho
approved these changes
Nov 23, 2026
terencecho
left a comment
Contributor
There was a problem hiding this comment.
The unsealed recorder now uses the same composition and layer bounds as sealed, so an empty GSAP timeline can record over time. All 32 focused tests passed. With the previous implementation restored locally, both named regression tests failed as expected. The last unsealed sample was at 0 s instead of 0.5 s.
— tai (automated review)
miguel-heygen
enabled auto-merge
November 23, 2026 16:46
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 72 of thoseThe gate passes. Quarantined, measured but not gated (0) |
Merged
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
In the open (unsealed) preview, recording a gesture on a composition whose own GSAP timeline is empty now records over time and saves its keyframes. Before, the playhead never left 0:00 while recording and nothing was saved. The sealed preview already did this. This changes what unsealed saves on such compositions: a recording there now writes keyframes where it wrote none.
Why
A composition can hold its layers with
gsap.setoutside its timeline, so the timeline itself has no length. The unsealed recorder capped the recording's time at that timeline's length (maxSeekTimefromtl.duration()inconnectGsapRuntime), which is 0, so every sample landed at 0 s and the commit had nothing to save. The sealed recorder caps at the layer's end within the composition's duration, from the player store, and records fine.Related work
Found while live-checking #8568 on 0.9.86 (the edit bench's
holdcase: sealed saved, unsealed didn't).How
useGestureRecording.tscomputes the recording's end once,Math.min(elementEnd, the composition's duration), and both modes use it: the unsealed runtime's seek cap and the sealed playhead. The unsealed runtime no longer reads its timeline's own length.Before
Unsealed, published 0.9.86, the bench's
holdcase, after recording a move: the playhead is still at 0:00, and nothing was saved.After
Same recording on this branch: the playhead reached 0:03, and the saved keyframes start at the layer's GSAP offset, as sealed's do.
Test plan
fails without the fix:
packages/studio/src/hooks/useGestureRecording.sealed.test.tsx: "records over time unsealed, up to the layer's end within the film", "records the same samples sealed and unsealed".With the fix, that file,
useGestureRecording.test.tsxanduseGestureCommit.test.tsxpass three runs in a row on Linux (32 tests). Studio'ssrc/hooks(184 files, 1,973 tests) passes, and Studio typechecks clean.In Studio built at this branch on Linux, headless, on the bench's
holdcase (GSAP holds the layer at x 40, y 20; the timeline is otherwise empty): unsealed now saves keyframes starting"0%": { x: 40, y: 20 }, and sealed (frame originnull) saves keyframes starting the same way. On published 0.9.86, unsealed saved nothing there.