Skip to content

feat: add quick annotation labels for one-click preset feedback#268

Merged
backnotprop merged 2 commits intobacknotprop:mainfrom
grubmanItay:feat/quick-annotations
Mar 11, 2026
Merged

feat: add quick annotation labels for one-click preset feedback#268
backnotprop merged 2 commits intobacknotprop:mainfrom
grubmanItay:feat/quick-annotations

Conversation

@grubmanItay
Copy link
Copy Markdown
Contributor

@grubmanItay grubmanItay commented Mar 10, 2026

Description

Adds preset label chips that allow one-click annotations without typing — aimed at experienced reviewers who give similar feedback repeatedly.


⚡ Quick Labels

  • Toolbar button: Opens a dropdown with 8 default label chips (Needs tests, Security concern, Break this up, Clarify this step, Wrong order, Consider edge cases, Discuss first, Nice approach)
  • Keyboard shortcuts: Alt+1..8 applies a label instantly when the toolbar is visible
  • Click a chip → annotation created immediately, no typing needed
image

⚙️ Customization

  • Settings → Labels tab: Edit text, change colors, add/remove labels (up to 12)
  • Cookie storage: Consistent with existing settings patterns
  • Reset to defaults: One-click restore of the 8 built-in labels
image

📤 Export & Sharing

  • Export: Label annotations render as [🧪 Needs tests] prefixes, with a grouped Label Summary section at the bottom
  • Share URLs: Quick labels preserved via backward-compatible tuple extension — old clients ignore the extra field gracefully

Files changed

File Change
packages/ui/utils/quickLabels.ts NEW — label data model, color map, cookie storage
packages/ui/components/AnnotationToolbar.tsx ⚡ button, dropdown panel, Alt+N shortcuts
packages/ui/components/Viewer.tsx Wire quick labels to annotation creation (text + code blocks)
packages/ui/components/Settings.tsx Labels tab with editable label list
packages/ui/components/KeyboardShortcuts.tsx Document Alt+1..8 shortcut
packages/ui/types.ts isQuickLabel optional flag on Annotation
packages/ui/utils/parser.ts Label prefix + summary in export
packages/ui/utils/sharing.ts Backward-compatible tuple extension

Add preset label chips (Needs tests, Security concern, Break this up, etc.)
that allow instant annotation without typing. Includes ⚡ toolbar button,
Alt+1..8 keyboard shortcuts, label customization in Settings, and label
summary in export output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop
Copy link
Copy Markdown
Owner

Looks cool

@backnotprop
Copy link
Copy Markdown
Owner

backnotprop commented Mar 10, 2026

@grubmanItay we could add a selection mode for Quick Labels as well. Like, you're either in select text or pinpoint mode. I could click on a part of the plan and then just see a dropdown of labels I want to attach to that part of the plan. This would be in addition to the markup selection or comment or red line. Possibly, maybe we'll do this in a new PR.

I have a bunch of stacked PRs now I need to deal with, all pertaining to the UI.

EDIT: I suggest a new PR because there's some ergonomics and then things like the quick keyboards, where we need to figure out better cycling and inform the user which mode they're on if they're down in the plan.

@grubmanItay
Copy link
Copy Markdown
Contributor Author

Nice addition, I will open a new PR for this later

@backnotprop
Copy link
Copy Markdown
Owner

QA Checklist Results ✅

All 10 items passed.

Status ID Check
func-1 Quick label dropdown appears and creates annotations
func-2 Quick labels work on code block hover toolbar
func-3 Alt+1–8 keyboard shortcuts apply labels
func-4 Settings > Labels tab allows full customization
integration-1 Exported feedback includes quick label format and summary
integration-2 Quick label annotations survive sharing round-trip
visual-1 Quick label chip colors correct in light and dark mode
func-5 Mobile touch selection bridge works on touch devices
edge-1 Emoji editing edge cases in Settings labels tab
visual-2 ToolbarErrorBoundary invisible in normal operation

Notes

  • edge-1: Empty text labels just show the emoji as the annotation note — acceptable behavior.

🤖 Generated with Claude Code via Plannotator checklist

Keep matchMedia('(pointer: coarse)') from PR over ontouchstart check —
avoids false positives on desktop Chrome with touchscreens.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop backnotprop merged commit c007662 into backnotprop:main Mar 11, 2026
5 checks passed
@grubmanItay grubmanItay deleted the feat/quick-annotations branch March 12, 2026 09:03
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