Repository navigation
Conversation
Contributor
📊 Type Coverage Diff
🔍 3 new type safety issues introducedNon-null assertions (
Type assertions (
| This is informational only and does not block the PR. |
billyvg
force-pushed
the
billyvong/cw-2321-sentry-ui-out-of-credits-cta-with-escalation
branch
from
November 5, 2026 20:08
b2159ac to
53361ad
Compare
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 5, 2026 20:14
33c3969 to
2c09c7d
Compare
Contributor
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 5, 2026 20:37
2c09c7d to
7d6e086
Compare
Contributor
decision-model-lintervoice
decision-model-linter: 209 calls on 38 files, 545,564 input tokens, $0.023, model typesafe/jev-1.13-20260917 |
Contributor
Sentry Snapshot Testing
|
billyvg
force-pushed
the
billyvong/cw-2321-sentry-ui-out-of-credits-cta-with-escalation
branch
from
November 5, 2026 21:38
d009d44 to
dba69c6
Compare
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 5, 2026 21:50
34dc2ea to
fa441db
Compare
billyvg
force-pushed
the
billyvong/cw-2321-sentry-ui-out-of-credits-cta-with-escalation
branch
from
November 5, 2026 22:03
dba69c6 to
a43272f
Compare
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 5, 2026 22:08
fa441db to
ef3a3c0
Compare
Base automatically changed from
billyvong/cw-2321-sentry-ui-out-of-credits-cta-with-escalation
to
master
November 6, 2026 17:41
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 6, 2026 18:06
ef3a3c0 to
b8e81cf
Compare
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 10, 2026 21:53
a1cfa65 to
942d7f5
Compare
srest2021
approved these changes
Nov 13, 2026
srest2021
left a comment
Member
There was a problem hiding this comment.
Can we add out-of-credits error handling to startStep and createPR in useExplorerAutofix.tsx as well (doesn't have to be this PR)? These still show the generic toast.
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 13, 2026 18:08
942d7f5 to
f7c5e66
Compare
Runs and PR creates that stopped because the org ran out of Seer credits looked like generic errors and offered a retry that fails the same way. Autofix now reads failure_reason=out_of_credits and pr_creation_error_code=out_of_credits and shows the out-of-credits CTA instead. The drawer cards and the chat autofix card keep what the step wrote before it stopped, including a partial diff, and drop their re-run and Try again buttons. The PR card and chat card stop offering a PR retry, and the inbox disables it with an explanation. The PR failure toast and tooltips use out-of-credits copy, and the chat swaps Seer's plain-text error block for the CTA. Fixes CW-2328 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Steps and PRs that stopped because the org ran out of Seer credits no longer render the out-of-credits CTA. The credit gates own it on each surface: the alert at the top of the Autofix tab and drawer, the alert above the chat composer and the muted alert in the issue sidebar. A stopped step or failed PR now shows one muted (drawer) or danger (chat card) line saying why it stopped, and the chat transcript swaps Seer's error block for that line. Their retries stay on screen and follow useSeerCreditCheck for the operation they would spend: disabled with an out-of-credits tooltip while the org can't afford it, enabled again once it can. That covers Re-run, Add context & retry and the card header's Re-run step in the drawer, Retry PR in the drawer and inbox, and Try again and Draft a pull request in the chat card. Refs CW-2328 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both cards gained an out-of-credits state with no story. Each story file shows the card stopped for credits with Re-run disabled, the same run after a top-up, and a run that stopped before Seer wrote anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Credit checks also need token-billed-seer-enabled as of #129545, so the tests, stories and SeerCreditCheckStub that turn on seer-credit-checks turn it on too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The backend's SeerOperation calls the PR step autofix_open_pr and rejects autofix_create_pr, so the PR retry gates always failed open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The autofix embed rendered a stopped step's text with ArtifactPartialDetails, whose SeerMarkdown imports the embeds, so knip --cycles failed. The embed now renders that text with its own markdown, like the rest of its steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#129565 landed `AUTOFIX_CREDIT_OPERATIONS` and `useAutofixCreditCheck`, which map each autofix action to the operation the credit check prices. The retries here kept their own copy of that map. `useOutOfCreditsRetry` now takes the autofix action and checks it through `useAutofixCreditCheck`, so both gates read one map. The retry also waits on `hasCheckedSinceMount` instead of `isPending`, as the #129565 gates do. A cached answer from an earlier mount no longer enables a retry before this mount's recheck answers. SeerExplorerContent reuses `isRunOutOfCredits`, which #130463 added, for the transcript's out-of-credits line. The chat window story for a run that stopped for credits now shows the composer's out-of-credits alert, which that recheck brings up. The chat window stories answered the credit usage meter's wallet request with an empty list when they had no wallet fixture, so the meter crashed and took every story in the file with it. Those requests now fail, as they do for an org without token-billed Seer, and a story without a wallet is viewed by a member without billing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the organization has run out of Seer credits, the Autofix endpoint refuses a step or PR with a 402 and `code: seer_out_of_credits`. `startStep` and `createPR` treated that like any other failure. They toasted the backend's detail, and a refused kickoff with no run yet painted a failed run that said "This one is on us". Both now recheck every Seer credit check, so the credit gates bring up the out-of-credits CTA and disable their buttons, and toast out-of-credits copy for the step, or for the repo's PR. A refused kickoff no longer paints a failed run, since the start card offers the CTA instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
billyvg
force-pushed
the
billyvong/cw-2328-sentry-ui-show-out-of-credits-failures
branch
from
November 13, 2026 18:17
f7c5e66 to
3b945d0
Compare
billyvg
marked this pull request as ready for review
November 13, 2026 18:31
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an org runs out of Seer credits, Seer ends the run with
failure_reason=out_of_credits(getsentry/seer#9242) or recordspr_creation_error_code=out_of_creditson the repo's PR state (getsentry/seer#9268). Until now the UI showed those as generic failures ("This one is on us") next to a retry that fails the same way. This PR reads both fields, says the step stopped for credits, and makes its retry follow the credit check. It builds on #129545 (useSeerCreditCheck), #129551 (out-of-credits CTA), #129563 (agent chat gate), #129565 (autofix entry point gates) and #130463 (chat recheck), all merged.This PR renders no out-of-credits CTA. The credit gates already show one on each surface: the alert at the top of the Autofix tab and drawer (its
autofix-continuecopy covers a run that stopped part way), the alert above the chat composer, and the muted alert in the issue sidebar. A stopped step or failed PR only gets a one-line status here.A step that stopped for credits (root cause, plan, code changes, PR iteration):
A PR create or push that failed for credits:
A step or PR the backend refuses for credits. The gates' credit checks fail open and can be out of date, so the Autofix endpoint has the final say: it answers 402 with
code: seer_out_of_credits.startStepandcreatePRthen recheck every Seer credit check, so the gates bring up their CTA and disable their buttons. They toast out-of-credits copy for the step, or for the repo's PR, instead of the backend's detail. A refused kickoff no longer paints a failed run that says "This one is on us", since the start card offers the CTA.These use the real drawer and
useExplorerAutofix, with the Autofix endpoint stubbed in the browser: it refuses with a 402 andcode: seer_out_of_credits, and the credit check says the organization can pay until that refusal. Before is this branch without the commit that handles the refusal.Retries follow the credit check. Each retry stays on screen. While the credit check says the org can't afford the operation, the retry is disabled, and its tooltip reads "Your organization does not have enough Seer credits for this." The check refetches on mount and window focus, so the retry turns back on once the org tops up. Until this mount's check answers, the retry stays disabled, even with an earlier answer cached, so it never flashes on. Only retries on screen for a credit failure run the check. Each retry checks its autofix action through #129565's
useAutofixCreditCheck, so both gates read one action-to-operation map.autofix_root_causeautofix_solutionautofix_code_changesautofix_pr_iterationautofix_open_prautofix_open_prDecisions the spec doesn't cover, for review:
seer-credit-checksthe hook reports enough credits, so a stopped step shows its retry enabled and the backend decides.autofix_open_prfor every run, so this PR only adds the tooltip when the earlier create failed for credits.autofix-pr-iteration-manualgate, that retry is always there once the run has a PR.hideErroredPrIterationstill hides CI-driven iterations that fail, whether or not they ran out of credits.agent_chat_messagegate also applies to it. On a code changes card whose iteration stopped, it still asks Seer to retry the Code Changes step, as it does for other failures, but it waits for theautofix_pr_iterationcheck.The screenshots come from the stories. Members see "Contact Admin" only when their org can self-serve, so the two captures with a CTA used a self-serve subscription.
Fixes CW-2328
🤖 Generated with Claude Code