feat(studio): show both sides of the cut while trimming - #3343
Open
miguel-heygen wants to merge 1 commit into
Open
feat(studio): show both sides of the cut while trimming#3343miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
The trim tools move an edit point, but the preview only ever shows one frame, so the frame you are cutting away and the frame you are cutting to were never on screen together. A two-up panel above the timeline now holds both, live, while the gesture runs. Each pane is its own preview iframe of the current composition seeked to its own time — the pattern the composition cards already use — so the frames track the drag with no server round-trip. The gesture publishes the pair of times it is editing; the panes read them. A finished trim leaves its cut on screen instead of snapping back, since that is the frame you just made. Slip has no edit point, so it shows the clip's own first and last frame, which is what its drag actually changes. Two extra composition renders is a real cost, so the panel only exists while a trim tool is active and a toolbar toggle (persisted) turns it off — both panes and their iframes are torn down when it does.
This was referenced Aug 19, 2026
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
The FCP-style precision view from #3285: while a trim tool is active, a two-up
panel above the timeline holds the frame on each side of the edit point, live,
as you drag it.
Left pane is the outgoing frame, right is the incoming one, with the running
trim amount between them. A finished trim leaves its cut on screen rather than
snapping back — it is the frame you just made.
Why
The trim tools move an edit point, but the preview only ever shows one frame,
so the frame you are cutting away and the frame you are cutting to were
never on screen at the same time. That is exactly what the issue asked for, and
it is the part of a trim you cannot judge from the timeline bars.
How
own time — the same live-preview-in-an-iframe pattern the composition cards
already use, so no new rendering machinery. Seeks are imperative: re-rendering
the iframe per pointer move would reload the composition every frame.
publishes the pair of composition times it is editing, the panel reads them.
The gesture lives deep in the timeline's drag hook and the panel renders above
the timeline, so props would have meant threading state through five
components.
what its drag actually changes — labelled "Clip in" / "Clip out".
shows the whole frame rather than the top-left corner of it.
also keeps them warm: a composition takes a moment to load and a pane that
arrives after the gesture is over is worth nothing.
On the cost. Two extra composition renders is real, so the panel exists only
while a trim tool is active, and a toolbar toggle (persisted in the studio UI
preferences, default on) turns it off. Switching it off tears the iframes down
rather than hiding them — verified below.
Test plan
Unit tests added/updated — 3 new tests covering which edit point each mode
frames (out-point ripple follows the drag, head ripple pins the start,
roll and slide follow their moving boundary), slip framing the clip's own
in/out, and the clamp that stops a negative preview time.
Manual testing performed — drove a real Chrome against Studio and read the
panel's own labels back out of the DOM:
Outgoing · 9.97s │ ROLL +2.00s │ Incoming · 10.00sFrames verified by eye, not just by label — the panel after that roll:
Full
packages/studiosuite green (4311 tests), typecheck, oxlint, oxfmt.Not covered
precision editor; here it is a readout and the timeline stays the input
surface. Worth adding if the view earns its keep.
not two strips.