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
2 changes: 2 additions & 0 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:seer-coding-agent-integrations", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable Seer Explorer panel for AI-powered data exploration
manager.add("organizations:seer-explorer", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable Seer GTM Settings page designs
manager.add("organizations:seer-settings-gtm", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable search query builder boolean operator select feature
manager.add("organizations:search-query-builder-add-boolean-operator-select", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable search query builder case insensitivity features
Expand Down
13 changes: 12 additions & 1 deletion static/app/router/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1214,10 +1214,21 @@ function buildRoutes(): RouteObject[] {
{
path: 'seer/',
name: t('Seer Automation'),
component: make(() => import('getsentry/views/seerAutomation/index')),
children: [
{
index: true,
component: make(() => import('getsentry/views/seerAutomation')),
component: make(() => import('getsentry/views/seerAutomation/seerAutomation')),
},
{
path: 'projects/',
name: t('Seer'),
component: make(() => import('getsentry/views/seerAutomation/projects')),
},
{
path: 'repositories/',
name: t('Seer'),
component: make(() => import('getsentry/views/seerAutomation/repositories')),
},
{
path: 'onboarding/',
Expand Down
6 changes: 3 additions & 3 deletions static/gsApp/views/seerAutomation/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {act, render, screen, userEvent, waitFor} from 'sentry-test/reactTestingL

import ProjectsStore from 'sentry/stores/projectsStore';

import SeerAutomationRoot from './index';
import SeerAutomation from 'getsentry/views/seerAutomation/seerAutomation';

describe('SeerAutomation', () => {
beforeEach(() => {
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('SeerAutomation', () => {
},
});

render(<SeerAutomationRoot />, {organization});
render(<SeerAutomation />, {organization});

// Project details populate the project list
const projectItem = await screen.findByText(project.slug);
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('SeerAutomation', () => {
},
});

render(<SeerAutomationRoot />, {organization});
render(<SeerAutomation />, {organization});

// Find the toggle for Default for Issue Scans
const toggle = await screen.findByRole('checkbox', {
Expand Down
59 changes: 8 additions & 51 deletions static/gsApp/views/seerAutomation/index.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import {Fragment} from 'react';
import {Outlet} from 'react-router-dom';

import {Stack} from '@sentry/scraps/layout/stack';

import {LinkButton} from 'sentry/components/core/button/linkButton';
import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrganizationSeerSetup';
import ExternalLink from 'sentry/components/links/externalLink';
import {NoAccess} from 'sentry/components/noAccess';
import NoProjectMessage from 'sentry/components/noProjectMessage';
import Placeholder from 'sentry/components/placeholder';
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
import {t, tct} from 'sentry/locale';
import {DataCategoryExact} from 'sentry/types/core';
import {t} from 'sentry/locale';
import useOrganization from 'sentry/utils/useOrganization';
import {getPricingDocsLinkForEventType} from 'sentry/views/settings/account/notifications/utils';
import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader';

import AiSetupDataConsent from 'getsentry/components/ai/AiSetupDataConsent';

import {SeerAutomationDefault} from './seerAutomationDefault';
import {SeerAutomationProjectList} from './seerAutomationProjectList';

function SeerAutomationRoot() {
export default function SeerAutomationRoot() {
const organization = useOrganization();
const {isLoading, billing, setupAcknowledgement} = useOrganizationSeerSetup();

Expand All @@ -29,14 +23,12 @@ function SeerAutomationRoot() {
// Show loading placeholders while checking setup
if (isLoading) {
return (
<Fragment>
<Stack gap="lg">
<SentryDocumentTitle title={t('Seer Automation')} orgSlug={organization.slug} />
<Placeholder height="60px" />
<br />
<Placeholder height="200px" />
<br />
<Placeholder height="200px" />
</Fragment>
</Stack>
);
}

Expand All @@ -57,40 +49,5 @@ function SeerAutomationRoot() {
);
}

// Show the regular settings page
return (
<Fragment>
<SentryDocumentTitle title={t('Seer Automation')} orgSlug={organization.slug} />
<SettingsPageHeader
title={t('Seer Automation')}
subtitle={tct(
"Choose how Seer automatically triages and diagnoses incoming issues, before you even notice them. This analysis is billed at the [link:standard rates] for Seer's Issue Scan and Issue Fix. See [spendlink:docs] on how to manage your Seer spend.",
{
link: <ExternalLink href="https://docs.sentry.io/pricing/#seer-pricing" />,
spendlink: (
<ExternalLink
href={getPricingDocsLinkForEventType(DataCategoryExact.SEER_AUTOFIX)}
/>
),
}
)}
action={
<LinkButton
href="https://docs.sentry.io/product/ai-in-sentry/seer/#seer-capabilities"
external
>
{t('Read the docs')}
</LinkButton>
}
/>

<NoProjectMessage organization={organization}>
<SeerAutomationProjectList />
<br />
<SeerAutomationDefault />
</NoProjectMessage>
</Fragment>
);
return <Outlet />;
Copy link
Member Author

Choose a reason for hiding this comment

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

All that stuff got moved into seerAutomation.tsx

}

export default SeerAutomationRoot;
17 changes: 17 additions & 0 deletions static/gsApp/views/seerAutomation/projects.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Feature from 'sentry/components/acl/feature';
import {NoAccess} from 'sentry/components/noAccess';
import useOrganization from 'sentry/utils/useOrganization';

export default function SeerAutomationProjects() {
const organization = useOrganization();

return (
<Feature
features={['seer-settings-gtm']}
organization={organization}
renderDisabled={NoAccess}
>
<div>SeerAutomationProjects</div>
</Feature>
);
}
17 changes: 17 additions & 0 deletions static/gsApp/views/seerAutomation/repositories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Feature from 'sentry/components/acl/feature';
import {NoAccess} from 'sentry/components/noAccess';
import useOrganization from 'sentry/utils/useOrganization';

export default function SeerAutomationRepositories() {
const organization = useOrganization();

return (
<Feature
features={['seer-settings-gtm']}
organization={organization}
renderDisabled={NoAccess}
>
<div>SeerAutomationRepositories</div>
</Feature>
);
}
58 changes: 58 additions & 0 deletions static/gsApp/views/seerAutomation/seerAutomation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import {Fragment} from 'react';

import {LinkButton} from 'sentry/components/core/button/linkButton';
import ExternalLink from 'sentry/components/links/externalLink';
import NoProjectMessage from 'sentry/components/noProjectMessage';
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
import {t, tct} from 'sentry/locale';
import {DataCategoryExact} from 'sentry/types/core';
import useOrganization from 'sentry/utils/useOrganization';
import {getPricingDocsLinkForEventType} from 'sentry/views/settings/account/notifications/utils';
import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader';

import {SeerAutomationDefault} from 'getsentry/views/seerAutomation/components/seerAutomationDefault';
import {SeerAutomationProjectList} from 'getsentry/views/seerAutomation/components/seerAutomationProjectList';
import Settings from 'getsentry/views/seerAutomation/settings';

export default function SeerAutomation() {
const organization = useOrganization();

if (organization.features.includes('seer-settings-gtm')) {
return <Settings />;
}

// Show the regular settings page
return (
<Fragment>
<SentryDocumentTitle title={t('Seer Automation')} orgSlug={organization.slug} />
<SettingsPageHeader
title={t('Seer Automation')}
subtitle={tct(
"Choose how Seer automatically triages and diagnoses incoming issues, before you even notice them. This analysis is billed at the [link:standard rates] for Seer's Issue Scan and Issue Fix. See [spendlink:docs] on how to manage your Seer spend.",
{
link: <ExternalLink href="https://docs.sentry.io/pricing/#seer-pricing" />,
spendlink: (
<ExternalLink
href={getPricingDocsLinkForEventType(DataCategoryExact.SEER_AUTOFIX)}
/>
),
}
)}
action={
<LinkButton
href="https://docs.sentry.io/product/ai-in-sentry/seer/#seer-capabilities"
external
>
{t('Read the docs')}
</LinkButton>
}
/>

<NoProjectMessage organization={organization}>
<SeerAutomationProjectList />
<br />
<SeerAutomationDefault />
</NoProjectMessage>
</Fragment>
);
}
17 changes: 17 additions & 0 deletions static/gsApp/views/seerAutomation/settings.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Feature from 'sentry/components/acl/feature';
import {NoAccess} from 'sentry/components/noAccess';
import useOrganization from 'sentry/utils/useOrganization';

export default function SeerAutomationSettings() {
const organization = useOrganization();

return (
<Feature
features={['seer-settings-gtm']}
organization={organization}
renderDisabled={NoAccess}
>
<div>SeerAutomationSettings</div>
</Feature>
);
}
Loading