Repository navigation
feat(billing): Match the Seer auto-load modal to the latest design - #130706
Conversation
Story previewsPreview the stories changed in this PR on the Vercel deployment: Preview deployment: https://sentry-5n51j8xqn.sentry.dev |
The design renames auto-reload to auto-load, offers $15, $25, $50 and custom amounts as cards with their credit counts, and shows how many purchased credits remain when turning it off. The daily usage limit no longer has to cover one load, since the API stopped requiring it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
e55f518 to
e41a1fc
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3ffa68e. Configure here.
| return {cents: DEFAULT_AMOUNT_CENTS, isCustom: false}; | ||
| } | ||
| return {cents: savedCents, isCustom: true}; | ||
| } |
There was a problem hiding this comment.
Custom amount lost when re-enabling
Medium Severity
When auto-load is off, getInitialAmount treats any non-preset topUpCredits as unpicked and replaces it with the $15 default. Turning off still sends the saved custom amount, so reopening the modal to turn it back on silently switches a previously chosen custom amount to the $15 preset. Preset amounts are restored in the same situation, so only custom values are lost.
Reviewed by Cursor Bugbot for commit 3ffa68e. Configure here.
There was a problem hiding this comment.
Fixed in #130865. The auto top-up endpoint will return topUpCredits: null until an amount is first saved, and the modal falls back to the $15 preset only in that case. A custom amount saved before turning off, including $10, now comes back when turning on again, along with the daily limit.
### Why? The Seer credit copy used several names for one setting. Depending on where you looked, it was auto-load, auto-reload, auto reload, auto top-up or auto top up. The daily cap was a daily token limit in some messages and a daily usage limit in others, and two out-of-credits messages said "Your org" where the rest say "Your organization". Follows: - #130706 ### How? The copy now always says auto-reload, daily usage limit and "Your organization". The quota request text in the billing status gets the same "Your organization" change. Stories, test names and comments use the same words; code names, DOM ids and API paths are unchanged. ### Screenshots Storybook on this branch, with the wallet card and modal rendered against mocked wallet responses. Before is `master`. | | Before | After | |---|---|---| | Wallet card |  |  | | Modal |  |  | | Autofix, billing member |  |  | | Seer chat, member |  |  | | Usage meter, no auto-reloads left |  |  | <sub>Generated with Claude Code</sub> Co-authored-by: Claude Opus 5.5 <[email protected]>
Fixes some FE defaults and validations. Reload amount now correctly selects $15 and daily limit now defaults to undefined (and can send undefined rather than send $0 which blocks seer usage). ## Slop ### Why? The Seer auto-reload modal didn't enforce the agreed limits: a minimum amount of $15, and an unset daily limit meaning no cap. It let any amount above $0 through. Clearing the daily limit sent $0, which blocks all Seer usage, and there was no way to leave the limit unset. The "Due now" preview also disagreed with the backend at exactly the threshold. The modal showed no charge, but the backend bills an auto-reload at or below the threshold. A new wallet starts at exactly the threshold, so turning auto-reload on billed without showing "Due now". Turning auto-reload off and back on also replaced a saved custom amount with the $15 preset ([review comment](#130706 (comment))). ### How? The modal reads the minimum amount from the auto-reload API instead of hardcoding it. It disables saving below the minimum and shows an inline message. An empty daily limit is saved as `null`, meaning no limit. A $0 daily limit is still allowed, with a warning that it turns off all Seer usage. The "Due now" preview now uses at-or-below the threshold, which matches when the backend bills the first auto-reload. The modal and wallet card now say auto-reload triggers "at or below" the threshold rather than "below". The modal now opens on the saved amount whether auto-reload is on or off. While off, it used to swap any amount that wasn't a preset for $15, to hide the API's old 1,000-credit default. That default is now the $15 minimum, which is the first preset. This depends on getsentry/getsentry#23167, which returns `minTopUpCredits` and a nullable `dailySpendCapCents`, and still accepts a $0 daily limit. That change must deploy first. Fixes REVENG-751 <sub>Generated with Claude Code</sub> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>


Why?
The Seer auto-reload modal no longer matched the latest billing design. The design renames it to auto-load, offers $15, $25, $50 and custom amounts as cards with their credit counts, and says how many purchased credits remain when turning it off.
Follows:
How?
Rebuilds the amount picker on radio
ToggleCards, with the dollar input shown only for a custom amount, and widens the modal so its content is as wide as the design's. The daily usage limit no longer rises to cover the chosen amount, since the API stopped requiring that. As before, due now and the pay button only show when the balance is below the auto-load threshold, and tax still isn't known before checkout, so due now shows the amount plus tax rather than a total.Screenshots
Local dev server with mocked wallet responses. The turning-on states have a balance below the auto-load threshold, so a load is due. Before is
master.Generated with Claude Code