ZDDC/browse/js
ZDDC 03d008ff0a feat(browse): keyboard navigation in the file tree
Document-level keydown handler covers the W3C tree-view pattern so
users can drive the browse pane without the mouse:

  ↓ / ↑           — move selection (auto-previews files as the cursor
                    lands so the right pane keeps up)
  →               — expand collapsed folder; jump to first child if
                    already expanded; no-op on leaves
  ←               — collapse expanded folder; otherwise jump to parent
  Enter / Space   — preview file / toggle folder
  Home / End      — first / last visible row

Bails out cleanly when focus is in an input/textarea/contenteditable
or when a modal / context menu is open, so it doesn't fight existing
filter typing, YAML editor, or the right-click menu's own keys. Any
modifier (Ctrl/Cmd/Alt) lets the browser shortcut through unchanged.

Selection updates scroll the now-current row into view via
scrollIntoView({block:'nearest'}). Tree module gains a visibleIds
export so events.js can walk the same filtered+expanded order the
renderer uses.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 08:21:47 -05:00
..
accept-transmittal.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
app.js feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
create-transmittal.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
download.js refactor: virtual file extensions for subtree zip + MD conversion 2026-05-14 12:23:37 -05:00
events.js feat(browse): keyboard navigation in the file tree 2026-05-18 08:21:47 -05:00
grid.js feat(zddc): Phase 4b — grid mode driven by cascade default_tool 2026-05-11 16:15:25 -05:00
hovercard.js feat(browse): extension chip under tree icon + archive refs in hovercard 2026-05-18 08:18:01 -05:00
init.js feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
loader.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
plan-review.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
preview-markdown.js refactor: virtual file extensions for subtree zip + MD conversion 2026-05-14 12:23:37 -05:00
preview-yaml.js feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
preview.js feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
stage.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
tree.js feat(browse): keyboard navigation in the file tree 2026-05-18 08:21:47 -05:00
upload.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00