Skip to content

fix: Delete/Backspace removes the selected timeline clip - #78

Merged
thisiscsim merged 1 commit into
mainfrom
fix/delete-selected-clip
Aug 7, 2026
Merged

thisiscsim merged 1 commit into
mainfrom
fix/delete-selected-clip

Conversation

@thisiscsim

Copy link
Copy Markdown
Owner

Summary

  • Clicking a clip and pressing Delete (or Backspace) now removes it. Previously no delete shortcut existed — the only removal affordance was the empty-layer trash button in the track gutter, which agent-generated tracks (always populated) never show, making their clips look undeletable.
  • New removeClip helper searches every layer by clip id (video/text/audio; caption layers have no clips), so agent-generated and hand-placed clips delete identically — no id-pattern assumptions.
  • The shortcut lives with the other editor-level keys in App.tsx: skips text fields/contentEditable so typing is unaffected, reads selection through getState() at keypress time, clears the selection after, and routes through updateEdl so deletion participates in undo (Cmd+Z brings the clip back) and autosave.

Test plan

  • npm run typecheck && npm test && npm run build green (152 tests, 2 new for removeClip)
  • Select an agent-generated video clip → Delete removes it; Cmd+Z restores it
  • Same for text and audio clips, and for Backspace
  • Typing in the composer / rename fields: Backspace edits text, never deletes clips

Renderer-only change — HMR covers it, no dev restart needed.

Made with Cursor

There was no delete shortcut at all — the only removal affordance was the
empty-layer trash button, which agent-generated tracks (always populated)
never show, so their clips looked undeletable. Adds an editor-level
Delete/Backspace handler that removes the selected clip by id from whichever
layer holds it (video/text/audio), skipping text fields so typing is
unaffected. Goes through updateEdl, so it participates in undo and autosave.

Co-authored-by: Cursor <cursoragent@cursor.com>
@thisiscsim
thisiscsim merged commit 20b8e50 into main Aug 7, 2026
1 check passed
@thisiscsim
thisiscsim deleted the fix/delete-selected-clip branch August 7, 2026 19:35
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.

1 participant