Skip to content

Improve billing plan and usage UX - #295

Merged
alwaysmavs merged 1 commit into
mainfrom
codex/optimize-billing-plan-usage-ui
Aug 2, 2026
Merged

Improve billing plan and usage UX#295
alwaysmavs merged 1 commit into
mainfrom
codex/optimize-billing-plan-usage-ui

Conversation

@alwaysmavs

Copy link
Copy Markdown
Contributor

Summary

Improve the plans and usage experience so users can distinguish Team collaboration features from personal usage balance, reach the correct action quickly, and scan billing information without unnecessary visual weight.

Problem

The billing popover gave plan selection a large, generic call to action regardless of account state while the higher-frequency balance top-up path was less visible. The inactive Team status also looked like a primary button, plan copy did not clearly explain what Team plans unlock or how they differ from usage credits, and the footer wrapped a button in a padded container that consumed disproportionate height.

The billing details page compounded the issue by placing additional seats and personal usage side by side. That constrained the usage summary, forced metric labels to truncate, and devoted a large area to a balance progress bar whose denominator was not visible to users. The progress bar was based on current credit divided by original credit, which did not communicate when a user actually needed to top up.

Changes

  • Make the Team plan card state-aware and fully clickable for plan actions.
  • Add explicit upgrade, payment, and seat-management labels while keeping status badges semantically subordinate to real actions.
  • Explain that Team plans cover shared connected accounts, collaboration, members, and permissions while model, API, and connector spend remains in the personal usage account.
  • Correct connected-provider counts from the misleading shared-connections label to connected apps.
  • Promote top-up to a clear action beside the personal usage account.
  • Remove the ambiguous original-credit progress bar and present balance, coverage days, period spend, and daily average directly.
  • Replace the padded footer/button combination with one compact, fully clickable details row.
  • Stack additional seats and usage panels on the details page, then use a responsive one-large/three-small usage summary that preserves full metric labels.
  • Keep Team Pro free of an invalid upgrade action and preserve creator/admin visibility rules.
  • Update Chinese and English copy together.

Validation

  • corepack pnpm run lint
  • corepack pnpm run ts-check
  • corepack pnpm run test (283 test files, 2134 tests)
  • git diff --check

The popover tests cover inactive-plan navigation, Team Plus upgrades, Team Pro behavior, top-up routing, compact details navigation, removal of the credit progress bar, plan-copy boundaries, and the muted inactive status treatment.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Summary by CodeRabbit

  • New Features
    • Redesigned billing and usage views with clearer balance, coverage, and average-spend information.
    • Added convenient top-up access and a persistent “View details” action.
    • Improved plan cards with current-plan status, recommendations, upgrade options, and navigation.
    • Clarified personal versus shared account spending and collaboration plan information.
  • Localization
    • Updated English and Chinese billing terminology, plan descriptions, and action labels for greater clarity.

Walkthrough

The billing popover now shows plan-specific states, funding information, and a persistent view-details footer. Balance views remove percentage-based progress indicators and display coverage and average-spend metadata. The billing route removes obsolete balance calculations and updates the team layout. English and Chinese billing messages now use connected-app and team-plan terminology. Tests cover plan navigation, recharge actions, balance display, and details navigation.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant BillingUsagePopover
  participant PlanSelectionRoute
  participant CreditsRoute
  participant DetailsView
  User->>BillingUsagePopover: Select plan card
  BillingUsagePopover->>PlanSelectionRoute: Navigate to plan selection
  User->>BillingUsagePopover: Select recharge action
  BillingUsagePopover->>CreditsRoute: Navigate to credits
  User->>BillingUsagePopover: Select view-details footer
  BillingUsagePopover->>DetailsView: Invoke onViewDetails
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes the billing UX changes but does not use the required <type>(<scope>): <subject> format. Rename it to a compliant title such as feat(billing): improve plan and usage UX.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly covers the problem, changes, and validation, but it omits the required Safety and Compatibility section.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/optimize-billing-plan-usage-ui

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

@alwaysmavs
alwaysmavs marked this pull request as ready for review August 2, 2026 04:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/i18n/app-messages.en.ts (1)

604-605: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Finish the "shared connections" → "connected apps" rename in the billing subtitle.

This PR renames "shared connections"/"共享连接" to "connected apps"/"已连接 App" in several billing keys, but the page subtitle shown at the top of the Billing route (src/routes/Billing/index.tsx Line 243) still uses the old wording in both locales. The shared root cause is an incomplete terminology rename across the two locale files.

  • src/i18n/app-messages.en.ts#L604-L605: Update billing.subtitle to say "connected apps" instead of "shared connections", matching the renamed billing.teamSharedLinks (Line 740) and billing.popover.sharedLinks (Line 637).
  • src/i18n/app-messages.zh.ts#L578-L578: Update billing.subtitle to say "已连接 App" instead of "共享连接", matching the renamed billing.teamSharedLinks (Line 709).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/app-messages.en.ts` around lines 604 - 605, Update the
billing.subtitle translation in src/i18n/app-messages.en.ts at lines 604-605 to
use “connected apps” instead of “shared connections”, and update
billing.subtitle in src/i18n/app-messages.zh.ts at line 578 to use “已连接 App”
instead of “共享连接”; keep the surrounding billing translations unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/i18n/app-messages.en.ts`:
- Around line 604-605: Update the billing.subtitle translation in
src/i18n/app-messages.en.ts at lines 604-605 to use “connected apps” instead of
“shared connections”, and update billing.subtitle in src/i18n/app-messages.zh.ts
at line 578 to use “已连接 App” instead of “共享连接”; keep the surrounding billing
translations unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1338d2b0-09a6-411f-8201-7fd63e064113

📥 Commits

Reviewing files that changed from the base of the PR and between 0728e35 and ccc667d.

📒 Files selected for processing (6)
  • src/components/app-shell/BillingUsagePopover.test.ts
  • src/components/app-shell/BillingUsagePopover.tsx
  • src/i18n/app-messages.en.ts
  • src/i18n/app-messages.zh.ts
  • src/routes/Billing/BillingUsagePanels.tsx
  • src/routes/Billing/index.tsx

@alwaysmavs
alwaysmavs merged commit 73a6544 into main Aug 2, 2026
3 checks passed
@alwaysmavs
alwaysmavs deleted the codex/optimize-billing-plan-usage-ui branch August 2, 2026 04:25
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