Skip to content

feat(tui): pane-ordinal badges link split panes to session-list rows - #1251

Merged
edwin-zvs merged 6 commits into
mainfrom
split-pane-ordinals
Aug 16, 2026
Merged

feat(tui): pane-ordinal badges link split panes to session-list rows#1251
edwin-zvs merged 6 commits into
mainfrom
split-pane-ordinals

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

What

With two or more split panes open, locating a pane's session in the session list (and the reverse) meant reading and comparing titles. This PR gives each pane a 1-based ordinal in layout order, rendered as a single-digit badge (digit over a highlight background) in two places that always agree:

  • Pane title — immediately before the session's status glyph.
  • Session list — in the first column of the row of every session currently visible in a pane.

Design points (recorded in specs/0199-split-pane-ordinal-badges.md):

  • Nothing moves. The badge replaces an existing cell: the reserved marker-gutter cell on depth-0 rows, the first rail/indent cell on nested rows, and a widened title lead-in in the pane title. Glyph/title/harness columns keep their exact positions with or without badges.
  • Brightness tracks focus. The last-focused pane's badge (and its session's list badge) wears the selection colors; every other pane wears the inactive highlight.
  • Single pane → no badges. A lone pane needs no locating aid.
  • Positional numbering. Non-session panes (services, projects, empty) still occupy a slot so a badge always states the pane's on-screen position; group/empty pane titles wear their badge too. A session shown in several panes wears the focused pane's number when it's one of them, else the first in layout order.
  • Ordinals past 9 are not rendered (never widen the badge beyond one cell).

Testing

  • pane_ordinals_follow_layout_order_and_prefer_the_active_pane (app): single-pane empties, layout-order numbering, active-pane preference, slot stability when a pane empties.
  • pane_ordinal_badge_replaces_the_first_cell_without_moving_columns + pane_ordinal_badge_brightness_tracks_the_active_pane (ui): width invariance at every depth, badge-first placement, marker survival on nested rows, >9 fallback, style split.
  • Full workspace cargo test green.

🤖 Generated with Claude Code

@edwin-zvs

Copy link
Copy Markdown
Contributor Author

Demo (after-only — brand-new affordance): three shell sessions, three panes.

pane ordinal badges

What to look for:

  • Pane titles wear 1 / 2 / 3 immediately before the status glyph, in layout order (left, right-top, right-bottom).
  • The list's first column wears the matching digits; the third session (visible in no pane) has no badge and its columns don't move.
  • Panes 1 and 2 show the same session — its row wears 1 (first pane in layout order), while the focused pane 3's badge and its row badge are the bright ones.

Video: pane-ordinals.mp4 (23s — splits being created, then badges appearing as the layout goes multi-pane)

@edwin-zvs

Copy link
Copy Markdown
Contributor Author

Updated per feedback: the pane badge moved from inside the title to on top of the border, at the top-left corner (painted after the pane renders, so every pane — session, service, project, empty — wears it uniformly; all the title-offset math reverted).

corner ordinal badges

Video: pane-ordinals-corner.mp4

With two or more split panes, each pane wears a 1-based layout-order
ordinal as a single-digit badge over a highlight background:

- in the pane title, immediately before the status glyph
- in the first column of the session list row of every visible session

Badges replace an existing cell (the marker gutter on depth-0 rows, the
first rail/indent cell on nested rows) so no column or title offset ever
moves. Brightness tracks the focused pane: its badge wears the selection
colors, others the inactive highlight. A single pane shows no badges.

Spec 0199 records the decision.
…corner

Move the pane badge from inside the title (before the status glyph) onto
the border's top-left corner cell, painted after the pane renders. Every
pane — session, service, project, empty, diff overlay — now wears its
number the same way at its geometric anchor, and the title layout math
(label budget, name hit-rect) reverts to its pre-badge form. Spec 0199
updated.
@edwin-zvs
edwin-zvs force-pushed the split-pane-ordinals branch from 14061c0 to 0275ac4 Compare August 16, 2026 18:23
@edwin-zvs
edwin-zvs merged commit a73477c into main Aug 16, 2026
1 of 3 checks passed
@edwin-zvs
edwin-zvs deleted the split-pane-ordinals branch August 16, 2026 18:40
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