Skip to content

feat(billing): Match the Seer auto-load modal to the latest design - #130706

Merged
billyvg merged 3 commits into
masterfrom
billy/feat/seer-auto-load-modal-design
Nov 11, 2026
Merged

billyvg merged 3 commits into
masterfrom
billy/feat/seer-auto-load-modal-design

Conversation

@billyvg

@billyvg billyvg commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

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.

Before After
Turning on Before: turning on After: turning on
Custom amount Before: custom amount After: custom amount
Editing Before: editing After: editing
Turning off Before: turning off After: turning off

Generated with Claude Code

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-5n51j8xqn.sentry.dev

@billyvg
billyvg marked this pull request as ready for review November 10, 2026 23:00
@billyvg
billyvg requested a review from a team as a code owner November 10, 2026 23:00
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]>
@linear-code

linear-code Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

CW-3089

REVENG-761

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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};
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3ffa68e. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@billyvg
billyvg merged commit 98c4dd3 into master Nov 11, 2026
76 checks passed
@billyvg
billyvg deleted the billy/feat/seer-auto-load-modal-design branch November 11, 2026 23:24
billyvg added a commit that referenced this pull request Nov 13, 2026
### 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 | ![Before: wallet card says Auto-load •
Off](https://github.com/user-attachments/assets/02b3af1a-3d84-4dc8-8bac-0df27cc7827b)
| ![After: wallet card says Auto-reload •
Off](https://github.com/user-attachments/assets/cc0627e8-faf2-4b53-b67c-34edcf95c54f)
|
| Modal | ![Before: modal titled Auto-load
credits](https://github.com/user-attachments/assets/982d66d2-e435-4e4d-afc9-860f7c7ca451)
| ![After: modal titled Auto-reload
credits](https://github.com/user-attachments/assets/f578292a-bd6a-4279-8f24-47ec419d3a06)
|
| Autofix, billing member | ![Before: Your org … Set up auto top
up](https://github.com/user-attachments/assets/3fe13724-ecd3-4e5b-8158-933e1cdc3790)
| ![After: Your organization … Set up
auto-reload](https://github.com/user-attachments/assets/dfd28de8-c43a-4e8a-8f81-0c4f7b0bc51f)
|
| Seer chat, member | ![Before: daily token limit or set up auto
top-up](https://github.com/user-attachments/assets/c84b82e1-fce5-4c70-8572-7577dc765047)
| ![After: daily usage limit or set up
auto-reload](https://github.com/user-attachments/assets/d30f35e9-dc1a-4392-bd01-259716cd9855)
|
| Usage meter, no auto-reloads left | ![Before: no more reloads
available](https://github.com/user-attachments/assets/f272ab1f-fe85-4e13-ba6e-a07df921f7e0)
| ![After: no more auto-reloads
available](https://github.com/user-attachments/assets/115e917a-89b1-47d5-a6fa-2ced4a7bc155)
|

<sub>Generated with Claude Code</sub>

Co-authored-by: Claude Opus 5.5 <[email protected]>
billyvg added a commit that referenced this pull request Nov 17, 2026
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]>

This branch was successfully deployed

1 active deployment
Preview — 3ffa68e4 Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants