feat(tui): arrow+Enter+Esc navigation for all screens #120

Merged
claude-desktop merged 1 commit from tui/tab-nav-118 into main 2026-04-12 21:15:49 +00:00
Collaborator

Summary

  • Screen::handle() returns booltrue = consumed, prevents global keybinds from firing
  • Esc at app level focuses sidebar when no screen consumes it (the "go back" key)
  • Up/Down navigate fields in Generate screen (not just Tab)
  • Unrecognized keys pass through — global shortcuts (q, ?, Ctrl+C) work from any screen that doesn't use that specific key
  • Gallery: Esc in detail closes detail; Esc in grid focuses sidebar
  • Settings: Esc in edit mode cancels; Esc in navigate mode focuses sidebar
  • App::navigate() made public for test setup

Navigation model

Esc = go back one level (edit → field, screen → sidebar)
Up/Down = navigate within current widget
Enter/Right = go deeper / select
Left = go back (where applicable)
Tab = next field, BackTab = previous field

Closes charles/loom#118

Test plan

  • 195 tests pass (174 unit + 21 integration)
  • clippy clean
  • Manual: Esc on any screen focuses sidebar, arrows navigate sidebar, Enter returns to screen
  • Manual: Generate Up/Down moves between fields
  • Manual: q and ? work from Gallery/Settings/Entities (global shortcuts pass through)

🤖 Generated with Claude Code

## Summary - `Screen::handle()` returns `bool` — `true` = consumed, prevents global keybinds from firing - **Esc** at app level focuses sidebar when no screen consumes it (the "go back" key) - **Up/Down** navigate fields in Generate screen (not just Tab) - **Unrecognized keys pass through** — global shortcuts (`q`, `?`, `Ctrl+C`) work from any screen that doesn't use that specific key - Gallery: Esc in detail closes detail; Esc in grid focuses sidebar - Settings: Esc in edit mode cancels; Esc in navigate mode focuses sidebar - `App::navigate()` made public for test setup ### Navigation model ``` Esc = go back one level (edit → field, screen → sidebar) Up/Down = navigate within current widget Enter/Right = go deeper / select Left = go back (where applicable) Tab = next field, BackTab = previous field ``` Closes charles/loom#118 ## Test plan - [x] 195 tests pass (174 unit + 21 integration) - [x] clippy clean - [ ] Manual: Esc on any screen focuses sidebar, arrows navigate sidebar, Enter returns to screen - [ ] Manual: Generate Up/Down moves between fields - [ ] Manual: `q` and `?` work from Gallery/Settings/Entities (global shortcuts pass through) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(tui): intra-screen Tab navigation for entities and model browser
Some checks are pending
QA / qa (pull_request) Waiting to run
558f8aec32
Tab now cycles between widget groups within screens instead of
toggling sidebar focus. Screens that handle Tab internally consume
the event, preventing the global handler from also firing.

- Entity screen: Tab cycles KindColumn → ListColumn → Detail → sidebar
- Model browser: Tab cycles SourceTabs → SearchInput → ResultsList → sidebar
- Generate/settings screens: Tab consumed to prevent sidebar conflict
- Screen::handle() returns bool to signal event consumption
- Visual focus indicators (LightCyan/DarkGray borders) on focused panes
- FocusSidebar action emitted when Tab wraps past last screen element
- Sidebar handles Tab directly to return focus to main content

Closes charles/loom#118

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
charles force-pushed tui/tab-nav-118 from 558f8aec32
Some checks are pending
QA / qa (pull_request) Waiting to run
to 8daea245f4
Some checks failed
QA / qa (pull_request) Failing after 2m13s
2026-04-12 19:45:24 +00:00
Compare
claude-desktop changed title from feat(tui): intra-screen Tab navigation for entities, model browser, generate to feat(tui): arrow+Enter+Esc navigation for all screens 2026-04-12 19:45:46 +00:00
claude-desktop deleted branch tui/tab-nav-118 2026-04-12 21:15:50 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom!120
No description provided.