feat(inbox): Add Seer empty states to assigned issue previews - #121903
feat(inbox): Add Seer empty states to assigned issue previews#121903scttcper wants to merge 2 commits into
Conversation
Assigned issues in Inbox could leave the Seer area empty when Autofix had not started. Reuse the existing Seer quota and setup content for unavailable configurations, and show the start card when Autofix is ready. Co-Authored-By: Codex <noreply@openai.com>
Stop deriving the button icon, variant, and layout from its label. Let each surface provide the complete action and use the button's native busy state while Autofix starts. Co-Authored-By: Codex <noreply@openai.com>
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 070e687. Configure here.
| state !== 'configure' && | ||
| (autofix.isLoading || aiConfig.isAutofixSetupLoading), | ||
| shouldShowSeerActions: | ||
| aiConfig.hasAutofix && (state === 'start' || state === 'summary'), |
There was a problem hiding this comment.
Setup loading treated as unpaid Seer
Medium Severity
useIssuePreviewSeer sets assigned issues to configure whenever hasAutofixQuota is false, but that flag is also false while autofix setup is still loading. That selects configure before the real billing/repo state is known, which hides Seer actions and skips the loading gate. After setup arrives for a ready org, the preview can flash standard issue actions and then swap in the start card.
Reviewed by Cursor Bugbot for commit 070e687. Configure here.
| } | ||
| } | ||
|
|
||
| return { | ||
| aiConfig, | ||
| autofix, | ||
| hasAutofix: aiConfig.hasAutofix, |
There was a problem hiding this comment.
Bug: During the Autofix setup API call, hasAutofixQuota defaults to false, causing the UI to briefly flash the 'configure' state before the correct state is rendered.
Severity: LOW
Suggested Fix
Modify the state logic in useIssuePreviewSeer to account for the loading state of the Autofix setup data. Do not set the state to 'configure' based on the default hasAutofixQuota value. Instead, wait for isAutofixSetupLoading to be false before determining if the configuration state is needed, or show a loading state explicitly.
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/views/issueDetails/issuePreview/issuePreviewSeer.tsx#L26-L32
Potential issue: In `useIssuePreviewSeer`, the component state is determined before the
Autofix setup data has finished loading. While the API call is in flight,
`hasAutofixQuota` defaults to `false` because the underlying query data is `undefined`.
This causes the `state` for an assigned issue to be incorrectly set to `'configure'`.
The component's `isLoading` flag is then set to `false` due to a `state !== 'configure'`
check, which prevents a loading indicator from being shown. As a result, the UI briefly
renders the configuration/upsell content before flashing to the correct content once the
setup data arrives, creating a noticeable UI flicker.
Did we get this right? 👍 / 👎 to inform future reviews.
| variant={action.variant} | ||
| onClick={handleStartRootCause} | ||
| analyticsEventKey="autofix.start_fix_clicked" | ||
| analyticsEventName="Autofix: Start Fix Clicked" |
There was a problem hiding this comment.
We also want to modify these analytics keys to match our "Issue Inbox" keys elsewhere - I just changed a bunch of them to be consistent here: https://github.com/getsentry/sentry/pull/121905/changes
maybe it would make more sense to just extract and use the visual part of it and render a custom button in the inbox (or honestly maybe no button at all since we already have one above)


Adds the missing Seer states to Assigned issue previews in Inbox.
Shows the existing Autofix start card when Seer is ready, and reuses the same quota and project setup component as issue details when Seer is not available yet. Keeps the standard issue actions for setup and upsell states.
Seer ready: Show the Autofix start card.
Seer paid, project not configured: Show project setup.

Seer not paid: Show the Seer upsell.

part of ISWF-3210