Skip to content

feat(seer): Rewrite the Seer > Project list page#109531

Draft
ryan953 wants to merge 2 commits intomasterfrom
ryan953/feat-seer-project-list-simple
Draft

feat(seer): Rewrite the Seer > Project list page#109531
ryan953 wants to merge 2 commits intomasterfrom
ryan953/feat-seer-project-list-simple

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Feb 26, 2026

This rewrite consolidates some of the previous columns to match what's in #109349

  • We've combined the previous "auto-triggered fixes" and "coding agent" columns into one column with a dropdown to pick an "Autofix Agent".
  • PR create column now applies to background agents as well as Seer Agent

Bulk editing is disabled. At this moment we don't have support for updating the complex automation_handoff values in the current bulk edit endpoint.

Fixes https://linear.app/getsentry/issue/CW-930/settings-seer-project-list-simplify-the-columnsactions-to-match
Depends on #110188

@ryan953 ryan953 requested review from a team as code owners February 26, 2026 22:29
@linear
Copy link

linear bot commented Feb 26, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 26, 2026
Comment on lines +231 to +238
} else if (autofixAgent && autofixAgent !== 'none') {
const updatedHandoff = {
handoff_point: 'root_cause' as const,
target: 'cursor_background_agent' as const,
integration_id: Number(autofixAgent.id),
...preference?.automation_handoff,
auto_create_pr: value,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: In useMutateCreatePr, spreading preference?.automation_handoff after setting new values can cause stale data, like integration_id, to overwrite the intended configuration due to a race condition.
Severity: CRITICAL

Suggested Fix

Reverse the order of properties in the updatedHandoff object. Spread preference?.automation_handoff first, and then define the explicit properties like handoff_point, target, and integration_id. This ensures that the new, correct values always overwrite any potentially stale values from the preference object.

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/seerAgentHooks.tsx#L231-L238

Potential issue: In the `useMutateCreatePr` hook, the `updatedHandoff` object is
constructed by spreading `preference?.automation_handoff` after explicitly setting
`handoff_point`, `target`, and `integration_id`. This object spread order is incorrect.
If a user changes the selected agent and then quickly toggles the 'auto-create PR'
switch, a race condition can occur. The `preference` object may still contain stale data
from the previously selected agent. When spread, this stale data, particularly the
`integration_id`, will overwrite the new, correct values, causing the automation
settings to be saved with an incorrect agent ID.

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

Copy link
Contributor

@cursor cursor bot left a comment

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 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

autofixSettings?.automatedRunStoppingPoint ?? 'code_changes',
automation_handoff: autofixSettings?.automationHandoff ?? undefined,
};
}, [autofixSettings]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Table row mutations wipe project repositories with empty array

High Severity

The preference object constructed in the table row hardcodes repositories: []. When useMutateSelectedAgent or useMutateCreatePr fires from this row, it sends repositories: [] to the /seer/preferences/ POST endpoint, which forwards the full payload (including the empty repositories array) to Seer's backend. This overwrites the project's actual configured repositories with an empty list, causing data loss. The bulk settings API only provides reposCount (a number), not the actual SeerRepoDefinition[] array, so the table row has no way to populate it correctly.

Additional Locations (1)

Fix in Cursor Fix in Web

@ryan953 ryan953 marked this pull request as draft March 8, 2026 20:27
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