Skip to content

feat(tui): burn-rate bar coloring and a width-aware name column - #178

Open
lexfrei wants to merge 2 commits into
KarpelesLab:masterfrom
lexfrei:feat/tui-readability
Open

feat(tui): burn-rate bar coloring and a width-aware name column#178
lexfrei wants to merge 2 commits into
KarpelesLab:masterfrom
lexfrei:feat/tui-readability

Conversation

@lexfrei

@lexfrei lexfrei commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Two TUI changes, one commit each.

Bars were colored by raw fill, so a weekly bucket at 85% went red even with six days already elapsed, while a 5h bucket at 60% looked fine after ten minutes. Now the color is based on usage against how much of the reset window has passed: at or under that pace is green, then yellow, orange, red. Bars with an unknown window (the API-key token and request ones) keep the old raw coloring.

The name column was fixed at 12 chars, so long emails were cut even on a wide terminal. Now it grows to the longest name when the row has space and never goes below 12, so narrow terminals look the same as before. This also fixes an old overflow: the bar width did not account for the general-route marker cells or the S7/F7 weekly bars, so those rows could run off the terminal edge and get cut.

The quota bars colored on raw fill, so a weekly bucket at 85% with six
days elapsed screamed red even though it was well under pace, while a
five-hour bucket at 60% with ten minutes elapsed looked calm despite
burning far too fast. Color instead by how far usage runs ahead of the
share of the reset window already elapsed: at or under pace is green,
then yellow, orange, and red as it pulls ahead. Bars whose window is
unknown (API-key token and request buckets) keep the raw-fill coloring.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <3811295@gmail.com>
The name column was hard-capped at twelve characters, so a full email
like a long account name showed as a truncated stub even on a wide
terminal with room to spare. Size the name column against the available
width instead: it grows to the longest account name when the row can
spare the space and still never drops below the old twelve, so a narrow
terminal renders exactly as before while a wide one shows names in full.

Sizing every column together also stops the row from overflowing the
terminal: the width now reserves space for the general-route marker
cells and for the S7/F7 weekly bars, both of which the old bar-width
formula ignored, so a row carrying either could run past the edge and
be cut. The bars share the remaining width, capped as before.

Signed-off-by: Aleksei Sviridkin <3811295@gmail.com>
@lexfrei
lexfrei force-pushed the feat/tui-readability branch from 8994e0f to aa0845c Compare August 19, 2026 11:55
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