Show plan quotas and token usage in chat + billing UI #72

Merged
westfarn merged 1 commits from feature/plans-quotas-token-usage into master 2026-07-31 04:24:14 -07:00
Owner

Summary

Frontend companion to backend #16 / #17 / #36.

  • Token display (#16): assistant messages show Tokens in … · out …; missing usage renders as (never fabricated 0).
  • Plan + quota UI (#17/#36): Account BillingSection loads GET /finance/subscription/ (plan name, prompt remaining, period tokens). Chat dashboard UsageSummaryBar shows the same snapshot.
  • Backer path: Sign-up skips Stripe checkout when needs_checkout is false.

Requires backend PR on feature/plans-quotas-token-usage.

Test plan

  • With subscribed user: usage bar + billing show plan and prompt remaining
  • Assistant messages with null tokens show ; known counts render numbers
  • Backer signup does not redirect to Stripe
  • Founders signup still starts checkout
  • Jest: BillingSection, ConversationDetailCard, finance helpers pass
## Summary Frontend companion to backend [#16](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/16) / [#17](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/17) / [#36](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/36). - **Token display (#16)**: assistant messages show `Tokens in … · out …`; missing usage renders as `—` (never fabricated 0). - **Plan + quota UI (#17/#36)**: Account `BillingSection` loads `GET /finance/subscription/` (plan name, prompt remaining, period tokens). Chat dashboard `UsageSummaryBar` shows the same snapshot. - **Backer path**: Sign-up skips Stripe checkout when `needs_checkout` is false. Requires backend PR on `feature/plans-quotas-token-usage`. ## Test plan - [ ] With subscribed user: usage bar + billing show plan and prompt remaining - [ ] Assistant messages with null tokens show `—`; known counts render numbers - [ ] Backer signup does not redirect to Stripe - [ ] Founders signup still starts checkout - [ ] Jest: `BillingSection`, `ConversationDetailCard`, `finance` helpers pass
westfarn added 1 commit 2026-07-31 04:22:20 -07:00
Surface plan quotas and token usage in chat and billing UI
Unit Tests / test (pull_request) Successful in 11s
48e18ebd99
Companion to backend #16/#17/#36: show tokens on messages, plan/quota
on Account billing and chat usage bar, skip checkout for Backers.
westfarn merged commit e89ccbbeca into master 2026-07-31 04:24:14 -07:00
westfarn deleted branch feature/plans-quotas-token-usage 2026-07-31 04:24:14 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_web_app#72