From b6f1506412e8c0b1d21bd4bb72fb463b42d01e91 Mon Sep 17 00:00:00 2001 From: Jenn Mueng <30991498+jennmueng@users.noreply.github.com> Date: Fri, 24 Oct 2025 00:47:23 +0700 Subject: [PATCH] feat(cursor-agent): set logo + better loading state --- .../sentry/images/logos/logo-cursor.svg | 32 +++++++++++++++++++ .../events/autofix/autofixRootCause.tsx | 21 ++++++++++-- static/app/plugins/components/pluginIcon.tsx | 2 ++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 src/sentry/static/sentry/images/logos/logo-cursor.svg diff --git a/src/sentry/static/sentry/images/logos/logo-cursor.svg b/src/sentry/static/sentry/images/logos/logo-cursor.svg new file mode 100644 index 00000000000000..1f8a7c338a5925 --- /dev/null +++ b/src/sentry/static/sentry/images/logos/logo-cursor.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/static/app/components/events/autofix/autofixRootCause.tsx b/static/app/components/events/autofix/autofixRootCause.tsx index 9d6d1d2cf15f20..a24aea20623d69 100644 --- a/static/app/components/events/autofix/autofixRootCause.tsx +++ b/static/app/components/events/autofix/autofixRootCause.tsx @@ -6,6 +6,7 @@ import {addErrorMessage, addLoadingMessage} from 'sentry/actionCreators/indicato import {Alert} from 'sentry/components/core/alert'; import {Button} from 'sentry/components/core/button'; import {ButtonBar} from 'sentry/components/core/button/buttonBar'; +import {Flex} from 'sentry/components/core/layout'; import {TextArea} from 'sentry/components/core/textarea'; import {DropdownMenu} from 'sentry/components/dropdownMenu'; import {AutofixHighlightWrapper} from 'sentry/components/events/autofix/autofixHighlightWrapper'; @@ -20,8 +21,10 @@ import { useLaunchCodingAgent, } from 'sentry/components/events/autofix/useAutofix'; import {formatRootCauseWithEvent} from 'sentry/components/events/autofix/utils'; +import LoadingIndicator from 'sentry/components/loadingIndicator'; import {IconChat, IconChevron, IconCopy, IconFocus} from 'sentry/icons'; import {t} from 'sentry/locale'; +import {PluginIcon} from 'sentry/plugins/components/pluginIcon'; import {space} from 'sentry/styles/space'; import type {Event} from 'sentry/types/event'; import {trackAnalytics} from 'sentry/utils/analytics'; @@ -311,6 +314,9 @@ function AutofixRootCauseDisplay({ return; } + // Show immediate loading toast + addLoadingMessage(t('Launching %s...', cursorIntegration.name)); + launchCodingAgent({ integrationId: cursorIntegration.id, agentName: cursorIntegration.name, @@ -451,7 +457,12 @@ function AutofixRootCauseDisplay({ items={[ { key: 'cursor-agent', - label: t('Send to Cursor Background Agent'), + label: ( + + +
{t('Send to Cursor Background Agent')}
+
+ ), onAction: handleLaunchCodingAgent, disabled: isLoadingAgents || isLaunchingAgent, }, @@ -464,7 +475,13 @@ function AutofixRootCauseDisplay({ busy={isLaunchingAgent} disabled={isLoadingAgents} aria-label={t('More solution options')} - icon={} + icon={ + isLaunchingAgent ? ( + + ) : ( + + ) + } /> )} /> diff --git a/static/app/plugins/components/pluginIcon.tsx b/static/app/plugins/components/pluginIcon.tsx index eebbbc6a36d1a3..8736193dc69520 100644 --- a/static/app/plugins/components/pluginIcon.tsx +++ b/static/app/plugins/components/pluginIcon.tsx @@ -4,6 +4,7 @@ import aws from 'sentry-logos/logo-aws.svg'; import vsts from 'sentry-logos/logo-azure.svg'; import bitbucketserver from 'sentry-logos/logo-bitbucket-server.svg'; import bitbucket from 'sentry-logos/logo-bitbucket.svg'; +import cursor from 'sentry-logos/logo-cursor.svg'; import placeholder from 'sentry-logos/logo-default.svg'; import discord from 'sentry-logos/logo-discord.svg'; import githubEnterprise from 'sentry-logos/logo-github-enterprise.svg'; @@ -40,6 +41,7 @@ const PLUGIN_ICONS = { webhooks: sentry, 'amazon-sqs': aws, aws_lambda: aws, + cursor, asana, bitbucket, bitbucket_pipelines: bitbucket,