feat(seer): Setup Agent bulk-edit on the Seer Autofix list page, and bring back Create PR bulk edits#112249
feat(seer): Setup Agent bulk-edit on the Seer Autofix list page, and bring back Create PR bulk edits#112249
Conversation
…bring back Create PR bulk edits
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Bulk agent mutation applies to all projects, not selected
- Filtered the projects array to only include selected projects (matching projectIds) before passing to bulkMutateSelectedAgent, consistent with the Create PRs dropdown pattern.
Or push these changes by commenting:
@cursor push cbb2a94d34
Preview (cbb2a94d34)
diff --git a/static/gsApp/views/seerAutomation/components/projectTable/seerProjectTableHeader.tsx b/static/gsApp/views/seerAutomation/components/projectTable/seerProjectTableHeader.tsx
--- a/static/gsApp/views/seerAutomation/components/projectTable/seerProjectTableHeader.tsx
+++ b/static/gsApp/views/seerAutomation/components/projectTable/seerProjectTableHeader.tsx
@@ -148,7 +148,10 @@
key: typeof value === 'object' ? value.provider : value,
label,
onAction: () => {
- bulkMutateSelectedAgent(projects, value);
+ const selectedProjects = projects.filter(project =>
+ projectIds.includes(project.id)
+ );
+ bulkMutateSelectedAgent(selectedProjects, value);
},
})) ?? []
}This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7a89eef. Configure here.
| key: typeof value === 'object' ? value.provider : value, | ||
| label, | ||
| onAction: () => { | ||
| bulkMutateSelectedAgent(projects, value); |
There was a problem hiding this comment.
Bulk agent mutation applies to all projects, not selected
High Severity
The bulkMutateSelectedAgent call passes the entire projects array (all projects in the table) instead of only the selected projects. The sibling "Create PRs" dropdown correctly uses projectIds (derived from selectedIds) to scope changes to the user's selection, but the "Agent" dropdown passes the unfiltered projects prop. This means selecting a few projects and choosing an agent will bulk-update every project in the table.
Reviewed by Cursor Bugbot for commit 7a89eef. Configure here.
| onAction: () => { | ||
| bulkMutateSelectedAgent(projects, value); | ||
| }, |
There was a problem hiding this comment.
Bug: The Agent dropdown's onAction handler incorrectly passes all projects to bulkMutateSelectedAgent, ignoring the user's checkbox selections.
Severity: HIGH
Suggested Fix
Before calling bulkMutateSelectedAgent, filter the projects array to include only the projects whose IDs are present in the projectIds variable. This can be done by creating a new selectedProjects array. The call should then be updated to bulkMutateSelectedAgent(selectedProjects, value), mirroring the implementation used by the "Create PRs" dropdown.
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/seerProjectTableHeader.tsx#L150-L152
Potential issue: In the `seerProjectTableHeader` component, the `Agent` dropdown's
`onAction` handler calls `bulkMutateSelectedAgent(projects, value)`. This passes the
entire `projects` prop, which includes all projects currently in the table view, to the
bulk mutation function. This ignores the user's specific checkbox selections, which are
available via the `selectedIds` context value. As a result, when a user selects a subset
of projects and attempts to change their assigned agent, the mutation is incorrectly
applied to all projects instead of just the selected ones.
Did we get this right? 👍 / 👎 to inform future reviews.



Uh oh!
There was an error while loading. Please reload this page.