Skip to content

feat: keyboard shortcuts for review navigation#6

Merged
tomasz-tomczyk merged 1 commit intomainfrom
worktree-keyboard-shortcuts
Feb 20, 2026
Merged

feat: keyboard shortcuts for review navigation#6
tomasz-tomczyk merged 1 commit intomainfrom
worktree-keyboard-shortcuts

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

@tomasz-tomczyk tomasz-tomczyk commented Feb 20, 2026

Summary

  • Add vim-style j/k keyboard navigation through document blocks with smooth scrolling
  • c opens comment form on focused block, e edits, d deletes with inline y/n confirmation
  • f finishes review, t toggles TOC panel
  • ? toggles a help overlay listing all shortcuts (also accessible via header button)
  • Escape cascading: cancel form → clear selection → clear focus
  • All single-key shortcuts guarded against firing in textarea/input/contenteditable

Vim-style j/k navigation through document blocks, c to comment,
e/d to edit/delete comments, f to finish review, t to toggle TOC,
and ? to show help overlay. All shortcuts are guarded against
firing while typing in textareas.
@tomasz-tomczyk tomasz-tomczyk marked this pull request as ready for review February 20, 2026 23:06
@tomasz-tomczyk tomasz-tomczyk merged commit 939dba1 into main Feb 20, 2026
@tomasz-tomczyk tomasz-tomczyk deleted the worktree-keyboard-shortcuts branch February 20, 2026 23:06
tomasz-tomczyk added a commit that referenced this pull request Apr 29, 2026
…pe test

Bundle of low-risk improvements flagged by the independent review:

Popover keyboard + a11y
- Add `role="listbox"` to the focus-picker list and `role="option"` +
  `aria-selected` + `tabindex="-1"` to each item, matching the listbox
  pattern the popover already implies via aria-haspopup.
- Add Escape handler that closes the popover and returns focus to the
  trigger button — same pattern as the commit-picker.

Stable test attributes
- `data-label` on each picker item (lifts the label out of rendered DOM
  children, replacing brittle `evaluate(() => innerText)` reads in
  focus-picker spec).
- `data-focus-kind` on each item, replacing the substring-match selector
  `[data-focus-payload*="working_tree"]` which would false-positive on any
  payload that happened to contain that string.

Brittle test fixes
- comment-stale spec: replace `stackOrdered[1]` with a feat-b-relative
  lookup so fixture growth doesn't silently shift the test.

Net new coverage
- scope-toggle-files: new test asserts a layer-scoped comment is hidden
  in full-stack and reappears when the user flips back. This is the
  lossless-visibility invariant — the only regression test against
  accidentally serialising scope-filtered comments out to disk.

Skipped from the polish list (with reasons):
- Branches-section base_sha precompute (#2) — server-side change, owned
  by go-expert; would be a separate ticket.
- Pre-feature comment WT-only test (#6) and /api/focus error-rollback
  toast test (#7) — both require fixture or daemon-state changes that
  exceed the 30-min budget for "polish".

Co-Authored-By: Claude Opus 4.7 (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