Skip to content

fix: display session revenue in currency units - #425

Open
bm1016bm-svg wants to merge 1 commit into
Openpanel-dev:mainfrom
bm1016bm-svg:codex/fix-session-revenue-display
Open

fix: display session revenue in currency units#425
bm1016bm-svg wants to merge 1 commit into
Openpanel-dev:mainfrom
bm1016bm-svg:codex/fix-session-revenue-display

Conversation

@bm1016bm-svg

@bm1016bm-svg bm1016bm-svg commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • convert session revenue from stored cents before rendering
  • use the existing locale-aware currency formatter in all three affected views

Validation

  • pnpm --filter start typecheck

Fixes #422

Summary by CodeRabbit

  • Bug Fixes
    • Improved revenue displays across profile results and session views.
    • Revenue values are now consistently formatted as currency, including correct conversion from stored minor units.
    • Updated session tables and session details to use the same currency formatting for clearer, more accurate financial information.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c7e5ebf-7ddc-4261-977d-dcd8a10b49cb

📥 Commits

Reviewing files that changed from the base of the PR and between f72310c and a207e85.

📒 Files selected for processing (3)
  • apps/start/src/components/chat/tool-results/chat-profile-result.tsx
  • apps/start/src/components/sessions/table/columns.tsx
  • apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx

📝 Walkthrough

Walkthrough

Revenue rendering in the chat profile, sessions table, and session detail views now uses useNumber().currency() with cent-to-dollar scaling. The session detail route also reorders its React Query imports.

Changes

Revenue display formatting

Layer / File(s) Summary
Apply currency formatting to revenue surfaces
apps/start/src/components/chat/tool-results/chat-profile-result.tsx, apps/start/src/components/sessions/table/columns.tsx, apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx
Adds useNumber() and formats revenue with number.currency(revenue / 100) in all three rendering paths. The session detail route also reorders React Query imports.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: rendering session revenue in currency units.
Linked Issues check ✅ Passed The PR updates all three reported revenue render sites to divide by 100 and use the shared currency formatter.
Out of Scope Changes check ✅ Passed The changes stay focused on revenue display fixes across the affected session views.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bm1016bm-svg
bm1016bm-svg marked this pull request as ready for review July 30, 2026 09:24
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.

Session views render revenue 100x too high (missing / 100)

2 participants