Summary
Add true keyboard-driven sidebar file navigation, analogous to clicking a file in the sidebar with the mouse.
Currently, from reading src/ui/components/chrome/HelpDialog.tsx and the useAppKeyboardShortcuts wiring, the sidebar has:
Tab — toggle files ↔ filter focus state
/ — focus the filter input
[ / ] — prev/next hunk (crosses file boundaries)
- Mouse click on a file — jumps diff panel to that file's header
But there's no way, with focus in the "files" area, to move up/down the file list with the keyboard and activate a file. Tab toggles the focus flag but there are no arrow/j/k handlers bound while focusArea === "files", and no Enter/Space activation for the highlighted file. So practically the sidebar is mouse-only for file selection.
Requested behavior
Tab (or dedicated key) puts focus in the sidebar file list, with a visible focused-row indicator.
↑ / ↓ (and ideally j / k) move the focused row in the sidebar without yet changing the diff pane.
Enter or Space on the focused row activates that file — same effect as a mouse click: align the diff viewport to the top of that file's header (equivalent to jumpToFile(fileId, 0, { alignFileHeaderTop: true })).
Tab again (or Esc) returns focus to the diff pane so all the existing diff-nav keys (], [, j, k, Space, etc.) resume working.
This would cleanly mirror the mouse flow — hover/click → jump — without needing the mouse, and is the natural companion to the filter (/) + Enter flow you already have.
Why it matters
Reviewers using tmux / terminal multiplexers / remote sessions / tiling WMs frequently can't or don't want to use the mouse. Multi-file reviews currently require either / + type-filename repeatedly, or walking every hunk with ] through files you don't care about. A sidebar that responds to keyboard focus + activation would make Hunk fully keyboard-first and significantly faster for large changesets.
Notes
- Filed via Claude Code on behalf of a user dictating intent — feature request, not a bug report.
- Verified against
hunkdiff@0.10.0 installed via npm and against main source in this repo.
- Thanks for building Hunk — it's already an excellent tool; hope this helps prioritize.
Summary
Add true keyboard-driven sidebar file navigation, analogous to clicking a file in the sidebar with the mouse.
Currently, from reading
src/ui/components/chrome/HelpDialog.tsxand theuseAppKeyboardShortcutswiring, the sidebar has:Tab— toggle files ↔ filter focus state/— focus the filter input[/]— prev/next hunk (crosses file boundaries)But there's no way, with focus in the "files" area, to move up/down the file list with the keyboard and activate a file.
Tabtoggles the focus flag but there are no arrow/j/khandlers bound whilefocusArea === "files", and noEnter/Spaceactivation for the highlighted file. So practically the sidebar is mouse-only for file selection.Requested behavior
Tab(or dedicated key) puts focus in the sidebar file list, with a visible focused-row indicator.↑/↓(and ideallyj/k) move the focused row in the sidebar without yet changing the diff pane.EnterorSpaceon the focused row activates that file — same effect as a mouse click: align the diff viewport to the top of that file's header (equivalent tojumpToFile(fileId, 0, { alignFileHeaderTop: true })).Tabagain (orEsc) returns focus to the diff pane so all the existing diff-nav keys (],[,j,k,Space, etc.) resume working.This would cleanly mirror the mouse flow — hover/click → jump — without needing the mouse, and is the natural companion to the filter (
/) + Enter flow you already have.Why it matters
Reviewers using tmux / terminal multiplexers / remote sessions / tiling WMs frequently can't or don't want to use the mouse. Multi-file reviews currently require either
/+ type-filename repeatedly, or walking every hunk with]through files you don't care about. A sidebar that responds to keyboard focus + activation would make Hunk fully keyboard-first and significantly faster for large changesets.Notes
hunkdiff@0.10.0installed via npm and againstmainsource in this repo.