Conversation
cooleryu
marked this pull request as ready for review
October 4, 2026 13:55
This branch has not been 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
Keep initial WAAPI frames on composition time, rather than on how long the page took to load. Feedback on the initialization contract and compatibility decision below is especially welcome.
Why
The first baseline currently retains a running animation's
currentTime. If the animation starts before the runtime and more scripts load afterward, that elapsed wall-clock time becomes a permanent seek offset. Repeated exports can therefore put the same object at different positions in the same frame.I reproduced this through the producer's HTML compilation, capture, MP4 encoding, and decoded-frame path, not just the adapter. A 4-second, 100 px translation with an initial left edge of 40 px should land at 90 px at 2 seconds:
The scripts are tiny local files, with no artificial sleep. Paused-offset controls retain their authored position. These are macOS/Chrome measurements, not a cross-platform performance claim.
Related work
Refs #4559. Proposed contract and reproduction: #4559 (comment)
How
At initial discovery only, anchor running or already-finished JavaScript animations on
document.timelineat normal playback rate to composition zero. Including finished animations lets short, filled effects rewind after a slow load. Keep existing baselines for paused animations, CSS animations/transitions, other timelines, non-default playback rates, late creation, and rediscovery.Compatibility decision for review: a pre-runtime
currentTimeassignment left running is indistinguishable from elapsed loading time. This proposal does not retain it as a baseline offset. The authoring guide now documents positive/negativedelay, orpause()followed bycurrentTime, as explicit offset mechanisms. There is a browser test for this behavior; it is not an accidental side effect. No new API or timing heuristic is introduced.Test plan
test:hyperframe-runtime-cipasses, including 1,849 runtime tests, type checking, contract/behavior/seek/duration/parity/security checks, coverage gates, and linter.bun run --cwd packages/core test:hyperframe-runtime-ci cd packages/producer bunx vitest run src/services/coreRuntimeBrowser.test.tsThe browser suite needs Chrome; locally I used
PUPPETEER_EXECUTABLE_PATHfor the installed browser. I have not validated Linux BeginFrame/GPU capture, distributed workers, or the Studio UI. This is not a general fix for non-default playback rates or custom timelines.