Repository navigation
fix(tui): dock the new-session + to the Sessions tab - #706
Merged
Merged
Conversation
The `+` cell sat at the far right of the navigator tab row, so it read as acting on the row at large — or on the `Files` tab it shared its left edge with — rather than on sessions. Anchor it to the Sessions tab's right edge, so the row reads `Sessions │+│ Files`, and keep the tab row's keyboard stops matching the eye: `Sessions · + · Files`. The cell still owns its own frame, still never takes a tab's active ground, and is still reachable from either tab without switching tabs, so nothing else about the create verb changes. The old geometry got the cell's List-side joint for free by landing on the row's last column; the divider row now needs that joint re-stamped, which `the_drawn_tab_row_carries_the_plus_cell` pins.
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.
Why
The
+that starts a session sat at the far right of the navigator tab row, as the row's third segment. That made its scope unreadable: it shared its left edge with theFilestab and sat under the bar as a whole, so it was ambiguous whether it acted onSessions, onFiles, or on both.What changed
The cell is now docked to the
Sessionstab — sharing that tab's right edge, immediately left ofFiles— so the row reads:The create verb now reads as acting on sessions, and never on
Files.widgets/navigator.rs—new_session_cellanchors toSESSIONS_TAB_WIDTHinstead ofarea.right(); both tab rects derive from the cell, and both shared joints are stamped.app/render.rs— the list's top border repaints the divider row. The old geometry got the cell's list-side joint for free by landing on the row's last column; the divider row now needs that joint re-stamped. This was a real bug in the first pass of the change andthe_drawn_tab_row_carries_the_plus_cellfails without the fix.app/focus.rs— the row's keyboard stops now match the eye:Sessions · + · Files.Everything else about the cell is unchanged: it still owns its own frame, never takes a tab's
accent_softground (so it still cannot be read as a third tab), and stays reachable and clickable from either tab without switching tabs.Behaviour note
Because the stops follow the geometry,
←from theFilestab now lands on+before reachingSessions, so reachingSessionsthat way takes two presses.Ctrl+1is unchanged. Flagging it since it is the one user-visible cost of the new order.Tests
cargo test -p forge-tui --lib -- widgets::navigator:: app::tests::mouse:: app::tests::multi_task::— 93 pass. Added and updated assertions for the new geometry, including a click test that now runs from theFilestab (the stricter case, since a mis-route there would switch tabs rather than create).cargo fmt --all -- --checkandcargo clippy -p forge-tui --all-targets --locked -- -D warningsare clean.Docs
FORGE-DESIGN.md§7.7 and §9.6 and the shortcut table, plus theREADME.mdkey table.