Skip to content

fix(billing): correct remaining credits calculation and remove fracti…#21

Merged
LingwalAnkit merged 1 commit into
mainfrom
minorUIFixes
May 31, 2026
Merged

fix(billing): correct remaining credits calculation and remove fracti…#21
LingwalAnkit merged 1 commit into
mainfrom
minorUIFixes

Conversation

@LingwalAnkit

Copy link
Copy Markdown
Collaborator

…on formatting

  • Update SubscriptionCard and CreditsUsageCard to compute remaining credits dynamically (purchased + bonus - spent - refunded - held) so that free bonus credits are correctly included in the remaining balance.
  • Remove / {totalCredits} fraction rendering from both components, displaying only the remaining credits count.

…on formatting

- Update SubscriptionCard and CreditsUsageCard to compute remaining credits dynamically (purchased + bonus - spent - refunded - held) so that free bonus credits are correctly included in the remaining balance.
- Remove / {totalCredits} fraction rendering from both components, displaying only the remaining credits count.
Copilot AI review requested due to automatic review settings May 31, 2026 17:23
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
waysorted-web Ready Ready Preview, Comment May 31, 2026 5:24pm

Copilot AI 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.

Pull request overview

This PR updates settings billing UI cards so displayed remaining credits include purchased and bonus credit accounting, and removes the previous / total fraction display.

Changes:

  • Computes remaining credits from both DB-reported availability and lifetime wallet fields.
  • Displays only the remaining credit count with “credits left”.
  • Applies the same credit-display behavior across subscription and credits usage cards.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/settings/components/SubscriptionCard/index.tsx Updates remaining credit calculation and simplifies the credits summary text.
app/settings/components/CreditsUsageCard/index.tsx Mirrors the same remaining credit calculation and display simplification in the usage card.

@LingwalAnkit LingwalAnkit merged commit 0ff88cb into main May 31, 2026
3 checks passed
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.

2 participants