Conversation
|
@Dante-dan thanks, the approach looks right: re-running the existing prepare → paint → resolve protocol after injection, with no sleeps, fits how the engine does it. Two things before this merges:
Also a question: is the 1×1 JPEG screenshot what makes the updated subtree's paint records available? A short comment saying why it is needed would help the next reader. |
|
Added the requested regression coverage: it exercises prepare → paint → resolve only when I retried the original moving-bar fixture with |
|
@Dante-dan thanks for the test and the comment. I ran the pixel check on my side, since Chrome won't launch for you. Each side was a real install and build, running its own built CLI: base = this PR's merge-base
The fix works: base froze every time, head was correct every time, and the plain-div control never froze on either side. Caveat: the machine was never idle (load 55–115 from other sessions), so every run was under load. I didn't test an idle machine. From reading the diff, nothing blocks this. One nit, not a blocker: |
What
Recapture page-side VFX composites after decoded video frames have been injected into a snapshot.
Why
A snapshot seeks and waits for the VFX preview capture before injecting decoded FFmpeg frames. The injected overlay updates the DOM, but the VFX output canvas still holds its earlier capture of the native video. Under load that capture can contain frame zero.
Related work
Fixes #4762. The engine already runs a post-injection page-composite protocol; this brings snapshot capture into line with it.
How
After injecting frames and syncing visibility, run the existing prepare → paint → resolve protocol. A one-pixel screenshot makes the updated subtree's paint records available before VFX captures them. Pages without a page compositor skip the extra screenshot. This adds no sleep or native-video decode heuristic.
Test plan
bun run lintpassed.bun run format:checkpassed.Existing snapshot and captureCompositionFrame suites: 72 tests passed.
bun run --filter @hyperframes/cli typecheckpassed.Repository pre-commit checks passed: core/studio/scripts typecheck, lint/format, tracked artifacts, and fallow audit (no newly introduced findings).
The initial whole-workspace typecheck failed on missing dependencies in the reused checkout (
acorn,sharp,@puppeteer/browsers,dockview-react,@base-ui/react). Dependencies were then refreshed; the CLI typecheck above is the subsequent scoped check.The issue's exact synthetic-bar reproduction was attempted, but local Chrome failed to launch (Code: null, empty stderr), so this does not claim a local under-load pixel reproduction.
Unit tests added/updated
Manual testing performed
Documentation updated (if applicable)
Comments follow CONTRIBUTING.md "Comments"