fix: address review feedback from #1333 and #1335#1343
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
miguel-heygen
approved these changes
Jun 11, 2026
jrusso1020
approved these changes
Jun 11, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
Approving at HEAD 1059106c. Small (+77/-38) follow-up that addresses all 5 non-blocking items called out on #1333 + #1335 R1s.
Verified each change end-to-end:
encodeStage.tstry/finally — wraps the two-pass palette+paletteuse encode sormSync(palettePath, {force: true})runs on success AND on either pass failing. The pre-existing code leaked the palette temp file unconditionally.force: truekeeps cleanup safe when the first ffmpeg never wrote the palette before failing.studioServer.tsregexhttps:\/\/→https?:\/\/— matches the compiler'sREMOTE_IMG_TAG_REwhich already accepts http; this is parity, not a new attack surface.gif.tsnormalizeDelayCentiseconds— Chrome clamps GIF frame delays ≤ 1cs to 10cs (100ms); this mirrors browser playback timing so all-zero-delay stickers loop-expand to a real duration instead of playing once and freezing. Logic is clean (returns 10 for ≤ 1, else delay), anddurationSecondsreducer is now safely simplified sincenormalizeDelayCentisecondsguarantees non-negative output.- Docs — single sentence on the 30fps cap. Reads cleanly.
- Tests —
gif.test.tspins the 10-frame all-zero-delay → 1s duration case;animatedGifPrep.test.tspins that transcode failures propagate with both the failing input path AND the underlying ffmpeg error.
Miguel already approved at this HEAD. CI: lint, test, typecheck, build, Windows render+test, perf, fallow audit, CodeQL all green; regression shards still in-flight but that's normal for HF.
Matt, all yours to merge once the regression shards land.
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.
What
Addresses all five review items from #1333 and #1335.
gif-palette.pngis now removed after the gif encode via try/finally, on success and on either pass failing (feat(cli,producer): add gif output format with two-pass palette encode #1333)REMOTE_GIF_IMG_SRC_REin the studio server acceptshttp://like the compiler'sREMOTE_IMG_TAG_REdoes, so http remote GIFs prep in preview too (feat(producer,core): play animated GIF inputs frame-synced via prep-time VP9 transcode #1335)Why
Both reviews approved with these as named non-blocking concerns. Keeping them in one small follow-up closes the loop while the context is fresh. The three "minor observations" from the #1335 review (shared GIF test fixtures, a total-frame-count guard, hash-stability docs) are deliberately not taken here to keep this reviewable at a glance.
How
Smallest change per item: a try/finally around the two-pass encode in
encodeGifFromDir, one regex character class, anormalizeDelayCentisecondshelper in the GIF metadata parser (clamps delays <= 1cs to 10cs, mirroring Chrome's playback timing), one docs sentence, and two tests.Test plan
Rendered a composition to GIF with this branch and confirmed the output is valid and no
gif-palette.png(or work-dir residue) remains afterward.