Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: PR #47523: fix(tui): roll over compact counts to M at 999,950 This is the exact same fix addressing the same issue—rolling over compact number formatting to display "M" at the 999,950 threshold instead of showing "1000.0K". Since PR #47523 already exists with identical scope and solution, PR #48969 appears to be a duplicate. |
|
Same as above — the body links |
|
Confirming the flag: #47523 is mine and is the same fix targeting |
f62f037 to
d47d8f4
Compare
d47d8f4 to
7cedbf3
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #55256
Type of change
What does this PR do?
Locale.number()formats the thousands value withtoFixed(1), so any count from 999,950 to 999,999 rounds to1000.0and renders as1000.0K. The>= 1000000branch never gets a chance to promote it, because the count itself is still under a million. It shows up in the TUI context indicator on ~1M token context models, e.g.1000.0K (100%).Rolling over at 999,950 — the point where one-decimal rounding first reaches
1000.0K— makes those values render as1.0M. Nothing below that boundary changes.How did you verify your code works?
Added a case to
packages/tui/test/util/locale.test.ts: 999,949 still formats as999.9K, 999,950 and 999,999 now format as1.0M, plus the plain/K/M cases so the fix can't regress them. 3/3 pass in that file.No screenshot — reproducing it in the UI needs a session grown to ~999,950 tokens, so the boundary is covered by the unit test instead.
Checklist