Repository navigation
fix(tui): keep the terminal panel beside the workspace in the Tab cycle - #684
Merged
Merged
Conversation
`FocusBlock::ORDER` put `BottomPanel` last, so a conditional block sat on the wrap edge and the panel read as chrome even though `layout.rs` docks it under `files`+`chat` only. Order the cycle by the layout's columns, left to right and top to bottom: TaskStrip, Search, Files, Workspace, BottomPanel, Sidebar, Approval, Composer, Footer. Chrome stays last, and conditional blocks stay inside their own group so the Tab-press count between always-available blocks never changes with the panel's open state. Correct the documentation that disagreed with the code: 8.3 claimed plain left/right arrows switch tabs within a block (no block implements that; the navigator tabs are Ctrl+1/Ctrl+2 and Ctrl+E flips them in a repository), 7.7 claimed Tab/Enter switch tabs and that left-arrow opens the collapsed Sessions panel, and the Composer help hint promised Tab would reach the panel from the footer. Update the test that pins the cycle.
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
FocusBlock::ORDERputBottomPanellast in theTabcycle.layout.rsdocks the bottom panel underfiles+chat, never under the sidebar, so it is the centre column's second band rather than chrome — and its last position also put a conditional block on the wrap edge, so the number ofTabpresses needed to travel between always-available blocks changed with the panel's open state.New cycle, ordered by the layout's columns left to right and top to bottom inside each column, chrome last:
Approvalstill sits in the sidebar group and enters the cycle only while a decision is pending.Docs
The design doc and one help hint disagreed with the code, so they are corrected in the same change:
←/→as "previous/next tab within a block". No block implements arrow tab switching: navigator tabs areCtrl+1/Ctrl+2in repository mode andCtrl+Eflips them; plain arrows keep their in-block meaning (session cursor, tree collapse/expand, footer chip, composer caret, PTY pass-through). The frontmatterprevious-tab/next-tabkeys said the same thing.Tab/Enter" —Tabis block cycling andEnterattaches the selected session — and that←opens the collapsed Sessions panel, which is a display-only chip.F1hint promisedTabwould reach the panel next; it now reads "Footer, then Sessions".Tests
tab_cycles_visible_blocks_and_skips_hidden_onesnow pins the new forward walk fromWorkspace:BottomPanel → Sidebar → Composer → Footer → wrap to Sessions → Search → Files → Workspace.Local results on this machine:
cargo test --package forge-tui --locked→ 1290 passed / 5 failed,cargo fmt --all -- --checkclean,cargo clippy --package forge-tui --all-targets -- -D warningsclean.The 5 local failures are host-environmental and unrelated to this change (this host refuses sandbox confinement, which breaks the
app::tests::tasks::*background-task tests pluschrome::completed_turn_renders_unfinished_checks_without_claiming_failureandturn::responsiveness_tests::tui_runtime_keeps_processing_while_a_tool_runs); neither of the latter two files contains aKeyCode::Tab, andFocusBlock::ORDERis read only by the cycle logic. 68/68 focus tests pass. CI is the authoritative run.Arrow-key travel between panes (including a tab-row interaction) is deliberately out of scope: it needs a design decision and is left for a follow-up PR.