Repository navigation
Conversation
…velBy "pace", off by default: plenty to spare is good, on track is warning, faster than it refills is low, and a row without a pace keeps the share left; the toast after a reply still goes by the share left
…use is good, so an untouched limit at the start of its window is no longer a warning
leinardi
marked this pull request as ready for review
October 16, 2026 10:52
… first tenth follows the share left, so a nearly used-up limit is still red early in its window
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.
Summary
An opt-in setting,
colors.levelBy, that lets the level colors (bars, and the percents and other roles set tobar) follow each limit's pace instead of the share left. This is a draft to show what I had in mind in #327. Happy to change the name, the defaults or the approach.With
colors.levelBy: "pace", it uses the pacepaceOf()already computes for "runs out in" and the even-use mark:good: at or under even use. An untouched limit at the start of its window is green, not yellow: even use still leaves about 100% there, so it reads as on track.warning: up to 5 points faster than even use (the on-track band, on the faster side).MIN_ELAPSED_SHARE): too early for pace to mean much, so the row follows the share left, and a nearly used-up limit is stilllow.low: more than 5 points faster than even use.colors.warningBelow/colors.lowBelow).What it does not change:
"left"stays the default, so nothing changes unless you turn it on.toast.afterReply: "low") still goes by the share left; with pace it would fire far more often.How:
rowFacts()already computes the pace, so it addspaceLevelto the facts;withPaceLevel()puts it on the segments that carry apercent;levelColor()/roleColor()/segmentColor()use it whendisplay.levelByis"pace". Every TUI surface colors through those, so the sidebar, collapsed sidebar, status line, toasts and the Limits tab all follow. The setting is on the Colors tab as Bar colors follow and indocs/readme/configuration.md.Linked Issue
Refs #327
OpenCode Validation
Before-and-after evidence
The screenshots use made-up demo data (a local-only patch, not part of this PR), so no real accounts show. Same configuration, model, theme and window size; the only difference is
colors.levelBy.Note
The screenshots were taken before 70d096e, which changed the first tenth of a window to follow the share left. The one row it affects is Z.ai 5h (85% left, 12 minutes in): it now shows green under
pace, not yellow.left(before)pace(after)On the Limits tab, "on track" can be green or yellow: green at or above the
┃even-use mark, yellow a little below it.Before (
colors.levelBy: "left", today's behavior):After (
colors.levelBy: "pace"):Surface checks:
/quotaLimits tab: changes with the setting, screenshots above.segmentColor), not captured; the toast colors are covered bytests/tui.toast-colors.test.ts. I can add screenshots if you want them./quotaUsage, Plugin and Settings tabs: unchanged, apart from the new Bar colors follow line on Colors.show/status: Not applicable, no colors.Quality Checklist
pnpm verify