Skip to content

Commit ec9d736

Browse files
authored
chore(autofix): Seer beta banner copy changes (#92576)
Show different banners depending on whether a customer is sales led or not. <img width="761" alt="Screenshot 2025-05-30 at 12 03 05 PM" src="https://github.com/user-attachments/assets/11ec6c56-45af-4786-9319-b29fe3c53844" />
1 parent 8fb88cb commit ec9d736

File tree

4 files changed

+99
-43
lines changed

4 files changed

+99
-43
lines changed

static/app/types/hooks.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ type ComponentHooks = {
193193
'component:replay-onboarding-alert': () => React.ComponentType<ReplayOnboardingAlertProps>;
194194
'component:replay-onboarding-cta': () => React.ComponentType<ReplayOnboardingCTAProps>;
195195
'component:replay-settings-alert': () => React.ComponentType | null;
196+
'component:seer-beta-closing-alert': () => React.ComponentType;
196197
'component:superuser-access-category': React.ComponentType<any>;
197198
'component:superuser-warning': React.ComponentType<any>;
198199
'component:superuser-warning-excluded': SuperuserWarningExcluded;

static/app/views/issueDetails/streamline/sidebar/seerNotices.tsx

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import {LinkButton} from 'sentry/components/core/button/linkButton';
1818
import {useProjectSeerPreferences} from 'sentry/components/events/autofix/preferences/hooks/useProjectSeerPreferences';
1919
import {useAutofixRepos} from 'sentry/components/events/autofix/useAutofix';
2020
import {GuidedSteps} from 'sentry/components/guidedSteps/guidedSteps';
21+
import HookOrDefault from 'sentry/components/hookOrDefault';
2122
import ExternalLink from 'sentry/components/links/externalLink';
22-
import {IconChevron, IconClose} from 'sentry/icons';
23+
import {IconChevron} from 'sentry/icons';
2324
import {t, tct} from 'sentry/locale';
2425
import {space} from 'sentry/styles/space';
2526
import type {Project} from 'sentry/types/project';
2627
import {FieldKey} from 'sentry/utils/fields';
27-
import useDismissAlert from 'sentry/utils/useDismissAlert';
2828
import {useLocalStorageState} from 'sentry/utils/useLocalStorageState';
2929
import useOrganization from 'sentry/utils/useOrganization';
3030
import {useCreateGroupSearchView} from 'sentry/views/issueList/mutations/useCreateGroupSearchView';
@@ -37,41 +37,10 @@ interface SeerNoticesProps {
3737
hasGithubIntegration?: boolean;
3838
}
3939

40-
// Temporary Seer beta closing alert
41-
function SeerBetaClosingAlert() {
42-
const {isDismissed, dismiss} = useDismissAlert({
43-
key: 'seer-beta-closing-alert-dismissed',
44-
});
45-
if (isDismissed) return null;
46-
return (
47-
<StyledAlert
48-
type="info"
49-
showIcon
50-
trailingItems={
51-
<Button
52-
aria-label="dismiss"
53-
icon={<IconClose />}
54-
onClick={dismiss}
55-
size="zero"
56-
borderless
57-
/>
58-
}
59-
>
60-
<AlertBody>
61-
<span>
62-
<b>Seer beta is ending soon</b>
63-
</span>
64-
<span>
65-
Thanks for trying Seer. FYI: Starting June 10th, Seer will require a $20/month
66-
subscription to continue scanning and fixing issues.
67-
</span>
68-
<ExternalLink href="https://docs.sentry.io/pricing/#seer-pricing/">
69-
Learn more
70-
</ExternalLink>
71-
</AlertBody>
72-
</StyledAlert>
73-
);
74-
}
40+
const SeerBetaClosingAlert = HookOrDefault({
41+
hookName: 'component:seer-beta-closing-alert',
42+
defaultComponent: () => <div data-test-id="seer-beta-closing-alert" />,
43+
});
7544

7645
export function SeerNotices({groupId, hasGithubIntegration, project}: SeerNoticesProps) {
7746
const organization = useOrganization();
@@ -394,12 +363,6 @@ const StyledAlert = styled(Alert)`
394363
margin-bottom: ${space(2)};
395364
`;
396365

397-
const AlertBody = styled('div')`
398-
display: flex;
399-
flex-direction: column;
400-
gap: ${space(0.5)};
401-
`;
402-
403366
const NoticesContainer = styled('div')`
404367
display: flex;
405368
flex-direction: column;
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import styled from '@emotion/styled';
2+
3+
import {Alert} from 'sentry/components/core/alert';
4+
import {Button} from 'sentry/components/core/button';
5+
import ExternalLink from 'sentry/components/links/externalLink';
6+
import {IconClose} from 'sentry/icons';
7+
import {space} from 'sentry/styles/space';
8+
import useDismissAlert from 'sentry/utils/useDismissAlert';
9+
10+
import useSubscription from 'getsentry/hooks/useSubscription';
11+
import {BillingType} from 'getsentry/types';
12+
13+
// Temporary Seer beta closing alert
14+
function SeerBetaClosingAlert() {
15+
const {isDismissed, dismiss} = useDismissAlert({
16+
key: 'seer-beta-closing-alert-dismissed',
17+
});
18+
const subscription = useSubscription();
19+
const isTouchCustomer = subscription?.type === BillingType.INVOICED;
20+
21+
if (isDismissed) return null;
22+
if (isTouchCustomer) {
23+
return (
24+
<StyledAlert
25+
type="info"
26+
showIcon
27+
trailingItems={
28+
<Button
29+
aria-label="dismiss"
30+
icon={<IconClose />}
31+
onClick={dismiss}
32+
size="zero"
33+
borderless
34+
/>
35+
}
36+
>
37+
<AlertBody>
38+
<span>
39+
<b>Seer beta is ending soon</b>
40+
</span>
41+
<span>
42+
Thanks for trying Seer. Starting June 10, Seer will require a committed budget
43+
to continue scanning and fixing issues. Reach out to your account manager to
44+
learn more.
45+
</span>
46+
</AlertBody>
47+
</StyledAlert>
48+
);
49+
}
50+
return (
51+
<StyledAlert
52+
type="info"
53+
showIcon
54+
trailingItems={
55+
<Button
56+
aria-label="dismiss"
57+
icon={<IconClose />}
58+
onClick={dismiss}
59+
size="zero"
60+
borderless
61+
/>
62+
}
63+
>
64+
<AlertBody>
65+
<span>
66+
<b>Seer beta is ending soon</b>
67+
</span>
68+
<span>
69+
Thanks for trying Seer. Starting June 10, Seer will require a $20/month
70+
subscription to continue scanning and fixing issues.
71+
</span>
72+
<ExternalLink href="https://docs.sentry.io/pricing/#seer-pricing/">
73+
Learn more
74+
</ExternalLink>
75+
</AlertBody>
76+
</StyledAlert>
77+
);
78+
}
79+
80+
export default SeerBetaClosingAlert;
81+
82+
const AlertBody = styled('div')`
83+
display: flex;
84+
flex-direction: column;
85+
gap: ${space(0.5)};
86+
`;
87+
88+
const StyledAlert = styled(Alert)`
89+
margin-bottom: ${space(2)};
90+
`;

static/gsApp/registerHooks.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import HookStore from 'sentry/stores/hookStore';
66
import type {Hooks} from 'sentry/types/hooks';
77

88
import AiSetupDataConsent from 'getsentry/components/ai/AiSetupDataConsent';
9+
import SeerBetaClosingAlert from 'getsentry/components/ai/SeerBetaClosingAlert';
910
import CronsBillingBanner from 'getsentry/components/crons/cronsBillingBanner';
1011
import DashboardBanner from 'getsentry/components/dashboardBanner';
1112
import DataConsentBanner from 'getsentry/components/dataConsentBanner';
@@ -204,6 +205,7 @@ const GETSENTRY_HOOKS: Partial<Hooks> = {
204205
'component:insights-date-range-query-limit-footer': () =>
205206
InsightsDateRangeQueryLimitFooter,
206207
'component:ai-setup-data-consent': () => AiSetupDataConsent,
208+
'component:seer-beta-closing-alert': () => SeerBetaClosingAlert,
207209
'component:codecov-integration-settings-link': () => CodecovSettingsLink,
208210
'component:continuous-profiling-beta-banner': () => ContinuousProfilingBetaAlertBanner,
209211
'component:continuous-profiling-beta-sdk-banner': () =>

0 commit comments

Comments
 (0)