feat(tui): lay the token meter legend out in aligned columns - #1063
Merged
Conversation
Two readability fixes to the meter's legend, both about a row that names a band in the graph above it. The legend flowed entries end-to-end, so each row started its names at a different offset. With a handful of models on a narrow panel the dots and names scattered into a block of text with no line to read down. It now lays out as a grid of equal-width cells sized to the widest entry, so column n starts at the same x on every row and the legend scans vertically — the way a list of models is read. A cell never spills into its neighbour, since one long name shifting the column below it undoes the alignment. The cost is trailing space inside narrower cells, and occasionally one more row. And `idle` now dims by attribute on the model's own color rather than blending toward the neutral gray. Half-graying the word made a quiet model's row stop pointing at its band; only the weight should change. Spec 0167 updated for both.
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.
Two legend readability fixes, both about a row that names a band in the graph above it.
Aligned columns
The legend flowed entries end-to-end, so every row started its names at a different offset. Past a handful of models the dots and names scattered into a block of text with no line to read down.
It now lays out as a grid of equal-width cells, sized to the widest entry, so column n starts at the same x on every row:
(That block is the layout code's own output for a 64-column panel, printed from a throwaway test — not a screenshot. Seven models at once is hard to stage in a demo daemon; the alignment is what the diff is about.)
Tradeoffs taken deliberately:
Σfleet total off a full row; the slack at the right edge is where it lives.+N.idlekeeps the model's colorFollow-up to #1061, which dimmed
idleby blending 70% toward the neutral gray. Half-graying the word made a quiet model's row stop pointing at its band. It now uses the model name's exact color withModifier::DIM, so only the weight changes.IDLE_RATE_DIMand theblend_colorcall are gone.Testing
cargo test --workspacegreen (0 failures). New/updated unit tests cover column alignment, the row budget, the one-column floor, and the idle style keeping itsfgwhile gainingDIM.Spec 0167 updated for both decisions.
Binaries
Only
crates/clichanged → the relevant binary isconstruct:/Users/moon/agentd/.claude/worktrees/idle-rate-same-color/target/debug/construct