Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/sentry/static/sentry/images/logos/logo-cursor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions static/app/components/events/autofix/autofixRootCause.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -311,6 +314,9 @@ function AutofixRootCauseDisplay({
return;
}

// Show immediate loading toast
addLoadingMessage(t('Launching %s...', cursorIntegration.name));

launchCodingAgent({
integrationId: cursorIntegration.id,
agentName: cursorIntegration.name,
Expand Down Expand Up @@ -451,7 +457,12 @@ function AutofixRootCauseDisplay({
items={[
{
key: 'cursor-agent',
label: t('Send to Cursor Background Agent'),
label: (
<Flex gap="md" align="center">
<PluginIcon pluginId="cursor" size={20} />
<div>{t('Send to Cursor Background Agent')}</div>
</Flex>
),
onAction: handleLaunchCodingAgent,
disabled: isLoadingAgents || isLaunchingAgent,
},
Expand All @@ -464,7 +475,13 @@ function AutofixRootCauseDisplay({
busy={isLaunchingAgent}
disabled={isLoadingAgents}
aria-label={t('More solution options')}
icon={<IconChevron direction={isOpen ? 'up' : 'down'} size="xs" />}
icon={
isLaunchingAgent ? (
<LoadingIndicator size={12} />
) : (
<IconChevron direction={isOpen ? 'up' : 'down'} size="xs" />
)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Conflicting Loading States in DropdownTrigger

The DropdownTrigger button uses both the busy prop and a conditional LoadingIndicator icon when isLaunchingAgent is true. This results in conflicting loading states or duplicate loading indicators.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

busy doesn't show a loading indicator. it makes it disabled tho

/>
)}
/>
Expand Down
2 changes: 2 additions & 0 deletions static/app/plugins/components/pluginIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -40,6 +41,7 @@ const PLUGIN_ICONS = {
webhooks: sentry,
'amazon-sqs': aws,
aws_lambda: aws,
cursor,
asana,
bitbucket,
bitbucket_pipelines: bitbucket,
Expand Down
Loading