Skip to content

Carry compact volume labels into the next unit at 1,000 - #72

Merged
seanxwzhang merged 1 commit into
longsurf-ai:mainfrom
Bortlesboat:fix-compact-unit-rounding
Oct 30, 2026
Merged

seanxwzhang merged 1 commit into
longsurf-ai:mainfrom
Bortlesboat:fix-compact-unit-rounding

Conversation

@Bortlesboat

@Bortlesboat Bortlesboat commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Locale.compact and Locale.volume choose the unit before rounding, so values just under a boundary render as "1,000.0K" (e.g. a 999,960 volume histogram tag) or "1,000.0M" instead of "1.00M" / "1.0B". The unit thresholds now start at 999.95K and 999.95M, the point where the smaller unit would round to 1,000. Added cases to common/chart-core/tests/unit/locale.test.ts that fail on main and pass with the fix; npm test and npm run typecheck in common/chart-core pass (994 tests).


Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@seanxwzhang
seanxwzhang enabled auto-merge (squash) October 30, 2026 18:23
@seanxwzhang
seanxwzhang merged commit 8109466 into longsurf-ai:main Oct 30, 2026
6 checks passed
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.

2 participants