Repository navigation
feat(tui): reach the navigator tab row with ↑ and switch tabs there - #691
Merged
Merged
Conversation
The navigator's tab row was pointer-only: `Ctrl+1`/`Ctrl+2` set the tab, and nothing in the keyboard grammar ever touched the row itself. `↑` at the first row of either tab's list now moves onto the row: `←`/`→` switch `Sessions`/`Files`, `Enter`/`↓`/`Esc` step back into the pane the active tab shows, and every other key is inert there, so no session verb fires from a row that covers the list. `↑` keeps its cursor meaning everywhere below the first row, and the inline composer and an open peek still own it first. The row is a sub-focus of the navigator column, not a block: it never enters `FocusBlock::ORDER`, so `Tab`/`Shift+Tab` still cycle blocks from it and it is never a Tab stop. Switching tabs from the row moves `focus.block()` to the pane the tab shows, so no invisible block owns keys, and `normalize_focus` drops the row as soon as the keyboard leaves that pane. `FORGE-DESIGN` §9.6 said the tab bar shows which tab is active, "not which block owns the keyboard". That invariant needs one exception: while the row holds the keyboard both outlines take the L3 accent (the same idiom §9.6 already uses for the focused search field) while the active tab keeps its `accent_soft` ground. §8.3, §8.4 and §7.7 are updated to match, and the pane under the row paints unfocused so exactly one thing on screen claims the keyboard. Tests: reaching the row from the list and from the tree, the cursor still moving below the top row, arrows switching tabs without leaving the row, `↓` handing the keyboard (and the search caret) back, `Tab` cycling from the row, session verbs staying inert, the row clearing when the navigator is left, no row without a repository, and a widget test for the focused outline.
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.
What
The navigator's tab row was pointer-only.
Ctrl+1/Ctrl+2set the tab andCtrl+Eflips the pair, but nothing in the keyboard grammar ever touched the row itself — soSessions | Fileswas a label rather than a control.↑at the first row of either tab's list now moves onto the row.Behaviour
←/→Sessions/Files; the row keeps the keyboardEnter/↓/EscTab/Shift+Tab↑keeps its cursor meaning everywhere below the first row; the inline composer (n) and an open peek (Space) still own↑first.FocusBlock::ORDER, so it is never a Tab stop of its own.focus.block()to the pane the tab shows (TaskStrip/Search), so no invisible block owns keys; the session list / explorer paints as unfocused while the row is up, so exactly one thing on screen claims the keyboard.normalize_focusdrops the row when the keyboard leaves that pane, when the column collapses (narrow layout), or when an overlay opens.↑still reaches the row there; a tree with no selection yet is not, so the very first↑still selects row 0 exactly as before.Design
FORGE-DESIGN§9.6 says the tab bar "shows which tab is active, not which block owns the keyboard". Making the row focusable needs exactly one exception, so this PR takes the smallest signal that cannot be confused with the active tab: while the row holds the keyboard both outlines step to the L3 accent (the same idiom §9.6 already uses for "search focus colours the border") while the active tab keeps itsaccent_softground and hue. No marker glyph, no underline, labels stay centred.Updated: §7.7 (navigator bullet + frontmatter binding), §8.3 (grammar table + prose), §8.4 (L3 list), §9.6 (the exception),
README.md, and theF1help hints for the three navigator blocks.Tests
cargo test --package forge-tui --locked tab_row— reaching the row from the session list and from the tree, the cursor still moving below the top row, arrows switching tabs without leaving the row,↓handing the keyboard (and the search caret) back,Tabcycling from the row, session verbs staying inert, the row clearing when the navigator is left, and no row without a repository.--locked outlines— the widget test for the focused outline, and that the active tab's ground is untouched by it.bd9d12d1:multi_task36,focus71,explorer59,mouse27,navigator20,help8,characterization3.cargo fmt --all -- --checkandcargo clippy --package forge-tui --all-targets --locked -- -D warningsclean.One pre-existing local failure is host noise unrelated to this change (
app::tests::chrome::completed_turn_renders_unfinished_checks_without_claiming_failure, a sandbox/environment issue seen before this branch existed).Authored with Forge.