feat(annotate): add sidebar shortcuts#986
Open
leoreisdias wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Annotate mode has a left sidebar with useful destinations, but it did not expose keyboard shortcuts for opening those panels. This adds shortcut coverage for the annotate sidebar and makes the shortcuts visible from Settings when the app is in annotate mode.
What Changed
Review Focus
packages/editor/App.tsx.Shift Shiftafter avoiding conflicts with browser shortcuts, Pinpoint/Selection's Option behavior, bare-letter annotation shortcuts, and built-in browser/AI shortcuts.Design Note
There is some duplication between annotate and plan shortcut definitions in the Settings shortcut display. I leaned slightly away from over-DRYing this for now so each mode can freely evolve its own wording and available actions later. Happy to fold this into a more shared definition model if reviewers prefer that direction.
Relatedly, the new annotate sidebar scope currently lives under
packages/ui/shortcuts/plan-reviewbecause the existing shortcut taxonomy only has plan-review and code-review folders, and annotate mode already reuses much of the plan-review shortcut surface. I am happy to move this into a dedicated annotate shortcut folder if that feels cleaner.Test Plan
bun test packages/ui/shortcuts.test.tsPATH="$PWD/packages/ui/node_modules/.bin:$PATH" bun run typecheckbun run build:review && bun run build:hook