feat(tui): open on the token meter, and let the legend name every model - #1058
Merged
Conversation
Four changes to the ambient panel, all about the meter being readable when you first meet it. Default mode is the token meter. An absent setting means "never asked" — which covers a fresh install and an upgrade from before the panel had modes alike — and the meter answers a question where the animation is ambience. Anyone who has actually picked a mode keeps it. The legend may now take every row above a three-row graph floor, instead of being capped at a third of the panel. That cap meant one legend row on a short panel, so most series collapsed behind a "+N" and their colors named nothing, while rows sat unused. Naming a series costs one row; not naming it makes its band unreadable. The series palette grows from 6 colors to 10, so the "other" collapse is reached far less often. That palette is the real limit on how many models a legend can name: listing more names than there are distinguishable colors would produce rows nobody could match to a band. Rates keep three states apart that integer division had collapsed to two: `idle` (never computed), `0/s` (computed, produced nothing), and `<1/s` (produced less than a token per second). The previous code reported a genuine zero as `<1/s`, claiming output that did not exist.
The mode default only bit once someone expanded the panel, so a fresh install still met an empty strip. Same "absent means never asked" reading as the mode itself: a client that has collapsed the panel has that recorded and keeps it.
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.
Follow-ups on the token meter (#1057), all about it being readable when you first meet it.
Default mode is the token meter
A client with no recorded choice now opens on the meter rather than the rain. An absent setting means "never asked" — which covers a fresh install and an upgrade from before the panel had modes at all — and the meter answers a question where the animation is ambience. Anyone who has actually picked a mode keeps it, since that choice is persisted.
Note: the panel itself still defaults to collapsed (
matrix_rain_hidden: true, unchanged and long-standing), so on a fresh install this only takes effect once the panel is expanded. Say the word if you want the panel open by default too — that's a separate one-line change with a much bigger first-run footprint.The legend can name every model
Two limits were cutting it short:
Row cap. The legend was capped at a third of the panel (
clamp(h/3, 1, 4)), which is where the "max 4 items" came from — on a 14-row panel that's 4 rows, one entry each. It now takes every row above a three-row graph floor. Three is the least that still reads as a graph rather than a stripe. Naming a series costs one row; not naming it makes its band unreadable, so the trade goes that way until the floor is reached, and only then does the legend truncate.Palette. 6 series colors → 10, so the collapsed
other (N)row is reached far less often. This one can't be removed outright: the palette is the real limit on how many models a legend can name, because listing more names than there are distinguishable colors produces rows nobody can match to a band.Seven models on a 14-row panel — all named, no
+N, no collapse:A 7-row panel — graph holds its 3-row floor, legend gets the other 3:
Bug: a genuine zero reported as
<1/srecent_ratereturned an integer, so "computed but produced nothing" and "produced less than a token per second" both arrived asSome(0)and rendered<1/s— claiming output that didn't exist. It's fractional now, and the three states stay distinct:idle(never computed),0/s(computed, produced nothing),<1/s(produced very little). Both snapshots above show the corrected0/s.Test note
matrix_rain_paints_browser_preview_wallpapercounts cells with an Rgb background on the premise that "the rain only ever sets fg" — which the meter's stacked-boundary cells violate. It's testing the rain body specifically, so it now pins the mode explicitly rather than relying on the default.Specs
0019— records which mode a client with no recorded choice opens on.0167— graph floor vs. legend rows, the palette as the naming limit, and the three rate states.Binaries
Touches
crates/clionly → the binary isconstruct.