Repository navigation
ref(seer): Stop gating PR iteration UI on its feature flags - #129036
Merged
Merged
Conversation
Contributor
Story previewsPreview the stories changed in this PR on the Vercel deployment: Preview deployment: https://sentry-iy5gdiqv3.sentry.dev |
sentry-junior
Bot
force-pushed
the
joey--pr-iteration-default-on-frontend
branch
from
November 3, 2026 16:20
241e563 to
b72e7f2
Compare
Contributor
Author
|
bugbot run |
Contributor
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4c7a851. Configure here.
joseph-sentry
force-pushed
the
joey--pr-iteration-default-on-frontend
branch
from
November 6, 2026 20:16
4c7a851 to
f0d3a93
Compare
joseph-sentry
marked this pull request as ready for review
November 9, 2026 15:40
The autofix-pr-iteration and autofix-pr-iteration-manual flags are fully rolled out, so the feedback form, reset, and next step no longer check them. The review-request and cap-assign flags are untouched. Co-Authored-By: Joseph Sawaya <[email protected]>
Two tests added on master in #128706 still render with prIterationOrganization, which this branch removes now that the PR iteration UI is no longer flag-gated. Co-Authored-By: Joseph Sawaya <[email protected]>
One more test still rendered with prIterationOrganization, which this branch removes now that the PR iteration UI is no longer flag-gated. This broke the typescript and Jest checks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Master added a test in useExplorerAutofix.spec.tsx that uses OrganizationFixture, but this branch removed that import along with the isRunValidForPrIteration tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexsohn1126
approved these changes
Nov 10, 2026
alexsohn1126
left a comment
Member
There was a problem hiding this comment.
nice! thanks for the cleanup
joseph-sentry
force-pushed
the
joey--pr-iteration-default-on-frontend
branch
from
November 10, 2026 18:55
5ce7f62 to
498f743
Compare
billyvg
added a commit
that referenced
this pull request
Nov 10, 2026
… credit gates Master's getAutofixNextStep takes the run state so single runs get no next step. The drawer alert and the issue preview now pass it, and the drawer alert checks nothing for a single run, since it offers nothing to pay for. Master also stopped gating PR iteration on autofix-pr-iteration-manual (#129036), so the tests and stories stop turning that flag on. Refs CW-2331 Co-Authored-By: Claude Opus 5.5 <[email protected]>
joseph-sentry
added a commit
that referenced
this pull request
Nov 16, 2026
Deletes the `manager.add` registrations for `organizations:autofix-pr-iteration` and `organizations:autofix-pr-iteration-manual`. Nothing reads either flag after #129035 and #129036. Merge after getsentry/sentry-options-automator#10378 deploys. Both flags are `api_expose=True`, so #129036 has to be out first too.
billyvg
added a commit
that referenced
this pull request
Nov 16, 2026
When an org runs out of Seer credits, Seer ends the run with `failure_reason=out_of_credits` (getsentry/seer#9242) or records `pr_creation_error_code=out_of_credits` on 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-continue` copy 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): - The Seer drawer cards and the chat autofix card keep what the step wrote before it stopped: its reasoning, the root cause's evidence and, for code changes, the partial diff. Seer's own error block is left out. The drawer cards draw that work the way their running state does, like the Seer Agent chat. Below that, one line says which step stopped. It's muted in the drawer and danger in the chat card, which matches each card's existing failure text. Partial code changes can't be copied as Markdown or turned into a PR. - The issue sidebar previews say the step stopped for credits. A PR-iteration feedback item that stopped is marked failed, with out-of-credits copy. - In agent chat, the run's last response replaces Seer's plain-text error block with a muted "Seer stopped because your organization is out of credits." Earlier reasoning and tool calls stay in the thinking block. #130463 rechecks credits when a run stops for them, so the alert above the composer comes up as well. **A PR create or push that failed for credits:** - The drawer's Pull Requests card keeps "Retry PR" for that repo and adds a line under the PRs saying it failed for credits. The chat PR card says the same instead of "This one is on us". - The chat failure toast and the PR links bar tooltip use out-of-credits copy instead of the raw backend string. **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`. `startStep` and `createPR` then 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. | | Before | After | | --- | --- | --- | | Start Analysis, refused for credits | [](https://github.com/user-attachments/assets/02bdab75-3964-4544-8162-0f274e783723) | [](https://github.com/user-attachments/assets/46901430-d942-4272-ae2d-ad31b4efa924) | | Yes, draft a PR, refused for credits | [](https://github.com/user-attachments/assets/3f597c66-0996-43cd-8d52-53a5b7b7fe61) | [](https://github.com/user-attachments/assets/d584d5e9-0540-4e6e-a5fd-cad1ef705794) | These use the real drawer and `useExplorerAutofix`, with the Autofix endpoint stubbed in the browser: it refuses with a 402 and `code: 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. | Retry | Where | Operation | |---|---|---| | Re-run, header Re-run step | Root cause card | `autofix_root_cause` | | Re-run, header Re-run step | Plan card | `autofix_solution` | | Re-run, header Re-run step | Code changes card | `autofix_code_changes` | | Add context & retry, header Re-run step | Code changes card, iteration stopped | `autofix_pr_iteration` | | Retry PR | Pull Requests card, inbox preview | `autofix_open_pr` | | Try again | Chat autofix card | the step that stopped | | Draft a pull request | Chat code changes card, after a PR failed for credits | `autofix_open_pr` | Decisions the spec doesn't cover, for review: - The spec has no failure copy. The status lines keep the earlier headlines, one sentence each, and the tooltip is new. - Without `seer-credit-checks` the hook reports enough credits, so a stopped step shows its retry enabled and the backend decides. - Only retries of something that stopped for credits are gated here. Retries after other failures, and re-runs of finished steps, don't call the credit check. The chat card's "Draft a pull request" is the exception: #129565 already holds it on `autofix_open_pr` for every run, so this PR only adds the tooltip when the earlier create failed for credits. - On a drawer card that stopped for credits, the header Re-run step does what it does on a finished card: it opens the context prompt, or Seer chat where the card offers chat. On cards that failed for other reasons, it still shows nothing. - A stopped PR iteration is retried through the PR feedback form. Since #129036 dropped the `autofix-pr-iteration-manual` gate, that retry is always there once the run has a PR. `hideErroredPrIteration` still hides CI-driven iterations that fail, whether or not they ran out of credits. - The chat card's "Try again" sends a chat message, so the composer's `agent_chat_message` gate 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 the `autofix_pr_iteration` check. - The PR links bar has no retry and no status line. Its tooltip is the only status, and the composer's alert carries the CTA. | Location | Screenshot | | --- | --- | | Seer drawer › Code Changes, stopped for credits | [](https://github.com/user-attachments/assets/84d04adf-3768-4382-ad0d-73d8a5114675) | | Seer drawer › Code Changes, stopped for credits, after a top-up | [](https://github.com/user-attachments/assets/efdb02f1-fcac-41a7-a6bc-504d5fd19baa) | | Seer drawer › Code Changes, PR iteration stopped for credits | [](https://github.com/user-attachments/assets/0e9336ca-b6e7-4925-b73e-1afc483367fa) | | Seer drawer › Pull Requests, failed for credits | [](https://github.com/user-attachments/assets/9ec8a50d-fd8d-4f99-a0d7-a4673a36f95d) | | Seer Explorer › autofix card › Code Changes, stopped for credits | [](https://github.com/user-attachments/assets/0f4b9102-455a-4227-964d-42a258b74ca0) | | Seer Explorer › autofix card › Pull Request, failed for credits | [](https://github.com/user-attachments/assets/aa4eb9a6-6cc2-4c7e-b78b-13b026bc9bd1) | | Seer Explorer › conversation, run stopped for credits | [](https://github.com/user-attachments/assets/c22f2909-1946-4e1d-bb15-145e1bf9a239) | | Seer Explorer › PR links bar, failed for credits | [](https://github.com/user-attachments/assets/3ceb10e3-b9c1-47f9-a386-5a29d0ccbd76) | 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](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
The Autofix drawer stops checking
autofix-pr-iterationandautofix-pr-iteration-manual, which are at 100%. Once a run has a PR, the code changes card always shows iteration feedback and the PR iteration form, keeps reset available while an iteration runs, the PR next step always offers the feedback form, and the drawer always polls for PR state.Backend counterpart: #129035. getsentry/sentry-options-automator#10378 removes the flagpole definitions and waits for both to deploy.