You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8fe480c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(studio): operators get a magnetic main track that closes gaps on delete (#4069)
* feat(studio): closing a gap on the main track closes it automatically
Adds a Ripple toggle to the timeline toolbar (default on). With it on,
deleting a clip on the main track shifts every later main-track clip
left to close the gap, folded into the delete's own undo step. Linked
overlays and the auto-snap/insert behaviors are separate follow-ups.
* refactor(studio): one shared resolver for gap shifts, no scaffolding ahead of its caller
Consolidates three separate shift-to-element lookups (the gap-close menu's
two and the delete-ripple's one) into a single resolveShiftedElements,
built without a non-null assertion. Also drops resolveOpenGapShifts and its
tests from this branch: it ships with its actual caller in the next PR.
* fix(studio): canvas Delete on a timeline clip uses the timeline's own delete op
Clicking a clip then pressing Delete went through the DOM/canvas delete
path, which never ripples the main track — only the timeline's own
right-click Delete did. Both paths now converge: a DOM/canvas selection
that resolves to an exact timeline row hands off to the timeline delete
op instead of the REST remove-elements path, so ripple and undo-coalescing
apply from every gesture, not just one of two.
* test(studio): cover the delete-routing handoff and a stale-session ripple persist
Adds an end-to-end test that a canvas selection resolving to a timeline
row is handed to the timeline delete op rather than the REST path, plus
a test proving an SDK-eligible ripple persist after a delete rebases on
the post-delete disk bytes instead of resurrecting the deleted element
from a stale in-memory session. Also drops the unused single-element
handleDomEditElementDelete plumbing in useDomEditCommits.ts /
useElementLifecycleOps.ts, dead since before this branch.
* test(studio): cover the multi-member delete-routing handoff
Closes an adversarial-review should-fix: the marquee-group path
(expandGroup, 2+ members all resolving to timeline rows) was verified
at the resolver level but not through the useDomEditSession integration
wrapper end to end.
* fix(studio): ripple delete closes only the gap it opened
resolveMainTrackDeleteRippleShifts compacted the whole main track
(resolveAllTrackGaps) instead of the deleted clip's own span, so a
delete also swallowed any pre-existing gap further down the lane, or
pulled every clip to zero when nothing followed the deleted clip.
Now each survivor shifts left by exactly the duration of the deleted
clips before it.
* chore(studio): trim playerStore.ts under the file-size cap
Rebasing onto main put this file's line count over the cap once
combined with this branch's own additions; tightens the playbackRequest
doc comment, no behavior change.
* test(studio): cover multi-select ripple delete of non-adjacent clips
Closes the should-fix from the second adversarial review: a marquee
delete of two or more non-adjacent main-track clips in one batch had
no regression coverage, though the shift-sum logic already handled it.
* fix(studio): undo after a rippled delete names the delete, not the move
editHistory.ts coalesces a folded ripple move into the delete's own
undo entry by keeping the LAST recordEdit call's label — which was
always "Move timeline clips", so the toast read "Undid Move timeline
clips" after a keyboard Delete instead of naming what the user did.
handleTimelineGroupMove now accepts a label override, and the ripple
delete path passes its own "Delete timeline clip" label through it.
* fix(studio): surface and de-dup the ripple's post-delete failure path
A ripple that failed to persist after a committed delete was only
logged to the console, leaving the user with an unexplained gap; now
shows an error toast. The delete's history label was also duplicated
as a literal at both call sites (the delete write and the folded
ripple move) with no shared source; both now read from one constant
so they cannot drift apart.
* test(studio): dedupe the two delete-ops harness mounts
Fallow's duplication check flagged the two new ripple tests' harness
setup as a clone group; extracted a shared mountDeleteHarness helper.
* fix(studio): one toast, not two, on a ripple-persist failure
The generic group-move failure toast and the delete op's own specific
one both fired on the same ripple-persist error, telling the user
about one action twice. handleTimelineGroupMove now accepts a
suppressFailureToast option (console-logged instead, not silenced)
for a caller with its own more specific message, and the delete op's
unconditional "Deleted X" toast is skipped when the ripple failed.
* test(studio): cover suppressFailureToast through the real move hook
The prior test mocked handleTimelineGroupMove entirely, so it proved
the call site passes the option but not that the hook's own catch
honors it. A missing project id makes enqueueGroupOperation reject
before any persist runs, reaching the real catch block without
faking the SDK/server path.
* test(studio): dedupe the shared move-change fixture
Fallow flagged the two suppressFailureToast tests' identical "change"
object as a within-file clone group; hoisted to the describe scope.
* test(studio): unmount the React root in the group-move harness
0 commit comments