Repository navigation
fix(core): same-time sets at 0 land in authored order on the first frame - #6851
Conversation
Edit accuracy: accurate 271 (base branch 271), smooth 112 of thoseThe gate passes. Quarantined, measured but not gated (0) |
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head caf9b4ce
Scope
Read gsap.ts and how init.ts drives it with structure undefined during render capture. The owner comes from getChildren(false, …)[0].parent, which is the real timeline even behind the bound wrapper. version: "" takes the uncached placeLandingMarks, so the per-revision cache can't go stale, and that path only runs for t < REDRAW_STEP. Capture and the adapter now reapply steps at 0 the same way preview already did. Red/green confirmed locally: all three shows the first step's frame when seeking to 0 from %s s cases fail with main's gsap.ts and pass at head, and the file passes 77/77. Every required check is green. The one red job, the optional Catalog payloads, failed with "Could not download the pinned catalog embedding model" (network, unrelated); I re-ran it.
fails without the fix:
shows the first step's frame when seeking to 0 from %s s(three cases) inpackages/core/src/runtime/adapters/gsap.steps.test.tsWhat
A film built from repeated same-time sets (
tl.set(all, hidden, t)thentl.set(one, visible, t)at every step) showed nothing on its first frame: at time 0 both sets are applied, but in reverse order, so the "hide all" set lands last. Every later step was right. The timeline re-render near 0 renders just above 0 and then steps back to 0, and the step back replays the sets at 0 in reverse; the code that puts them back in authored order only ran when a structure key was passed, which a render capture deliberately does not pass. It now derives the owner from the timeline's own children and always reapplies the steps at the landing time.What I measured
End to end on a Linux box, 12 sprites, each step
set(all, opacity 0)thenset(one, opacity 1)every 0.1 s, frame at 0 shows s0 when correct:caf9b4ce)snapshot --at 0renderframe at 0 srenderframe at 0.4 sSteps after 0 (0.1 to 1.0 s) were already correct before.
The three new cases are red with
gsap.tsat main, green with the change.packages/coreruntime suite: 109 files, 2658 tests pass.oxfmt --checkandoxlintclean.What I did NOT execute
Size
Lone fix nothing can carry: a few lines in the GSAP seek adapter and one parameterized test; it cannot be folded into another PR.