feat(seer): Enable sorting seer autofix project list#112250
Conversation
…bring back Create PR bulk edits
| 'Failed to update auto create pull requests setting for %s', | ||
| project.name | ||
| ) | ||
| ), | ||
| }); | ||
| }} | ||
| /> | ||
| </Flex> | ||
| ) : ( | ||
| <Placeholder height="28px" width="36px" /> | ||
| )} |
There was a problem hiding this comment.
Bug: The PR creation switch is now shown for projects with autofix disabled. Toggling it updates a server setting that has no effect, creating user confusion.
Severity: MEDIUM
Suggested Fix
Re-introduce the logic to hide or disable the PR creation switch when autofixAutomationTuning is 'off'. This could be done by either restoring the 'none' return value in useSelectedAgentFromBulkSettings and updating the UI to handle it, or by adding a new disabled condition to the <Switch> component that checks the status of autofixAutomationTuning. The associated tests should also be updated to reflect the intended behavior.
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/gsApp/views/seerAutomation/components/projectTable/seerProjectTableRow.tsx#L121-L169
Potential issue: The removal of a check in `useSelectedAgentFromBulkSettings` means it
no longer returns `'none'` when `autofixAutomationTuning` is `'off'`. Consequently, the
PR creation switch in `seerProjectTableRow.tsx` is now always visible and enabled, even
for projects where autofix is disabled. Users can toggle this switch, which sends
updates for `automated_run_stopping_point` to the server. However, these updates are
meaningless as the core autofix feature is turned off, leading to a confusing UI and
orphaned server state. This also breaks existing tests that expect the old behavior.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
yup. this is what we want
| @@ -125,53 +121,49 @@ export function SeerProjectTableRow({ | |||
| </SimpleTable.RowCell> | |||
| <SimpleTable.RowCell justify="end"> | |||
There was a problem hiding this comment.
Bug: Toggling the "Create PR" switch fails silently if the project's configured agent integration has been deleted. The UI provides no feedback that the operation failed.
Severity: MEDIUM
Suggested Fix
In useMutateCreatePr, add a condition to handle cases where the autofixAgent parameter is undefined. This logic should trigger the onError callback to provide feedback to the user that the operation failed because the selected agent is invalid or missing.
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/gsApp/views/seerAutomation/components/projectTable/seerProjectTableRow.tsx#L122
Potential issue: If a project is configured with an external agent integration that has
since been deleted or become unavailable, toggling the "Create PR" switch for that
project will fail silently. The `useSelectedAgentFromBulkSettings` hook returns
`undefined` in this scenario. When the switch is toggled, `mutateCreatePr` is called
with `undefined`, but it contains no logic to handle this case. Consequently, no API
call is made and no success or error feedback is provided to the user, leaving them to
believe the action succeeded when it did not.
There was a problem hiding this comment.
if the integration gets deleted while they're on the page then feedback would be nice, but they'll in a position to have no agent, thus we should be able to still set Create PR against the Seer agent (default).
This feels like something the API should help out with more. We're setting specific values right now into the db instead of make requests for intent... once the api design changes we'll be better able to fix this for good.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1406720. Configure here.
static/gsApp/views/seerAutomation/components/projectTable/seerProjectTableRow.tsx
Outdated
Show resolved
Hide resolved
For this I had to properly disable the 'no handoff' option finally. Because sorting that into the list isn't right anymore, and would take a bit of extra code. So that's gone.

For this I had to properly disable the 'no handoff' option finally. Because sorting that into the list isn't right anymore, and would take a bit of extra code. So that's gone.