feat(keyboard): configurable shortcuts + keyboard-first nav fixes#7
Merged
Merged
Conversation
Make the app fully keyboard-driven with rebindable global shortcuts, and fix file-tree keyboard navigation to match the tree's display order. - Central keybinding registry (ui/src/lib/keys.ts): single source of truth for every global command, with event→binding, override resolution, platform-aware formatting, and muda-accelerator conversion (keys.test.ts). - Push = Mod+P, Pull = Mod+Shift+P (per request), plus fetch / sync / open-editor / open-terminal / refresh defaults. - App.tsx window keydown is registry-driven; native menu accelerators and palette shortcut chips resolve through the same map and reinstall on change. - Settings → Keyboard section: record / unassign / reset / restore-all with shared-binding warnings; overrides persist in settings.keybindings. - Shift+J / Shift+K scroll the diff pane (Review + Local Changes). - j/k walk files in the tree's display order (folders-first natural sort via ui/src/lib/treeOrder.ts) instead of flat path order, so they no longer "dive into folders" — matches the arrow keys. Applied to the Review queue and Local Changes (treeOrder.test.ts). - Docs: README shortcuts table + context keys, ROADMAP, TASKS, learnings. Verified: pnpm exec tsc --noEmit (clean), vitest 131 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Makes Strand fully keyboard-driven with rebindable global shortcuts, and fixes file-tree keyboard navigation so
j/kmove in the order the tree actually displays.Configurable shortcuts
ui/src/lib/keys.ts— single registry for every global command:eventToBinding, override resolution (resolveBindings), platform-awareformatBinding(⌘ vs Ctrl), andtoMudaAcceleratorfor the native menu. Unit-tested (keys.test.ts).Mod+P, Pull =Mod+Shift+P(as requested), plus fetch / sync / open-editor / open-terminal / refresh / view / theme defaults.App.tsxwindow keydown, native menu accelerators, and palette shortcut chips all resolve through the same map; the menu reinstalls when bindings change.settings.keybindings.Keyboard-first nav
Shift+J/Shift+Kscroll the diff pane (Review + Local Changes).j/know follow the tree's display order (folders-first natural sort viaui/src/lib/treeOrder.ts) instead of flat path order, so they no longer "dive into folders". Applied to the Review queue and Local Changes. Unit-tested (treeOrder.test.ts).Docs
README shortcuts table + context keys, ROADMAP, TASKS, and
docs/learnings.md(keybinding registry, menu-accelerator sourcing, tree-display-order gotcha).Scope notes
Mod+Enter, in-diff searchMod+F, commit search/,n/pchange-block step) stay with their views and are documented (not rebindable) in the Keyboard section.j/kstep file-to-file (skip folder rows), now in visual order; landing on folder rows like the arrows would be a larger change (tracked).Testing
pnpm exec tsc --noEmit— cleanpnpm exec vitest run— 131 passing (+26)🤖 Generated with Claude Code