Repository navigation
fix(cli): preserve video frames when scenes reuse element IDs - #6095
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed exact cde06fd3f58d7eab5f3ed12912fec208687c58da.
Need · Size · Reuse · Simpler: Applying the canonical media allocator after inlining addresses scene-local ID collisions without renaming authored IDs. Capture installs and consumes the existing identity bridge instead of adding another naming scheme.
Audited: allocation/reservation and duplicate repair, bundler placement, scoped audio-bus member pairing, bridge/export/navigation ordering, snapshot candidate IDs, injector/visibility consumers and recompilation behavior. Existing unique stamps are reserved before allocating replacements, including media/bus collisions and future suffixes; repaired stamps remain stable. Idless media receive nonempty identities. Authored IDs and direct-engine fallback lookup remain intact.
Validation: 58 allocator/bundler/screenshot unit and integration tests passed locally (19+2+37). This adapted harness used own-source aliases, borrowed dependencies and a borrowed generated runtime fixture; screenshot/browser infrastructure is mocked. Fresh adversarial source review found no blocker across hostile identity/order states. The 359-byte core budget change is isolated, but package size was not independently rebuilt here.
The authored Linux CLI captures/screenshots remain author evidence. I did not independently run the 304-second fixture, exported video, packaged CLI, Windows recovery or macOS multi-time report. This review does not establish that separate macOS report's cause.
— hf-review
Verdict: APPROVE
Reasoning: Producer and consumers now share document-unique identities across merged scenes, preserving styling IDs and recompile stability. No blocker found.
Edit accuracy: accurate 271 (base branch 271), smooth 152 of thoseThe gate passes. Quarantined, measured but not gated (0) |
jrusso1020
left a comment
There was a problem hiding this comment.
Re-reviewed exact e1908581b179e384d6b1b81af9d9bf82fe2e7125 against my approved cde06fd3f58d7eab5f3ed12912fec208687c58da.
Need · Size · Reuse · Simpler: This successor changes only pageBuild.preview.html and pageBuild.render.html goldens. Each adds document-unique data-hf-render-id="hf-media-0/1/2" to the three repeated idless images, matching the existing allocator's document-order fallback. Removing those six added attributes recovers the approved golden files byte for byte. No implementation, test logic or manifest changed.
Validation: all 19 allocator tests pass at this head using borrowed dependencies. The four page-build golden tests could not run successfully in this local dependency setup: parser subpath resolution, then missing entities/decode, blocked execution. I verified the complete golden delta directly; I am not reporting those tests as passing.
My earlier producer/consumer, allocation/pairing and snapshot integration review remains applicable to the identical source. Its 58 adapted tests are prior-head evidence, not a fresh full-suite run. No new independent real CLI capture, exported video, package-budget rebuild, Windows or macOS acceptance was performed.
— hf-review
Verdict: APPROVE
Reasoning: The golden-only successor records the already-reviewed distinct media identities without changing source behavior or unrelated expected output.
What
When two scene files each contain
<video id="clip">, later snapshot frames can be completely black even though the command succeeds. Give every merged media element a distinct render identity and carry it through snapshot extraction, injection, and visibility.Why
Inlining makes scene-local IDs ambiguous. Snapshot addressed both videos as
clip; injection found the first video, skipped its hidden scene, and left the visible second scene without footage. Authored IDs must stay intact because scene CSS and scripts use them.This fixes the reproduced scene-identity failure. The separate macOS report where multi-time calls fail but individual calls succeed was not reproduced with the unique-ID synthetic fixture, so this PR does not establish that report's cause.
Related work
Reuses the existing canonical allocator and browser lookup bridge. No transcode-cache behavior changes.
How
Producer/consumer review:
Independent review checked the complete change and hostile identity/order states, then approved the corrective delta with no remaining findings. Unit tests enter the real bundler and command paths, but mock browser infrastructure; the separate CLI captures exercise real Chromium, decoding, injection, and screenshots.
Test plan
clip. Three runs include forward and backward seeks; all nine images exactly match independent FFmpeg source-frame references.check --snapshotspassed with no lint, runtime, layout, motion, or contrast issues. One expected craft warning identifies the silent synthetic fixture.Browser proof is Linux Chromium. Windows recovery is covered by mocked browser tests; this does not establish macOS runtime behavior or an exported video result.
Before
Second scene at 12 seconds, baseline commit
807803a45. Black output despite command success.After
Same synthetic fixture and 1080×1920 viewport at the PR head. Second scene shows the correct frame.