Skip to content

feat(seer): Link to the auto-reload modal from any page - #131613

Open
billyvg wants to merge 14 commits into
masterfrom
billyvong/reveng-792-add-a-permalink-for-the-seer-auto
Open

billyvg wants to merge 14 commits into
masterfrom
billyvong/reveng-792-add-a-permalink-for-the-seer-auto

Conversation

@billyvg

@billyvg billyvg commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Changed the auto-reload modal so its loadable from any page (though I can revert this, my initial thinking was that non-billing users would not be able to access billing page and they'd see an error, but that's not exactly the case, I think ti's fine to show on top of their insufficient access page).

But also changed the modal to check for billing access, and show the Contact Admin message if they do not have billing access.

The reason for this change was after speaking with @alexsohn1126 -- on Slack, the messages are sent to many users, so we can't curate the message per user. We'll link them always to the auto reload modal and have to handle the permissions within that modal.

Slop

Adds a permalink to the Seer auto-reload modal so Slack and other non-web clients can send people straight to it. Any organization page now opens the modal when its URL has #open-seer-auto-reload-modal. Before this, only the billing overview did. A link can also say why Seer stopped by adding one of the credit check's denial reasons after a colon. The link to use from Slack is the issues page:

https://<org-slug>.sentry.io/issues/#open-seer-auto-reload-modal:daily_cap_exceeded
https://<org-slug>.sentry.io/issues/#open-seer-auto-reload-modal:not_enough_credits

A small component in the getsentry organization header reads the hash, so it runs on every org page, settings included. Location changes only re-render that component, not the banners next to it. It opens the modal only for orgs with token-billed-seer-enabled, then removes the hash so a refresh doesn't open it again. The billing overview's own handler on the Seer wallet card is gone, since the header covers that page too. The existing billing overview links in the credit meter and emails still work.

Members without org:billing used to get "Unable to load your Seer credits" in the modal, because the wallet only returns pricing to billing roles. They now get a message about what stopped Seer. In orgs with Seer credit checks, the modal asks the credit check for the current reason, because a link from Slack can be a day old and the daily usage limit resets at midnight UTC. The link's reason counts only when the check doesn't run or fails. For the daily limit, the modal also says when it resets, as the out-of-credits notice does. Contact Admin asks the credit check again before sending anything. If Seer can run by then, it tells the member and emails no one. The member view loads the subscription itself, so self-serve members get Contact Admin even when the page hasn't loaded it yet. Members of self-serve orgs also get the same Contact Admin / Admins emailed button as the out-of-credits notice. That button sends the link's reason with the request, so admins get the daily-limit email when the org hit its limit and the auto-reload email when it ran out of credits. A link without a reason gets a general message and still offers Contact Admin, which sends the auto-reload request. That email opens with "Seer stopped … because it ran out of credits", which may not be true when the link has no reason; neutral copy for it would be a getsentry change. Members of orgs that can't self-serve get no button, which matches the notice. The request logic moved out of SeerOutOfCreditsCta into useSeerTopUpRequest, and the button moved into SeerContactAdminButton, so the modal and the notice stay in step.

Requests from the modal and from the notice share the seer_top_up_requested prompt, the same way the notice's two kinds of request already do. A member who asked about credits sees "Admins emailed" for the rest of the billing period, even if the daily limit stops Seer later. Splitting the prompt per reason needs a new prompt registered in the backend, so it isn't part of this frontend PR.

Please review the member copy:

  • Daily usage limit: "Your organization hit its daily Seer usage limit. Only owners and billing members can manage auto-reload, so ask your admin to increase the limit."
  • Out of credits: "Your organization ran out of Seer credits. Only owners and billing members can manage auto-reload, so ask your admin to turn it on."
  • No reason: "Only owners and billing members can manage auto-reload. Ask your admin to turn it on or increase your daily usage limit."

The screenshots come from the modal's "Without billing access" story on a local devserver, in a self-serve org. A dev org can't easily get token-billed-seer-enabled, which comes from a billing-platform contract. Contact Admin from the daily-limit state sent {"denialReason": "daily_cap_exceeded"} and got a 202.

Daily usage limit Out of credits No reason in the link
Member sees the daily-limit message, its reset time and Contact Admin Member sees the out-of-credits message and Contact Admin Member sees the general message and Contact Admin

Refs REVENG-792

🤖 Generated with Claude Code

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

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

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

Preview deployment: https://sentry-bxvja7m2w.sentry.dev

@linear-code

linear-code Bot commented Nov 18, 2026

Copy link
Copy Markdown

REVENG-792

@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.

Stale Bugbot comment from a previous run.

Comment on lines +218 to +223
{denialReason === 'daily_cap_exceeded' && (
<Text as="p" size="lg">
{tct('This will reset at [time].', {
time: <DateTime date={getDailyLimitResetsAt()} timeOnly timeZone />,
})}
</Text>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it make sense to also include the reset for free credits for the other denial reason?

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.

The other reason is not_enough_credits, which means that auto-reload stopped because we've hit the daily usage limit right? so the reset times should be the same?

@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.

Stale Bugbot comment from a previous run.

@alexsohn1126 alexsohn1126 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you!

@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.

Stale Bugbot comment from a previous run.

billyvg and others added 4 commits November 20, 2026 12:52
Any organization page now opens the Seer auto-reload modal when its URL has
#open-seer-auto-reload-modal, not just the billing overview, so Slack and other
non-web clients can link to it, for example /issues/#open-seer-auto-reload-modal.
Orgs without token-billed Seer ignore the link.

Members without billing access used to get a load error in the modal. They now
see who can manage auto-reload and, in self-serve orgs, the Contact Admin button
from the out-of-credits notice, which now shares its request logic with the modal.

Refs REVENG-792

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contact Admin in the auto-reload modal sent the top-up request without a reason,
so admins always got "Seer stopped because it ran out of credits", even when the
org had hit its daily usage limit or Seer hadn't stopped at all. A link can now say
why Seer stopped, as in #open-seer-auto-reload-modal:daily_cap_exceeded. The modal
words its member message for that reason and sends it with the request, and offers
no Contact Admin when the link has no reason.

The org header also reads the location in its own component now, so a location
change no longer re-renders the getsentry banners.

Refs REVENG-792

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Members of self-serve orgs now get Contact Admin in the auto-reload modal even
when the link doesn't say why Seer stopped. Without a reason, the request goes out
as the auto-reload request, the same one the out-of-credits notice sends.

Refs REVENG-792

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A link's reason can be old, since Slack messages stick around and the daily usage
limit resets at midnight UTC. The member view now asks the credit check why Seer is
stopped and uses the link's reason only when the check doesn't run or fails. For the
daily limit it also says when the limit resets, as the out-of-credits notice does.

The member view loads the subscription itself, so self-serve members get Contact
Admin even when the page hasn't loaded the subscription yet, and a failed load
offers a retry instead of a modal without the button.

Denial reasons now come from a SEER_CREDIT_DENIAL_REASONS list, so the link
accepts any reason the type gains.

Refs REVENG-792

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billyvg and others added 7 commits November 20, 2026 12:52
When Seer ran out of credits, members now see when their included credits reset,
read from the wallet every member can see. Out of credits, Seer resumes then,
at the start of the next billing period, not when the daily usage limit resets.

Refs REVENG-792

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Out of credits only happens with auto-reload off. With it on, Seer reloads until
the daily usage limit, which is its own reason. So the reason to tell members about
is turning auto-reload on, not when included credits reset. This reverts
ee2adc9.

Refs REVENG-792

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master moved DateTime to @sentry/scraps/dateTime and renamed its time-only props,
so the modal's import no longer resolved once merged with master.

Refs REVENG-792

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

Master removed the seer-credit-checks flag, so the member view's check for why
Seer is stopped never ran and members kept seeing the link's possibly stale reason.
It now runs for every org with token-billed Seer, like useSeerCreditCheck.

Refs REVENG-792

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

The modal can stay open past the daily usage limit's reset, or after an admin
adds credits. Contact Admin now asks the credit check again first. If Seer can run,
it tells the member and sends nothing; otherwise the request carries the reason
from that fresh check.

Refs REVENG-792

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k says so

The member view only read the credit check's answer from the recheck on
Contact Admin, so a first check that found Seer running still showed the
generic copy and a Contact Admin button that could never send. Read it
from the first check too, and keep the modal's title and close button up
while the subscription loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hows Seer as available

A cached credit check, from the chat or the modal's last time open, counted
as an answer, so the modal could say Seer is available and hide Contact
Admin until the new check came back. Wait for a check since the modal
opened, as useSeerCreditCheck does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@billyvg
billyvg force-pushed the billyvong/reveng-792-add-a-permalink-for-the-seer-auto branch from 0e615d5 to 22f531e Compare November 20, 2026 17:54

@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.

Stale Bugbot comment from a previous run.

The member view asked the credit check about a chat message, which costs
less than Autofix and is billed as Seer Agent. A balance that covers a
chat message but not an Autofix step hid Contact Admin behind "Seer is
available" while Autofix was still blocked. Slack links come from any
stopped operation, so the modal now checks the one with the largest
estimate, autofix_pr_iteration.

Refs REVENG-792

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

@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 743ba19. Configure here.

Clearing the link's hash is a router navigation that lands after the
effect runs. A dependency change in between, such as the organization
reloading, ran the effect again with the hash still there and opened
the modal a second time, which remounts it. The hook now opens it once
while the hash is in the URL, and again only after the hash is gone and
the link is followed again.

Refs REVENG-792

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

This branch was successfully deployed

1 active deployment
Preview — f42bc1fc 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.

3 participants