fix(shell): correct /usage remaining quota display#2078
Merged
Conversation
wbxl2000
force-pushed
the
codex/fix-usage-remaining-quota
branch
2 times, most recently
from
April 26, 2026 11:34
c30ed8b to
4cdba33
Compare
Collaborator
Author
Collaborator
Author
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
wbxl2000
force-pushed
the
codex/fix-usage-remaining-quota
branch
from
April 26, 2026 12:14
4cdba33 to
1ff7623
Compare
wbxl2000
force-pushed
the
codex/fix-usage-remaining-quota
branch
from
April 26, 2026 12:25
1ff7623 to
433e378
Compare
Collaborator
Author
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
This was referenced Apr 26, 2026
Closed
DaviRain-Su
added a commit
to DaviRain-Su/kimi-cli
that referenced
this pull request
Apr 27, 2026
fix(shell): correct /usage remaining quota display (MoonshotAI#2078)
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
Fixes #2019.
This updates
/usageso the displayed% leftlabel, progress bar fill, and warning color all use the remaining quota ratio consistently. High remaining quota now renders as green/full, while near-exhausted quota renders yellow or red.Thanks to #2039, #2046, and #1411 for the related reports and proposed fixes that helped converge on the behavior here.
Changes
_ratio_colorthresholds to treat low remaining quota as dangerous.Tests
uv run ruff check src/kimi_cli/ui/shell/usage.py tests/ui/test_usage.pyuv run ruff format --check src/kimi_cli/ui/shell/usage.py tests/ui/test_usage.pyuv run pytest tests/ui/test_usage.pymake check-kimi-cliNote:
make check-kimi-cliexits 0.ty checkis non-blocking in the Makefile and still reports existing repo-wide diagnostics unrelated to this change.