Skip to content

fix(usage): show the session user's allowance, not the owner-rollup wallet - #68

Open
eliteprox wants to merge 1 commit into
mainfrom
fix/balance-display-rollup
Open

fix(usage): show the session user's allowance, not the owner-rollup wallet#68
eliteprox wants to merge 1 commit into
mainfrom
fix/balance-display-rollup

Conversation

@eliteprox

Copy link
Copy Markdown
Collaborator

Summary

  • Session balance (Home/Usage, plans, billing included-usage copy) now reads /api/pymthouse/account-usage (me/usage/balance) instead of GET /billing/wallet.
  • The wallet route stays owner_rollup for prepaid credits / top-up; it was painting the shared app-owner balance on every signed-in user.
  • Maps remaining / granted / consumed from the user usage payload (includedUsageSummaryFromBalance).

Test plan

  • Sign in as a console user and confirm Home Balance matches that user's me/usage/balance remaining/granted, not the org wallet.
  • Confirm Plans / Billing included-usage copy uses the same user numbers (plan name from the user's subscription).
  • Confirm Settings Credits / Add funds still load the owner prepaid wallet.
  • Sign-out: sidebar meter stays hidden; account-usage BFF still 401s without a session.

…session management

Updated PlansPanel, SidebarUsageCard, UsageView, and BillingSection components to utilize the new useAccountUsage hook and includedUsageSummaryFromBalance function. This change enhances the handling of user account usage data, improving the accuracy of billing summaries and usage displays. Adjusted related logic to ensure proper state management and error handling across components.
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Sep 8, 2026 9:39pm UTC

Request Review

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.

1 participant