Skip to content

Commit a4553c1

Browse files
authored
feat(cursor-agent): set logo + better loading state (#102025)
Adds the cursor logo to the Cursor Background Agent integration + a better loading state when launching one <img width="402" height="176" alt="CleanShot 2025-10-24 at 00 28 54@2x" src="https://github.com/user-attachments/assets/9a6ea432-edb3-490c-aeaa-fc62bb89a434" /> <img width="1042" height="560" alt="CleanShot 2025-10-24 at 00 29 41@2x" src="https://github.com/user-attachments/assets/a1ce7e78-babb-4f69-9f1e-b296b3c94552" /> https://github.com/user-attachments/assets/34d72386-c707-4611-896a-30fae4082eac
1 parent a293eee commit a4553c1

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed
Lines changed: 32 additions & 0 deletions
Loading

static/app/components/events/autofix/autofixRootCause.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {addErrorMessage, addLoadingMessage} from 'sentry/actionCreators/indicato
66
import {Alert} from 'sentry/components/core/alert';
77
import {Button} from 'sentry/components/core/button';
88
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
9+
import {Flex} from 'sentry/components/core/layout';
910
import {TextArea} from 'sentry/components/core/textarea';
1011
import {DropdownMenu} from 'sentry/components/dropdownMenu';
1112
import {AutofixHighlightWrapper} from 'sentry/components/events/autofix/autofixHighlightWrapper';
@@ -20,8 +21,10 @@ import {
2021
useLaunchCodingAgent,
2122
} from 'sentry/components/events/autofix/useAutofix';
2223
import {formatRootCauseWithEvent} from 'sentry/components/events/autofix/utils';
24+
import LoadingIndicator from 'sentry/components/loadingIndicator';
2325
import {IconChat, IconChevron, IconCopy, IconFocus} from 'sentry/icons';
2426
import {t} from 'sentry/locale';
27+
import {PluginIcon} from 'sentry/plugins/components/pluginIcon';
2528
import {space} from 'sentry/styles/space';
2629
import type {Event} from 'sentry/types/event';
2730
import {trackAnalytics} from 'sentry/utils/analytics';
@@ -311,6 +314,9 @@ function AutofixRootCauseDisplay({
311314
return;
312315
}
313316

317+
// Show immediate loading toast
318+
addLoadingMessage(t('Launching %s...', cursorIntegration.name));
319+
314320
launchCodingAgent({
315321
integrationId: cursorIntegration.id,
316322
agentName: cursorIntegration.name,
@@ -451,7 +457,12 @@ function AutofixRootCauseDisplay({
451457
items={[
452458
{
453459
key: 'cursor-agent',
454-
label: t('Send to Cursor Background Agent'),
460+
label: (
461+
<Flex gap="md" align="center">
462+
<PluginIcon pluginId="cursor" size={20} />
463+
<div>{t('Send to Cursor Background Agent')}</div>
464+
</Flex>
465+
),
455466
onAction: handleLaunchCodingAgent,
456467
disabled: isLoadingAgents || isLaunchingAgent,
457468
},
@@ -464,7 +475,13 @@ function AutofixRootCauseDisplay({
464475
busy={isLaunchingAgent}
465476
disabled={isLoadingAgents}
466477
aria-label={t('More solution options')}
467-
icon={<IconChevron direction={isOpen ? 'up' : 'down'} size="xs" />}
478+
icon={
479+
isLaunchingAgent ? (
480+
<LoadingIndicator size={12} />
481+
) : (
482+
<IconChevron direction={isOpen ? 'up' : 'down'} size="xs" />
483+
)
484+
}
468485
/>
469486
)}
470487
/>

static/app/plugins/components/pluginIcon.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import aws from 'sentry-logos/logo-aws.svg';
44
import vsts from 'sentry-logos/logo-azure.svg';
55
import bitbucketserver from 'sentry-logos/logo-bitbucket-server.svg';
66
import bitbucket from 'sentry-logos/logo-bitbucket.svg';
7+
import cursor from 'sentry-logos/logo-cursor.svg';
78
import placeholder from 'sentry-logos/logo-default.svg';
89
import discord from 'sentry-logos/logo-discord.svg';
910
import githubEnterprise from 'sentry-logos/logo-github-enterprise.svg';
@@ -40,6 +41,7 @@ const PLUGIN_ICONS = {
4041
webhooks: sentry,
4142
'amazon-sqs': aws,
4243
aws_lambda: aws,
44+
cursor,
4345
asana,
4446
bitbucket,
4547
bitbucket_pipelines: bitbucket,

0 commit comments

Comments
 (0)