Skip to content

Add credits and top-ups option in settings/billing page#998

Merged
MaheshtheDev merged 9 commits into
mainfrom
account
May 25, 2026
Merged

Add credits and top-ups option in settings/billing page#998
MaheshtheDev merged 9 commits into
mainfrom
account

Conversation

@ved015
Copy link
Copy Markdown
Member

@ved015 ved015 commented May 24, 2026

Screenshot 2026-05-24 at 3 31 25 PM Screenshot 2026-05-24 at 3 26 57 PM Screenshot 2026-05-24 at 3 27 27 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 24, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp c7cf2f5 May 25 2026, 05:35 AM

@graphite-app graphite-app Bot requested a review from Dhravya May 24, 2026 10:03
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 24, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app c7cf2f5 Commit Preview URL

Branch Preview URL
May 25 2026, 05:36 AM

@claude
Copy link
Copy Markdown

claude Bot commented May 24, 2026

Claude finished @ved015's task in 1m 36s —— View job


Review Complete

  • Gather context and understand the request
  • Get PR diff and analyze changes
  • Check for bugs, security issues, and logic errors
  • Submit review

Summary: Verified that the true || debug code bug from the previous review has been fixed on line 997. The PR now correctly shows the top-up credits card only to users with paid plans. No other issues found — this looks ready to merge.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 24, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Overview: Adds credits top-up and auto-reload functionality to the billing settings page, with invoice history display.

Issues found: None — this looks good to ship.

The implementation is solid:

  • Proper authorization checks (isAdmin) before billing operations
  • Input validation handled correctly — invalid custom amounts disable the purchase button
  • Error handling with try/catch and user-friendly toast messages
  • API calls use proper credentials with credentials: "include"
  • Invoice amount normalization handles both dollar and cent formats from Stripe

Score: 9/10

Clean implementation of billing features with proper UX patterns. The only minor observation is that threshold/amount inputs allow any numeric value (including 0 for threshold), but server-side validation should handle edge cases.

github-actions Bot and others added 4 commits May 24, 2026 10:05
- Remove unused imports: CreditCard, Zap, calculateUsagePercent
- Remove unused variables: AUTO_TOP_UP_THRESHOLDS, AUTO_TOP_UP_AMOUNTS, creditUsagePct
- Fix a11y: associate labels with inputs using htmlFor/id attributes
- Fix formatting issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove debug `true ||` from conditional that was causing Biome lint error.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Overview: Adds credits top-up and auto-reload functionality to the billing settings page, with invoice history display.

Issues found:

  • Line 997: true || hasPaidPlan appears to be leftover debug code that shows the top-up credits card to all users, including free users who can't purchase credits.

The implementation is otherwise solid:

  • Proper authorization checks (isAdmin) before billing operations
  • API calls use proper credentials with credentials: "include"
  • Error handling with try/catch and user-friendly toast messages
  • Invoice amount normalization handles both dollar and cent formats from Stripe

Score: 8/10

Clean implementation with one bug to fix before merging. The true || on line 997 should be removed so free users don't see UI they can't use.

Comment thread apps/web/components/settings/billing.tsx
ved015 and others added 3 commits May 25, 2026 10:43
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Overview: Adds credits top-up and auto-reload functionality to the billing settings page, with invoice history display.

Issues found: None — the true || debug code bug from the previous review has been fixed. This looks good to ship.

The implementation is solid:

  • Proper authorization checks (isAdmin) before billing operations
  • Input validation handled correctly — invalid custom amounts disable the purchase button
  • Error handling with try/catch and user-friendly toast messages
  • API calls use proper credentials with credentials: "include"
  • Invoice amount normalization handles both dollar and cent formats from Stripe

Score: 9/10

Clean implementation of billing features with proper UX patterns.

@MaheshtheDev MaheshtheDev merged commit 9b310e9 into main May 25, 2026
9 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.

3 participants