Skip to content

Put a session's status on its title line - #15

Merged
tdwd merged 2 commits into
mainfrom
session-card-status
Sep 18, 2026
Merged

tdwd merged 2 commits into
mainfrom
session-card-status

Conversation

@tdwd

@tdwd tdwd commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

The sidebar card spent a third of its height on a line saying "Idle" beside a dot already saying it. The glyph moves to the title line and that row goes.

before                          after

▌ ◉ ← was here                  ▌ ● task number 2
▌ task number 2                 ▌ ⑂ session/quiet-otter-abcd
▌ ⑂ session/quiet-otter-abcd      ○ task number 1
▌ ◉ Idle                          ⑂ session/quiet-otter-abcd
  task number 1                   ◆ task number 0
  ⑂ session/quiet-otter-abcd      ⑂ session/quiet-otter-abcd
  ◉ Idle                          ✉ 2  ⊙ 3

The glyph set had to change

Idle and working were both ◉, told apart by accent against muted. That was a hint while the word sat beside it. Without the word it would have been the whole answer, and a colour is not one — a low-contrast theme flattens it, and a reader who cannot separate two hues never had it.

before after
working ◉ ●
idle ◉ ○
needs you ◆ ◆
exited ◍ ✕
closed ○ ·

Filled is busy, hollow is quiet. Closed is a dot so it does not compete with idle, and a dead process is a cross because it is not a degree of running. TestStatusGlyphsAreDistinct pins pairwise distinctness and single-cell width — the title line budgets a fixed width for the glyph, so a two-cell one would silently eat a column of every session name.

The third line still exists, conditionally

An exit error and the mail/claim/review badges are facts about a session rather than a restatement of its dot, so they still earn a row. Most cards have none of them.

statusOf now returns a struct rather than a fourth return value — form.update grew to four and docs/architecture.md records what that cost. The new detail field carries an exit error to whichever caller has room for it.

A regression this change introduced, and caught

Moving the error out of label dropped it from the dashboard row too, where it had been shown as Exited: <err>. sessionLine now joins detail back to the label, so that view is unchanged.

Second commit

^g j/k was labelled "next / previous session". Sessions sort newest-first (store/query.go:79), so j moves down the list to an older session — "next" was the false claim, not the binding. It now says "down / up the session list". The keys are untouched: j is down, which is what every vim user expects.

Stale, and I cannot fix it

assets/deck-dashboard.png and assets/deck-codex.png show three-line cards with the old glyphs. Per CLAUDE.md those are photographed by hand against make demo, not generated, so they need a human with a terminal.

They were labelled "next / previous session". Sessions sort newest-first
(store/query.go:79), so j moves down the list to an older session — which
reads as going backwards, and "next" is what made it read that way.

The binding is not the problem and is untouched: j is down, which is what
the arrow keys and every other TUI agree on. Only the claim changes.
The sidebar card spent a third of its height on a line that said "Idle"
beside a dot already saying it. The glyph moves up to the title line and
that row goes, so a quiet session is two lines instead of three — and most
sessions in a sidebar are quiet ones.

The glyph set had to change for this to lose nothing. Idle and working
were both ◉, told apart by accent against muted. That was a hint while the
word sat next to it and would have been the whole answer without it, and a
colour is not an answer: a low-contrast theme flattens it and a reader who
cannot separate two hues never had it. Filled is busy, hollow is quiet,
closed is a dot so it does not compete with idle, and a dead process is a
cross because it is not a degree of running.

  ● working   ○ idle   ◆ needs you   ✕ exited   · closed

TestStatusGlyphsAreDistinct is the regression: pairwise distinct, and one
cell each, because the title line budgets a fixed width for the glyph.

The card still grows a third line for what a glyph cannot say — an exit
error, and the mail, claim and review badges. Those are facts about a
session rather than a restatement of its dot.

statusOf returns a struct rather than a fourth value. form.update grew to
four and the architecture doc records what that cost; detail is the field
that carries an exit error to whichever caller has room for it. The
dashboard row joins it to the label as before, so nothing is lost there —
that regression was in this change until it was caught.

Both card tests were checked by making the third line unconditional. Both
fail.
@tdwd
tdwd force-pushed the session-card-status branch from 9b8244d to 48fc7b2 Compare September 18, 2026 14:22
@tdwd
tdwd merged commit 0224562 into main Sep 18, 2026
3 checks passed
@tdwd
tdwd deleted the session-card-status branch September 18, 2026 15: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