mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 17:27:09 +00:00
`paintVfx` fired `capturePreviewThenPaint` and forgot it, so nothing the CLI awaits waited for a `self` chain's paint. Every snapshot-family command (`snapshot`, `check`, `compare`, `validate`, `layout`) seeks through `seekCompositionTimeline`, which drains `window.__hfWaitForSeekCompletion` and then allows one settle race before screenshotting — and only the `"hf-seek"` event's `waitUntil()` could put anything in that barrier. The screenshot therefore landed on however many hosts happened to have finished, which varied with host count and machine speed. Extracts the "track, untrack on settle, retain the first rejection" block `dispatch()` built inline into an exported `registerSeekCompletion`, and has `paintVfx` register the preview capture through it. Also awaits the per-host paints with `Promise.all` instead of sequentially: N hosts cost about two animation frames now, not 2N. Measured on the pre-fix bundle with two `self` hosts, both output canvases read `[0,0,0,0]` at the moment the barrier returned; they painted only because the settle race that follows happened to be long enough. Both tests added here fail on that bundle. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>