Skip to content

feat(seer-billing): Count the Seer credit meter down to the daily usage limit - #132058

Draft
billyvg wants to merge 2 commits into
masterfrom
billyvong/cw-3126-seer-credit-meter-daily-limit
Draft

billyvg wants to merge 2 commits into
masterfrom
billyvong/cw-3126-seer-credit-meter-daily-limit

Conversation

@billyvg

@billyvg billyvg commented Nov 20, 2026

Copy link
Copy Markdown
Member

An organization with a daily usage limit can only use what's left of it today, so the Seer chat's credit meter counts down whichever runs out first: the wallet or today's daily usage limit. With auto-reload on, reloads refill the wallet until the daily limit stops them, so the meter counts the limit. In that case the tooltip reads "Your organization has used 72% of its daily usage limit." and "700 credits remaining today." Members without billing access can't see whether auto-reload is on, so their meter takes whichever is lower.

The Daily usage limit story: the tooltip reads "Your organization has used 72% of its daily usage limit.", "700 credits remaining today." and "Credits will reload automatically."

Builds on #132038. This branch also contains #132038's commit ("Drop the total from the Seer credit meter tooltip"), so until that merges, review only the last commit. I'll rebase this once #132038 lands.

Merge order. The wallet endpoint returns dailyLimit once these land:

  1. feat(billing): Add today's usage to the Seer wallet sentry-protos#548 adds the fields to SeerWallet. After its release, the bot bumps sentry-protos in sentry.
  2. getsentry/getsentry#23492 returns dailyLimit from GET seer-wallet.
  3. This PR.

If this PR merges first, nothing breaks: until the backend sends dailyLimit, the meter counts the wallet as before.

Fixes CW-3126

🤖 Generated with Claude Code

billyvg and others added 2 commits November 20, 2026 13:01
The tooltip on the Seer chat's credit meter read "0/500 credits
remaining." The wallet only knows what's left of the purchased credits,
so the total shrank as they were used, down to the included credits,
and the denominator confused people. Show only the credits remaining.

Fixes CW-3126

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge limit

An organization with a daily usage limit can only use what's left of
it today, so the meter in the Seer chat counts down whichever runs out
first: the wallet or today's daily usage limit. With auto-reload on,
reloads refill the wallet until the daily limit stops them, so the
meter counts the limit. The tooltip then reads "Your organization has
used 72% of its daily usage limit." and "700 credits remaining today."

Needs getsentry/getsentry#23492, which returns dailyLimit from the
wallet endpoint.

Refs CW-3126

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

CW-3126

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

Copy link
Copy Markdown
Contributor

Story previews

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

Preview deployment: https://sentry-4xrd3203t.sentry.dev

billyvg added a commit that referenced this pull request Nov 20, 2026
…132038)

Note: this is still wrong when daily limit is configured, but that
requires backend changes. This is just what we can clean-up now to make
it slightly less confusing.

## Slop

The tooltip on the Seer chat's credit usage meter read "0/500 credits
remaining." The bug bash found the denominator confusing: it shrinks as
credits are used and always ends at 500. In the Nov 18 meeting we
decided to remove it, so the tooltip now shows only the credits
remaining ("250 credits remaining.", or "1 credit remaining.").

The total shrinks because the wallet endpoint doesn't know how much
credit was bought, so it reports what's left of the purchased credits as
their total (`getsentry/api/customer_seer_wallet.py`). Once purchased
credits run out, the total is just the included credits.

`SeerCreditUsageMeterView` no longer takes `total`, since nothing else
read it. This PR needs no backend change and can merge now. #132058 adds
the daily usage limit to the meter on top of it, and that one waits for
the backend.

![The meter's tooltip in the Auto-reload off and Auto-reload on stories,
each reading "250 credits
remaining."](https://github.com/user-attachments/assets/8e78b2b5-22da-4788-9e18-b929a88396aa)

Refs CW-3126

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — d8618365 Deployed Nov 20, 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.

1 participant