Repository navigation
fix: keep frame animations of later Presents off HyperFrames' adapters - #373
Merged
Merged
Conversation
Since 089c39a the frame animation runtime kept each CSS animation live and paused, and set its currentTime to Present-relative time on hf-seek. HyperFrames' own css and waapi adapters also seek every live document animation, to absolute composition time, and the last writer wins. A Present that starts after frame 0 therefore rendered the pose at absolute time: a media-track Item with a fade disappeared for most of its window. Read the authored keyframes and timing once, then cancel the CSS animation and set animation-name to none, as 0.2.13 did, so the engine never discovers it. On each seek, evaluate the active poses with transient Animations built from the constructor, which the waapi adapter does not patch, read the computed values, cancel them and write the pose inline. This still avoids tabulating every Present frame. Fixes hypit-ai#372 Co-Authored-By: Claude Opus 5.5 <[email protected]>
SanHsien
added a commit
to SanHsien/hypit
that referenced
this pull request
Sep 30, 2026
Triage 19 commits, 20 PRs (hypit-ai#339-hypit-ai#373) and 17 issues (hypit-ai#338-hypit-ai#374) past the v0.2.12 baseline. Four isolated, tested fixes were cherry-picked with -x (hypit-ai#347, hypit-ai#345, hypit-ai#339, hypit-ai#361); the rest are recorded as adoption pending, follow-upstream, monitor or not-applicable in docs/fork/DECISIONS.md. Baseline now v0.2.16 (557497b), PR through 373, issue through 374. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 8, 2026
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.
Fixes #372.
Problem
Since 089c39a,
frameAnimationRuntimekeeps each element's CSS animation live and paused, and sets itscurrentTimeto Present-relative time onhf-seek. The HyperFrames runtime's owncssandwaapiadapters also seek every live document animation on each seek, to absolute composition time, and the last writer wins. When a Present starts after frame 0, the captured frame therefore shows the pose at absolute time. For example, a@hypit/media-trackItem withenter: fadedisappears for most of its window. The issue has a reduced Source and measurements.Change
cancel()it and setanimation-name: none, as 0.2.13 did. HyperFrames then has no live animation to discover or seek.Animations from the constructor, which the engine'swaapiadapter does not patch.This keeps 0.2.15's intent of not tabulating every Present frame in every Worker. The cost is now one style evaluation per seek for the animations active at that frame. The frame-work index, selection filtering and absolute-frame derivation are unchanged.
Tests
HyperFrames emits compact absolute-frame animation…now uses a fake DOM that also plays the engine adapters after every seek, moving each still-live animation to absolute time. It asserts:.animate(.pnpm checkpasses.pnpm test: 1124 tests, 1101 pass, 0 fail, 23 skipped (environment-gated suites).Render verification
I rendered the reduced Source from #372 on a local HyperFrames Runtime (managed Chrome Headless Shell 152, macOS arm64). Values are the mean luma of the middle Item B, which starts at 30f and fades:
The Item that starts at frame 0 and the Item without motion are unchanged in all three.
🤖 Generated with Claude Code