Skip to content

tui: draw session tree rails in full mode only - #1159

Merged
edwin-zvs merged 3 commits into
mainfrom
compact-mode-no-rails
Aug 2, 2026
Merged

tui: draw session tree rails in full mode only#1159
edwin-zvs merged 3 commits into
mainfrom
compact-mode-no-rails

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Change

Tree rails become a full-mode affordance. Compact mode indents by exactly the
width the rails would have occupied, so hierarchy still reads and no column
downstream moves.

compact                          full
──────────────────────────       ──────────────────────────
  ● Prepare Patch Release          ● Prepare Patch Release
▼ ● Session Statuses ⑂2            – 14s ago – …
  ⑂ ● No Nested Session
  ⑂ ● Has A Nested Fork          ▼ ● Session Statuses ⑂2
     ⑂ ● Grandchild Fork           – 16s ago – …

                                 ├─⑂ ● No Nested Session
                                 │    – 14s ago – …
                                 │
                                 └─⑂ ● Has A Nested Fork
                                      – 15s ago – …

Why

The two modes have different problems to solve. Compact packs its rows with
nothing between them, so depth alone already carries the hierarchy — the rails
are ink in the view whose entire purpose is density. Full mode breaks each
session into a title row, a detail row, and a spacing row; without a
continuous rail a child stops reading as attached to its parent across that
gap, which is exactly what the rails were introduced for in #1156.

Archived-children rows follow the same rule, so nothing in the list draws a
rail compact mode doesn't.

Screenshots

Compact, main on top and this branch below — same fleet, same width. The
marks, the disclosure, and every title stay in their columns; only
the rails go.

compact before/after

Full mode on this branch, unchanged — rails still run through the detail and
spacing rows:

full

Compact, full frame

compact

Tests

  • New test asserts the compact prefix is blank at every depth and the same
    display width as the full-mode prefix it replaces, so dropping the rails can
    never shift a row.
  • The existing rail test now pins full mode explicitly.
  • cargo test --workspace green.

Relevant binary: construct (this PR only touches crates/cli).

Compact mode packs its rows with nothing between them, so the two-cell
indentation step already reads as hierarchy and the rails are ink the
densest view can't afford. Full mode keeps them: its cards are broken up
by detail and spacing rows, and without a continuous rail a child stops
looking attached to its parent. Compact indents by exactly the width the
rails would have occupied, so switching modes moves no column.
@edwin-zvs
edwin-zvs merged commit ec005b5 into main Aug 2, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the compact-mode-no-rails branch August 2, 2026 06:51
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