Skip to content

feat(annotate): add Cmd+Z undo for annotations#538

Open
salmonumbrella wants to merge 1 commit intobacknotprop:mainfrom
salmonumbrella:feat/annotation-cmd-z-undo
Open

feat(annotate): add Cmd+Z undo for annotations#538
salmonumbrella wants to merge 1 commit intobacknotprop:mainfrom
salmonumbrella:feat/annotation-cmd-z-undo

Conversation

@salmonumbrella
Copy link
Copy Markdown

Summary

  • Adds Cmd/Ctrl+Z support to undo the most recent annotation that has no user-written content
  • Dismisses transient UI state (empty comment popovers, quick-label pickers, toolbars) before removing annotations
  • Skips annotations with comment text, images, quick labels, or external sources

Test plan

  • Unit tests for isUndoRemovableAnnotation and findLastUndoRemovableAnnotation
  • Verify Cmd+Z removes empty deletion annotations in order
  • Verify Cmd+Z does not remove annotations with comment text or images
  • Verify Cmd+Z dismisses open empty popovers before touching annotations
  • Verify Cmd+Z is no-op when typing in text fields (inputs, textareas)

🤖 Generated with Claude Code

Pressing Cmd/Ctrl+Z removes the most recent annotation that has no
user-written content (no comment text, images, or quick labels).
Transient UI state (empty comment popovers, quick-label pickers,
toolbars) is dismissed first before reaching annotations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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