Add credits and top-ups option in settings/billing page#998
Conversation
ved015
commented
May 24, 2026
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | c7cf2f5 | May 25 2026, 05:35 AM |
Deploying with
|
| 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 finished @ved015's task in 1m 36s —— View job Review Complete
Summary: Verified that the |
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
There was a problem hiding this comment.
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.
- 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>
There was a problem hiding this comment.
Overview: Adds credits top-up and auto-reload functionality to the billing settings page, with invoice history display.
Issues found:
- Line 997:
true || hasPaidPlanappears 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.
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
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.