Skip to content

feat(annotate): add sidebar shortcuts#986

Open
leoreisdias wants to merge 1 commit into
backnotprop:mainfrom
leoreisdias:feat/annotate-left-sidebar-shortcut
Open

feat(annotate): add sidebar shortcuts#986
leoreisdias wants to merge 1 commit into
backnotprop:mainfrom
leoreisdias:feat/annotate-left-sidebar-shortcut

Conversation

@leoreisdias

@leoreisdias leoreisdias commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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

  • Adds an annotate sidebar shortcut scope for toggling the Contents and Files sidebar panels.
  • Adds a double-tap Shift shortcut for toggling the Agent control when the annotate Agent TUI is available.
  • Passes annotate mode into Settings so the shortcut reference shows annotate-specific actions instead of the plan-review action list.
  • Splits the hardcoded shortcut help data into shared plan/annotate sections plus mode-specific action/sidebar sections.

Review Focus

  • Please look hardest at the shortcut choices and event guards in packages/editor/App.tsx.
  • The Agent TUI shortcut intentionally uses Shift Shift after avoiding conflicts with browser shortcuts, Pinpoint/Selection's Option behavior, bare-letter annotation shortcuts, and built-in browser/AI shortcuts.
  • I did not keep an Escape shortcut for closing the left sidebar. The shortcuts that open the sidebar already toggle it closed, and Escape created awkward interactions with annotation UI dismissal.

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-review because 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.ts
  • PATH="$PWD/packages/ui/node_modules/.bin:$PATH" bun run typecheck
  • bun run build:review && bun run build:hook

@leoreisdias leoreisdias marked this pull request as ready for review July 1, 2026 14:13
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