You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show whole credit balances in usage displays - #28887
Credit balances now show whole numbers instead of a long decimal tail.
What Changed
The status bar and usage details share a credit formatter. Round that formatter to whole credits, so 51,809.811786 credits becomes 51,810 credits. Keep locale-specific grouping; the underlying balance stays unchanged.
Why
Long decimals waste space in the status bar. Updating the existing formatter keeps both displays consistent without duplicating rounding logic or reducing the precision of stored balances.
Linked Issue
Reported directly; no linked issue.
Visual Proof
Captured the actual Orca renderer on macOS through Playwright CDP with a seeded balance matching the report, using an isolated profile and a hidden window.
Before:
After:
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Verified the rounded balance in the status bar and opened the Codex usage submenu to verify 51,810 credits available.
All 78 focused tests passed: ORCA_BACKGROUND_LAUNCH=1 pnpm test src/shared/credit-count-format.test.ts src/renderer/src/components/status-bar/provider-segment-balance.test.tsx src/renderer/src/components/status-bar/tooltip.test.ts.
ORCA_BACKGROUND_LAUNCH=1 pnpm tc:web passed.
pnpm run check:code-quality:changed passed.
Formatting and git diff --check passed.
Regression cases cover the reported balance, rounding up and down, the half-credit boundary, whole numbers, and fractional balances below one credit. Full lint, build, and suite are left to CI.
Review
Independent sub-agent review found no actionable issues after tracing both displays and checking rounding boundaries, locale grouping, invalid inputs, unlimited balances, currency isolation, and platform/SSH behavior. The reviewer also ran the formatter tests (8 passed).
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Display-only change using the existing locale-aware formatter. No changes to execution, SSH, folder workspaces, provider APIs, stored balances, or wire formats. Rendered validation ran on macOS; Linux and Windows were not run locally.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: a764bfb4-83bc-4674-84ed-1749cac4dbc2
📥 Commits
Reviewing files that changed from the base of the PR and between 67c17f8 and 11e3528.
📒 Files selected for processing: 2
src/shared/credit-count-format.test.ts
src/shared/credit-count-format.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
📝 Walkthrough
The credit count formatter now limits output to whole numbers. Tests use the default locale formatter and check results for fractional, half-value, and integer inputs.
Priority: ⬇️ Low
Merge Risk:⚪ Minimal · up to 11e35
Balances display as rounded whole credits in both usage surfaces, matching the final behavior shown and tested. No concrete issue remains that should block merging.
Pre-merge checks: 3 · 2
Failed checks: 2 warnings
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check
The description is detailed and covers the required change, rationale, visual proof, testing, review, and checklist. It does not provide the required linked issue and states that no issue exists. It a…
Add a valid linked issue under “Linked Issue” and reconcile the documented behavior with the PR objective and implementation. State consistently whether credit balances display whole numbers or up to two fractional digits.
Passed checks: 3 passed
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Title check
The title clearly summarizes the main change: credit balances now display as whole numbers in usage displays.
Full details: Description check
Explanation
The description is detailed and covers the required change, rationale, visual proof, testing, review, and checklist. It does not provide the required linked issue and states that no issue exists. It also describes whole-number rounding, which conflicts with the stated objective of displaying up to two fractional digits.
Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
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.
ELI5
Credit balances now show whole numbers instead of a long decimal tail.
What Changed
The status bar and usage details share a credit formatter. Round that formatter to whole credits, so
51,809.811786 creditsbecomes51,810 credits. Keep locale-specific grouping; the underlying balance stays unchanged.Why
Long decimals waste space in the status bar. Updating the existing formatter keeps both displays consistent without duplicating rounding logic or reducing the precision of stored balances.
Linked Issue
Reported directly; no linked issue.
Visual Proof
Captured the actual Orca renderer on macOS through Playwright CDP with a seeded balance matching the report, using an isolated profile and a hidden window.
Before:
After:
Testing
Verified the rounded balance in the status bar and opened the Codex usage submenu to verify
51,810 credits available.ORCA_BACKGROUND_LAUNCH=1 pnpm test src/shared/credit-count-format.test.ts src/renderer/src/components/status-bar/provider-segment-balance.test.tsx src/renderer/src/components/status-bar/tooltip.test.ts.ORCA_BACKGROUND_LAUNCH=1 pnpm tc:webpassed.pnpm run check:code-quality:changedpassed.git diff --checkpassed.Regression cases cover the reported balance, rounding up and down, the half-credit boundary, whole numbers, and fractional balances below one credit. Full lint, build, and suite are left to CI.
Review
Independent sub-agent review found no actionable issues after tracing both displays and checking rounding boundaries, locale grouping, invalid inputs, unlimited balances, currency isolation, and platform/SSH behavior. The reviewer also ran the formatter tests (8 passed).
Agent skill upstream boundary
Notes
Display-only change using the existing locale-aware formatter. No changes to execution, SSH, folder workspaces, provider APIs, stored balances, or wire formats. Rendered validation ran on macOS; Linux and Windows were not run locally.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)