Skip to content

feat(autofix): PR iteration frontend changes#118049

Open
joseph-sentry wants to merge 5 commits into
masterfrom
joey--autofix-pr-iteration-frontend
Open

feat(autofix): PR iteration frontend changes#118049
joseph-sentry wants to merge 5 commits into
masterfrom
joey--autofix-pr-iteration-frontend

Conversation

@joseph-sentry

@joseph-sentry joseph-sentry commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

there's multiple changes happening in this PR:

  • update the logic to display code changes from PR iteration blocks in the autofix explorer conversation in the code changes card
  • show feedback from the PR iteration blocks in the code changes card
  • after a PR is created show the Pull request next step section (textarea + button)
  • show the pull request next step section within the code changes card when a user clicks the "reset" button on the card
  • clicking the submit button after populating feedback in the PR iteration section will send the request to the Sentry backend which will forward that to Seer to run the Autofix

Fixes https://linear.app/getsentry/issue/CW-1397

image image image image image

the main change is we update the code changes card to display the
feedback PR iteration feedback that was passed for each PR iteration

we also update metrics, the next step logic, and the "autofix section"
construction to support PR iteration blocks

feature flag fixes

feat(autofix): add reset to code changes card for PR iteration

for PR iteration we want to enable the reset button in the top right
of the code changes card to open up an equivalent form as the PullRequestNextStep
component at the top of the code changes card to provide feedback and trigger PR
iteration

it's just another place to start a PR iteration in the UI so that uses don't get
confused
@joseph-sentry joseph-sentry requested review from a team as code owners June 18, 2026 18:55
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 18, 2026
@joseph-sentry joseph-sentry marked this pull request as draft June 18, 2026 18:56

@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 3 potential issues.

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 ec5034c. Configure here.

Comment thread static/app/components/events/autofix/v3/codeChangesCard.tsx
Comment thread static/app/components/events/autofix/v3/useResetAutofixStep.tsx Outdated
Comment thread static/app/components/events/autofix/v3/prIterationFeedbackForm.tsx
Comment thread static/app/components/events/autofix/v3/codeChangesCard.tsx Outdated
Comment on lines +287 to +291
}
}

return section;
}

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.

Bug: A section's status is checked before merged file patches are added to its artifacts, which can cause code changes to not be displayed.
Severity: MEDIUM

Suggested Fix

Modify the status determination logic to account for the presence of merged_file_patches. This can be done by checking for merged patches before setting the section's status, ensuring that sections with patches are correctly marked as 'completed'.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/components/events/autofix/useExplorerAutofix.tsx#L287-L291

Potential issue: In the `buildSection` function, a section's `status` is determined
before `merged_file_patches` are added to its `artifacts` array. If a `code_changes`
section only contains merged patches and does not meet other completion criteria (e.g.,
the run is still processing), its status will remain 'processing'. Consequently,
`getAutofixArtifactFromSection` will not retrieve the patches because it checks for
`status === 'completed'`, preventing the code changes from being displayed to the user.

Did we get this right? 👍 / 👎 to inform future reviews.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ no issues found

@linear-code

linear-code Bot commented Jun 18, 2026

Copy link
Copy Markdown

CW-1397

@joseph-sentry joseph-sentry marked this pull request as ready for review June 19, 2026 16:15
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