Skip to content

feat(keyboard): configurable shortcuts + keyboard-first nav fixes#7

Merged
danielss-dev merged 1 commit into
mainfrom
feat/configurable-keyboard-shortcuts
Jun 15, 2026
Merged

feat(keyboard): configurable shortcuts + keyboard-first nav fixes#7
danielss-dev merged 1 commit into
mainfrom
feat/configurable-keyboard-shortcuts

Conversation

@danielss-dev

Copy link
Copy Markdown
Owner

Summary

Makes Strand fully keyboard-driven with rebindable global shortcuts, and fixes file-tree keyboard navigation so j/k move 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-aware formatBinding (⌘ vs Ctrl), and toMudaAccelerator for the native menu. Unit-tested (keys.test.ts).
  • Push = Mod+P, Pull = Mod+Shift+P (as requested), plus fetch / sync / open-editor / open-terminal / refresh / view / theme defaults.
  • App.tsx window keydown, native menu accelerators, and palette shortcut chips all resolve through the same map; the menu reinstalls when bindings change.
  • Settings → Keyboard: record a combo, unassign, reset-one, restore-all, with shared-binding warnings. Persists in settings.keybindings.

Keyboard-first nav

  • Shift+J / Shift+K scroll the diff pane (Review + Local Changes).
  • j/k now follow 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". 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

  • Surface-local keys (commit Mod+Enter, in-diff search Mod+F, commit search /, n/p change-block step) stay with their views and are documented (not rebindable) in the Keyboard section.
  • j/k step 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 — clean
  • pnpm exec vitest run — 131 passing (+26)

🤖 Generated with Claude Code

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>
@danielss-dev danielss-dev merged commit aaf311e into main Jun 15, 2026
2 checks passed
@danielss-dev danielss-dev deleted the feat/configurable-keyboard-shortcuts branch June 15, 2026 21:45
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