Skip to content

Commit 3445a4a

Browse files
JoshFergeclaude
andauthored
fix(autofix): Show Add Integration CTA when no coding agents installed (#112625)
The coding agent dropdown in the autofix next-step UI was gated on `codingAgentOptions.length > 0`, which meant the "Add Integration" CTA link inside the dropdown footer was only visible to orgs that already had at least one coding agent integration installed. Orgs with zero integrations had no way to discover or install one from the autofix flow. Changed the guard to render the dropdown whenever `codingAgentIntegrations` is defined (i.e. the current step supports coding agents), regardless of whether any are installed. The dropdown now shows the "Add Integration" footer link even when empty, directing users to the integrations settings page. Agent transcript: https://claudescope.sentry.dev/share/PXwCZuS75XHaHSRH9gv580ohH3NWiDH8vmAajsJ010c --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3f10a5d commit 3445a4a

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

static/app/components/events/autofix/v3/nextStep.spec.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,25 @@ describe('SeerDrawerNextStep', () => {
213213
expect(autofix.startStep).toHaveBeenCalledWith('solution', 1);
214214
});
215215

216+
it('shows coding agent dropdown with Add Integration CTA when no integrations exist', async () => {
217+
const autofix = makeAutofix();
218+
render(
219+
<SeerDrawerNextStep
220+
group={GroupFixture()}
221+
sections={[makeSection('root_cause')]}
222+
autofix={autofix}
223+
/>
224+
);
225+
await userEvent.click(
226+
await screen.findByRole('button', {name: 'More code fix options'})
227+
);
228+
const addIntegrationLink = screen.getByRole('button', {name: 'Add Integration'});
229+
expect(addIntegrationLink).toHaveAttribute(
230+
'href',
231+
'/settings/org-slug/integrations/?category=coding%20agent'
232+
);
233+
});
234+
216235
it('shows coding agent dropdown when integrations exist', async () => {
217236
MockApiClient.addMockResponse({
218237
url: '/organizations/org-slug/integrations/coding-agents/',

static/app/components/events/autofix/v3/nextStep.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,10 @@ function NextStepTemplate({
342342
<Button priority="primary" disabled={isProcessing} onClick={onClickYes}>
343343
{labelYes}
344344
</Button>
345-
{codingAgentOptions?.length ? (
345+
{codingAgentIntegrations === undefined ? null : (
346346
<DropdownMenu
347347
items={codingAgentOptions}
348+
isDisabled={false}
348349
trigger={(triggerProps, isOpen) => (
349350
<Button
350351
{...triggerProps}
@@ -367,7 +368,7 @@ function NextStepTemplate({
367368
</DropdownMenuFooter>
368369
}
369370
/>
370-
) : null}
371+
)}
371372
</ButtonBar>
372373
</Flex>
373374
</Flex>

0 commit comments

Comments
 (0)