Skip to content

fix(tui): dock the new-session + to the Sessions tab - #706

Merged
mohitranka merged 1 commit into
mainfrom
fix/navigator-new-session-plus
Sep 16, 2026
Merged

mohitranka merged 1 commit into
mainfrom
fix/navigator-new-session-plus

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

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 the Files tab and sat under the bar as a whole, so it was ambiguous whether it acted on Sessions, on Files, or on both.

What changed

The cell is now docked to the Sessions tab — sharing that tab's right edge, immediately left of Files — so the row reads:

╭──────────┬─┬─────────────────────╮
│ Sessions │+│        Files        │
╰──────────┴─┴─────────────────────╯

The create verb now reads as acting on sessions, and never on Files.

  • widgets/navigator.rs — new_session_cell anchors to SESSIONS_TAB_WIDTH instead of area.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 and the_drawn_tab_row_carries_the_plus_cell fails 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_soft ground (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 the Files tab now lands on + before reaching Sessions, so reaching Sessions that way takes two presses. Ctrl+1 is 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 the Files tab (the stricter case, since a mis-route there would switch tabs rather than create). cargo fmt --all -- --check and cargo clippy -p forge-tui --all-targets --locked -- -D warnings are clean.

Docs

FORGE-DESIGN.md §7.7 and §9.6 and the shortcut table, plus the README.md key table.

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.
@mohitranka
mohitranka merged commit 6d882f0 into main Sep 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant