diff --git a/static/app/components/events/autofix/v2/explorerSeerDrawer.tsx b/static/app/components/events/autofix/v2/explorerSeerDrawer.tsx
index f7d1ccb0ec6ce6..996d675c57c099 100644
--- a/static/app/components/events/autofix/v2/explorerSeerDrawer.tsx
+++ b/static/app/components/events/autofix/v2/explorerSeerDrawer.tsx
@@ -2,12 +2,13 @@ import {useCallback, useMemo} from 'react';
import styled from '@emotion/styled';
import {AnimatePresence} from 'framer-motion';
-import {Flex} from '@sentry/scraps/layout';
+import {Flex, Stack} from '@sentry/scraps/layout';
+import {Heading, Text} from '@sentry/scraps/text';
import Feature from 'sentry/components/acl/feature';
-import {Breadcrumbs as NavigationBreadcrumbs} from 'sentry/components/breadcrumbs';
+import {Breadcrumbs} from 'sentry/components/breadcrumbs';
import {ProjectAvatar} from 'sentry/components/core/avatar/projectAvatar';
-import {Button, ButtonBar} from 'sentry/components/core/button';
+import {Button} from 'sentry/components/core/button';
import {LinkButton} from 'sentry/components/core/button/linkButton';
import AutofixFeedback from 'sentry/components/events/autofix/autofixFeedback';
import {
@@ -33,7 +34,7 @@ import {ExplorerNextSteps} from 'sentry/components/events/autofix/v2/nextSteps';
import {formatArtifactsToMarkdown} from 'sentry/components/events/autofix/v2/utils';
import {DrawerBody, DrawerHeader} from 'sentry/components/globalDrawer/components';
import Placeholder from 'sentry/components/placeholder';
-import {IconAdd, IconCopy, IconSeer, IconSettings} from 'sentry/icons';
+import {IconCopy, IconRefresh, IconSeer, IconSettings} from 'sentry/icons';
import {t} from 'sentry/locale';
import type {Event} from 'sentry/types/event';
import type {Group} from 'sentry/types/group';
@@ -42,7 +43,6 @@ import type {Project} from 'sentry/types/project';
import {getShortEventId} from 'sentry/utils/events';
import useCopyToClipboard from 'sentry/utils/useCopyToClipboard';
import useOrganization from 'sentry/utils/useOrganization';
-import {MIN_NAV_HEIGHT} from 'sentry/views/issueDetails/streamline/eventTitle';
import type {useAiConfig} from 'sentry/views/issueDetails/streamline/hooks/useAiConfig';
import {SeerNotices} from 'sentry/views/issueDetails/streamline/sidebar/seerNotices';
import {openSeerExplorer} from 'sentry/views/seerExplorer/openSeerExplorer';
@@ -60,45 +60,59 @@ interface ExplorerSeerDrawerProps {
const drawerBreadcrumbs = (group: Group, event: Event, project: Project) => [
{
label: (
-
+
- {group.shortId}
-
+ {group.shortId}
+
),
},
{label: getShortEventId(event.id)},
{label: t('Seer')},
];
-interface DrawerNavigatorProps {
- iconAnimation: 'loading' | 'waiting';
+interface SeerDrawerHeaderProps {
+ event: Event;
+ group: Group;
+ project: Project;
+}
+
+function SeerDrawerHeader({event, group, project}: SeerDrawerHeaderProps) {
+ const breadcrumbs = useMemo(
+ () => drawerBreadcrumbs(group, event, project),
+ [group, event, project]
+ );
+ return (
+
+
+
+ );
+}
+
+interface SeerDrawerNavigatorProps {
organization: Organization;
project: Project;
- copyButtonDisabled?: boolean;
+ loading?: boolean;
onCopyMarkdown?: () => void;
onReset?: () => void;
}
-/**
- * Common navigator section with header and buttons.
- */
-function DrawerNavigator({
- iconAnimation,
+function SeerDrawerNavigator({
+ loading,
organization,
project,
- copyButtonDisabled = false,
onCopyMarkdown,
onReset,
-}: DrawerNavigatorProps) {
+}: SeerDrawerNavigatorProps) {
return (
-
-
-
-
-
-
+
+
+
+ {t('Seer')}
+
+
+
+
-
}
- disabled={copyButtonDisabled}
+ disabled={!onCopyMarkdown}
/>
}
+ icon={}
aria-label={t('Start a new analysis from scratch')}
title={t('Start a new analysis from scratch')}
disabled={!onReset}
/>
-
-
+
+
);
}
@@ -219,11 +233,6 @@ export function ExplorerSeerDrawer({
copy(markdownText, {successMessage: t('Analysis copied to clipboard.')});
}, [artifacts, group, event, copy]);
- const breadcrumbs = useMemo(
- () => drawerBreadcrumbs(group, event, project),
- [group, event, project]
- );
-
const hasArtifacts =
!!artifacts.root_cause?.data ||
!!artifacts.solution?.data ||
@@ -234,21 +243,18 @@ export function ExplorerSeerDrawer({
if (isLoading) {
return (
-
-
-
-
+
-
+
-
+
);
}
@@ -257,13 +263,9 @@ export function ExplorerSeerDrawer({
if (!runState && aiConfig.hasAutofix) {
return (
-
-
-
-
+
-
-
-
-
+
-
-
-
- reset()}
+
+
@@ -425,23 +418,6 @@ const DrawerContainer = styled('div')`
background: ${p => p.theme.tokens.background.secondary};
`;
-const SeerDrawerHeader = styled(DrawerHeader)`
- position: unset;
- max-height: ${MIN_NAV_HEIGHT}px;
- box-shadow: none;
- border-bottom: 1px solid ${p => p.theme.tokens.border.primary};
-`;
-
-const SeerDrawerNavigator = styled('div')`
- display: flex;
- align-items: center;
- padding: ${p => p.theme.space.sm} ${p => p.theme.space['2xl']};
- background: ${p => p.theme.tokens.background.primary};
- z-index: 1;
- min-height: ${MIN_NAV_HEIGHT}px;
- box-shadow: ${p => p.theme.tokens.border.transparent.neutral.muted} 0 1px;
-`;
-
const SeerDrawerBody = styled(DrawerBody)`
overflow: auto;
overscroll-behavior: contain;
@@ -453,43 +429,11 @@ const SeerDrawerBody = styled(DrawerBody)`
}
`;
-const HeaderContainer = styled('div')`
- display: flex;
- align-items: center;
- gap: ${p => p.theme.space.sm};
-`;
-
-const Header = styled('h3')`
- font-size: ${p => p.theme.fontSize.xl};
- font-weight: ${p => p.theme.fontWeight.bold};
- margin: 0;
-`;
-
-const NavigationCrumbs = styled(NavigationBreadcrumbs)`
+const NavigationBreadcrumbs = styled(Breadcrumbs)`
margin: 0;
padding: 0;
`;
-const CrumbContainer = styled('div')`
- display: flex;
- gap: ${p => p.theme.space.md};
- align-items: center;
-`;
-
-const ShortId = styled('div')`
- font-family: ${p => p.theme.text.family};
- font-size: ${p => p.theme.fontSize.md};
- line-height: 1;
-`;
-
-const ButtonWrapper = styled(ButtonBar)`
- margin-left: auto;
-`;
-
-const PlaceholderStack = styled('div')`
- display: flex;
- flex-direction: column;
- gap: ${p => p.theme.space.xl};
- margin-top: ${p => p.theme.space.xl};
- padding: ${p => p.theme.space.xl};
+const SeerDrawerNavigatorContainer = styled(Flex)`
+ box-shadow: ${p => p.theme.tokens.border.transparent.neutral.muted} 0 1px;
`;