Skip to content

feat: skip delete confirmation dialog when Option key is held - #598

Merged
matt2e merged 2 commits into
mainfrom
option-delete-notes-and-commits
Apr 10, 2026
Merged

feat: skip delete confirmation dialog when Option key is held#598
matt2e merged 2 commits into
mainfrom
option-delete-notes-and-commits

Conversation

@matt2e

@matt2e matt2e commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When the Option (Alt) key is held while clicking a delete button on timeline items (commits, notes, reviews, images), the confirmation dialog is bypassed and the item is deleted immediately
  • Propagates the altKey state from the mouse event through the component hierarchy (TimelineRowBranchTimelineBranchCard)
  • Refactors delete handlers to extract the deletion logic into a doDelete closure, used by both the instant-delete path and the confirmation dialog's onConfirm callback

Test plan

  • Click delete on a timeline item without holding Option — confirm dialog should appear as before
  • Hold Option and click delete on a commit, note, review, and image — each should delete immediately without confirmation
  • Verify error handling still works (e.g., failed deletes show error notification)

🤖 Generated with Claude Code

matt2e and others added 2 commits April 10, 2026 10:08
Thread altKey from the trash button's MouseEvent through TimelineRow →
BranchTimeline → BranchCard so that Option+click deletes immediately
without showing the confirmation dialog.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unused altKey opts parameter from handleDeletePendingCommit
since pending commits already delete immediately without confirmation.
Make onDeleteClick opts parameter optional in TimelineRow to match
caller signatures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e
matt2e requested review from baxen and wesbillman as code owners April 10, 2026 00:28
@matt2e
matt2e merged commit 489c810 into main Apr 10, 2026
5 checks passed
@matt2e
matt2e deleted the option-delete-notes-and-commits branch April 10, 2026 01:49
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