feat(autofix): PR iteration frontend changes#118049
Conversation
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
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ 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.
| } | ||
| } | ||
|
|
||
| return section; | ||
| } |
There was a problem hiding this comment.
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.
📊 Type Coverage Diff✅ no issues found |

there's multiple changes happening in this PR:
Fixes https://linear.app/getsentry/issue/CW-1397