GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(tui): roll over compact counts to M at 999,950 by Hotragn · Pull Request #48969 · anomalyco/opencode

Conversation

@Hotragn

@Hotragn Hotragn commented Sep 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #55256

Type of change

  • Bug fix

What does this PR do?

Locale.number() formats the thousands value with toFixed(1), so any count from 999,950 to 999,999 rounds to 1000.0 and renders as 1000.0K. The >= 1000000 branch 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 as 1.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 as 999.9K, 999,950 and 999,999 now format as 1.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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added the needs:issue label Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

⚠️ Duplicate found:

PR #47523: fix(tui): roll over compact counts to M at 999,950

  • fix(tui): roll over compact counts to M at 999,950 #47523

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Hotragn

Hotragn commented Sep 14, 2026

Copy link
Copy Markdown
Author

Same as above — the body links Closes #33947 (open); the needs:issue label appears to have landed before the description was saved.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Hotragn

Hotragn commented Sep 16, 2026

Copy link
Copy Markdown
Author

Confirming the flag: #47523 is mine and is the same fix targeting dev. This one targets v2 per that branch's AGENTS.md. locale.ts is identical on both branches, so the diff matches — happy to close the dev one if you'd prefer a single PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Hotragn Hotragn mentioned this pull request Sep 19, 2026
fix(core): evaluate permissions for commands the scanner cannot decompose #49954
Closed
3 tasks done
@Hotragn
Hotragn force-pushed the compact-number-v2 branch from f62f037 to d47d8f4 Compare September 30, 2026 05:20
@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:08
@github-actions github-actions Bot removed the needs:issue label Oct 10, 2026
@Hotragn
fix(tui): roll over compact counts to M at 999,950
7cedbf3
@Hotragn
Hotragn force-pushed the compact-number-v2 branch from d47d8f4 to 7cedbf3 Compare October 13, 2026 08:00
@Hotragn Hotragn mentioned this pull request Oct 13, 2026
tui: compact number formatter shows "1000.0K" instead of "1.0M" between 999,950 and 999,999 #55256
Closed
@github-actions

github-actions Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Oct 14, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Oct 14, 2026
@argszero argszero mentioned this pull request Oct 15, 2026
fix(tui): roll the compact form over to M at the rounding boundary #55871
Merged
3 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

automated-pr-cleanup

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

tui: compact number formatter shows "1000.0K" instead of "1.0M" between 999,950 and 999,999

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Hotragn
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.