Skip to content

@remotion/studio: Disable freeze frame outside visible range - #9722

Merged
JonnyBurger merged 2 commits into
mainfrom
codex/freeze-frame-visible-sequence
Jul 27, 2026
Merged

@remotion/studio: Disable freeze frame outside visible range#9722
JonnyBurger merged 2 commits into
mainfrom
codex/freeze-frame-visible-sequence

Conversation

@JonnyBurger

@JonnyBurger JonnyBurger commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Disable the sequence freeze-frame action when the playhead is outside the sequence's visible range.
  • Keep the action disabled during premounting and postmounting frames.
  • Remove the freeze JSX prop when unfreezing instead of writing freeze={null}.
  • Add regression coverage for the visible range boundaries.

Test plan

  • bun run build
  • bun run stylecheck
  • cd packages/studio && bun run test
  • cd packages/studio-server && bun test src/test/update-sequence-props.test.ts

Closes #9713

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Jul 27, 2026 12:26pm
remotion Ready Ready Preview, Comment Jul 27, 2026 12:26pm

Request Review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — a clean guard that disables the freeze-frame menu item when the playhead is outside the sequence's visible [from, from+duration) range, plus a boundary unit test.

  • Add isSequenceVisibleAtTimelinePosition — checks whether the timeline position falls within the sequence's output frame range, ignoring premounting/postmounting.
  • Gate canToggleFreeze on visibility — adds the new check as the first guard in the canToggleFreeze chain so the menu item is disabled outside the visible range.
  • Unit test boundary values — verifies position: 19/20/59/60 for a sequence at from: 20, duration: 40, confirming the half-open interval semantics.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — the new commit replaces null with undefined when removing the freeze prop, so unfreeze now removes the attribute from JSX instead of writing freeze={null}. A updateSequenceProps test confirms the prop-stripping behavior.

  • nullundefined on unfreeze — in use-sequence-freeze-frame-menu-item.ts, the remove path now passes undefined as the value, which causes updateSequenceProps to strip freeze= from the JSX output.
  • Test for optional-attribute removal — new updateSequenceProps test that sets freeze to undefined and asserts the output no longer contains freeze=.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@JonnyBurger
JonnyBurger merged commit 34d1edd into main Jul 27, 2026
20 checks passed
@JonnyBurger
JonnyBurger deleted the codex/freeze-frame-visible-sequence branch July 27, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Freeze frame" should only work if the sequence is currently visible

1 participant