Skip to content

feat(workbench): keyboard-only sidebar and F6 region focus - #185

Draft
zordhalo wants to merge 1 commit into
mainfrom
feat/keyboard-navigation
Draft

zordhalo wants to merge 1 commit into
mainfrom
feat/keyboard-navigation

Conversation

@zordhalo

Copy link
Copy Markdown
Contributor

What and why

Plan task P3 (idea U2): the whole window can be driven without a mouse.

  • Sidebar tree focus. The virtualized sidebar is now a role="tree" with treeitem rows (aria-level, aria-expanded, aria-selected, aria-posinset, aria-setsize) and aria-activedescendant, so focus never chases rows the virtualizer unmounts. Down/Up and j/k move, Left/Right collapse, expand or go to the parent or first child, Home/End jump, Enter opens, Space opens a task or toggles a project. The focused row scrolls into view and shows a focus ring. Keys act only when the tree itself has focus, so typing in an input or pressing a row's own buttons is untouched.
  • Region cycling. F6 / Shift+F6 go sidebar, main, bottom terminal drawer, right sidebar, skipping regions that are not on screen. Each region root carries data-focus-region; the existing focusedRegion (main | bottom) is untouched and stays in sync through the existing onFocus handlers, so there is no parallel state.
  • Focus sidebar command (opens the sidebar if hidden).

Default keybindings, all rebindable in Settings → Keyboard shortcuts and in the command palette:

Command Default
Focus Sidebar Mod+Shift+0
Focus Next Region F6
Focus Previous Region Shift+F6

Mod+0 is not used: the View menu has Electron's resetZoom role on CmdOrCtrl+0, so it would clash. Mod+Shift+0 sits beside the task view's Mod+Shift+1 to 3. All three work while a terminal has focus.

Does not touch features/lanes/. No new dependencies. Logged as UPSTREAM-PATCHES 97.

How it was tested

  • pnpm exec oxfmt and pnpm exec oxlint from apps/emdash-desktop (101 files, 0 warnings, 0 errors)
  • nx run @emdash/emdash-desktop:typecheck: passes
  • vitest --project node: sidebar-tree-keys.test.ts, focus-regions.test.ts, plus src/core/manifests/shared, primitives/keybindings, features/workbench, features/settings, primitives/palette (273 tests pass)
  • vitest --project browser sidebar-keyboard.browser.test.tsx: tree semantics, arrows and j/k, Home/End, expand and collapse, Enter and Space open, input is not stolen from, region cycling with a hidden region skipped
  • node tooling/scripts/check-upstream-patches.mjs --base origin/main: passes
  • Not run: full suite, and a manual check in the running app (F6 from a real xterm and Monaco, focus ring appearance).

Screenshots (UI changes)

None; the only visible change is a focus ring on the keyboard-focused sidebar row.

Checklist

  • pnpm run check passes locally (focused checks only, see above)
  • Every commit is signed off (git commit -s) and the PR title is a Conventional Commit
  • Tests added or updated for the behaviour change
  • UI change: only the new browser test was run, not the whole browser project
  • Every edit to a file inherited from Emdash is logged in docs/UPSTREAM-PATCHES.md
  • No new dependency
  • No security-sensitive area touched
  • Only the fake agent was used
  • Docs in docs/guide/ updated

🤖 Generated with Claude Code

The sidebar tree takes arrow, j/k, Home/End, Enter and Space keys with
tree semantics and aria-activedescendant. F6 and Shift+F6 cycle focus
through the sidebar, main area, terminal drawer and right sidebar,
skipping closed regions. Mod+Shift+0 focuses the sidebar (Mod+0 is
Electron's zoom reset).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lukce <krawczakluke@gmail.com>
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ninebrains Ready Ready Preview Nov 13, 2026 4:48am UTC
ninebrains-docs Ready Ready Preview Nov 13, 2026 4:48am UTC

Request Review

This branch was successfully deployed

2 active deployments
Preview – ninebrains-docs — 0a6fa627 Deployed Nov 13, 2026 by vercel[bot]
Preview – ninebrains — 0a6fa627 Deployed Nov 13, 2026 by vercel[bot]
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