Skip to content

Timeline clip delete and cut/silence restore - #57

Merged
wassgha merged 7 commits into
mainfrom
cursor/timeline-clip-delete-restore-9959
Aug 2, 2026
Merged

wassgha merged 7 commits into
mainfrom
cursor/timeline-clip-delete-restore-9959

Conversation

@wassgha

@wassgha wassgha commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds first-class delete and restore for timeline clips, wired into the existing cut/keep model (manual cuts + deleted words).

Delete a clip

  • Click a kept clip on the timeline, then press Delete/Backspace, or use the new Delete button next to Split
  • Cuts the clip’s time range out of the edited media (same path as silence removal / aggressive trim)

Restore a cut

  • Click a red cut/silence section (or a cut-out word on the wordbar), then press Delete/Backspace, or use the new Restore button
  • Shrinks overlapping manual cuts and undeletes covered words so that media returns to the keep ranges

Shortcuts

Delete/Backspace is context-sensitive (handled globally in Editor):

  1. Selected cut region → restore
  2. Selected words → restore if all cut out, otherwise cut kept words
  3. Selected clip (no words) → delete clip

Implementation notes

  • New restoreRangesResult in lib/edits.ts + store actions restoreRanges, deleteSelectedClip, restoreSelectedCut
  • Timeline cut ranges are selectable (selectedCutIndex), with stronger selection wash
  • Unit coverage for restore round-trips in tests/edits-test.ts (npx tsx tests/edits-test.ts passes)
Open in Web Open in Cursor 

cursoragent and others added 7 commits August 2, 2026 12:13
Select a kept clip and press Delete/Backspace or use the new Delete
button next to Split to cut it out. Select a cut/silence region (or a
cut-out word) and press Delete or use Restore to bring that media back.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Word clicks also select the owning clip for trim handles; the Delete
button should target a clip-body selection, not a word pick.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Use the same rounded-sm DOM ring for selected silence/cut regions
instead of a sharp canvas strokeRect.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Selected silence/cut hatch and wash now use the same inset rounded
rect as the outline so they no longer spill past the corners. Clip
rings are indigo; cut rings are red.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
@wassgha
wassgha marked this pull request as ready for review August 2, 2026 21:46
@wassgha
wassgha merged commit c93e835 into main Aug 2, 2026
1 check passed
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.

2 participants