Repository navigation
fix(studio): a host can own the live preview's load deadline, so a slow sealed film isn't an error - #8206
Conversation
Edit accuracy: accurate 271 (base branch 271), smooth 77 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
jrusso1020
left a comment
There was a problem hiding this comment.
Requesting changes at f5e9c05. The code is the same as when I reviewed it, and it's fine. The required Studio and player captures check is red on the PR body: this change touches .tsx files, so the body needs a capture image, or a ## No visible change section if it qualifies (under 20 lines with no .tsx, .css or .html files, so it doesn't here).
Need: add a before and after capture of the sealed slow-boot preview to the body. Edit the body text first, because gh pr edit --body-file drops attachments. Then re-run the check and I'll approve at that head.
jrusso1020
left a comment
There was a problem hiding this comment.
Re-review at f5e9c050. The head is the same commit I requested changes on, so the code is unchanged, and the code was fine then. My only ask was the red Studio and player captures check. The body now carries the before and after captures, and that check passed on its latest run (01:01Z). Every check at this head now ends in success or skipped. Approving.
Need: yes · Size: unchanged since my last review · Reuse: unchanged · Simpler: unchanged · Structure: unchanged
What changed
A sealed preview (
sandboxOrigin="opaque") cannot be read by the player, so its composition probe never finds the timeline itself: only the film's runtime announcing ready makes it ready. The probe's 8 s deadline still runs, so a sealed film whose first load takes longer than 8 s errors with "Composition timeline not found after 8s", then comes up anyway once its runtime is ready.NLEPreviewnow takesnoLoadTimeoutfor its live slot and passes it toPlayer, as the shadow slot already does. A host that counts load time itself can hand the deadline over for the films it seals; slow loads still count there, as slow loads rather than errors. A host that does not pass it is unchanged, so Studio on its own keeps the 8 s error for a film that never loads.This adds a prop only and changes no default, so it does not collide with #7846 (Studio sealed by default).
What I measured
NLEPreview.slowBoot.test.ts(green at the fix head once CI reports): a sealed live preview givennoLoadTimeoutwhose runtime boots after 8 s raises no error and comes ready; the existing test still holds that a live slot without it keeps the 8 s deadline.Test (studio)failed with the production error:expected [] ... received [{ message: "Composition timeline not found after 8s" }]at the 10 s mark (https://github.com/heygen-com/hyperframes/actions/runs/44379228916/job/135066796053). An earlier test-only push (bd0ed7c) failed for a different reason (the sealed player mounts after its frame-token fetch and the test read it too early), so it proved nothing; 0faefde stubs that fetch and waits.Before
Studio from main (
e83ddaed), built with the preview sealed, and its preview pane passingnoLoadTimeoutas a host would: a one-line change used only for these captures ({...({ noLoadTimeout: true } as object)}onPreviewPane'sNLEPreview, so main compiles too), not part of this PR. The film's first load is held about 12 s by a script from a deliberately slow local server. Main'sNLEPreviewdrops the prop: at 9.6 s "Preview failed to load: Composition timeline not found after 8s" shows, and it stays over the film after the timeline has loaded behind it.After
The same build steps and film at this branch (
f5e9c050): no error, and the film comes up at 13.9 s.What I did NOT exercise
retryPreview) still dropsno-load-timeout, as it already did for a promoted shadow slot.