From 872c5d9f74da62a39c693d15a288c3439ca6fbb3 Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Fri, 8 May 2026 15:57:19 -0400 Subject: [PATCH] ref(alerts): drop SystemAlerts from the init queue component map Backend partial/alerts.html no longer pushes a SystemAlerts renderReact config (see prior commit). Remove the matching frontend entry from COMPONENT_MAP, the SentryInitRenderReactComponent enum, and the corresponding test. --- .../app/bootstrap/processInitQueue.spec.tsx | 19 ------------------- static/app/bootstrap/processInitQueue.tsx | 2 -- static/app/types/system.tsx | 1 - static/app/views/app/appBodyContent.tsx | 2 +- static/app/views/app/systemAlerts.tsx | 4 +--- static/app/views/organizationLayout/index.tsx | 2 +- static/gsAdmin/views/layout.tsx | 2 +- 7 files changed, 4 insertions(+), 28 deletions(-) diff --git a/static/app/bootstrap/processInitQueue.spec.tsx b/static/app/bootstrap/processInitQueue.spec.tsx index 4daa33d0c355..b0c1d7c500cb 100644 --- a/static/app/bootstrap/processInitQueue.spec.tsx +++ b/static/app/bootstrap/processInitQueue.spec.tsx @@ -10,7 +10,6 @@ import {TeamFixture} from 'sentry-fixture/team'; import {screen, userEvent, waitFor} from 'sentry-test/reactTestingLibrary'; import {processInitQueue} from 'sentry/bootstrap/processInitQueue'; -import {AlertStore} from 'sentry/stores/alertStore'; import {IndicatorStore} from 'sentry/stores/indicatorStore'; import {SentryInitRenderReactComponent} from 'sentry/types/system'; @@ -61,24 +60,6 @@ describe('processInitQueue', () => { processInitQueue(); expect(await screen.findByText('Indicator Alert')).toBeInTheDocument(); }); - it('renders system alerts', async () => { - window.__onSentryInit = [ - { - component: SentryInitRenderReactComponent.SYSTEM_ALERTS, - container: '#system-alerts-container', - name: 'renderReact', - }, - ]; - - AlertStore.addAlert({ - message: 'System Alert', - variant: 'success', - }); - - render(
); - processInitQueue(); - expect(await screen.findByText('System Alert')).toBeInTheDocument(); - }); it('renders setup wizard', async () => { window.__onSentryInit = [ { diff --git a/static/app/bootstrap/processInitQueue.tsx b/static/app/bootstrap/processInitQueue.tsx index 79d6f9f52756..ddf4fd4fe084 100644 --- a/static/app/bootstrap/processInitQueue.tsx +++ b/static/app/bootstrap/processInitQueue.tsx @@ -21,8 +21,6 @@ const queryClient = new QueryClient(DEFAULT_QUERY_CLIENT_CONFIG); const COMPONENT_MAP = { [SentryInitRenderReactComponent.INDICATORS]: () => import(/* webpackChunkName: "Indicators" */ 'sentry/components/indicators'), - [SentryInitRenderReactComponent.SYSTEM_ALERTS]: () => - import(/* webpackChunkName: "SystemAlerts" */ 'sentry/views/app/systemAlerts'), [SentryInitRenderReactComponent.SETUP_WIZARD]: () => import(/* webpackChunkName: "SetupWizard" */ 'sentry/views/setupWizard'), [SentryInitRenderReactComponent.WEB_AUTHN_ASSSERT]: () => diff --git a/static/app/types/system.tsx b/static/app/types/system.tsx index 56a02824be3b..6592a180fa1e 100644 --- a/static/app/types/system.tsx +++ b/static/app/types/system.tsx @@ -9,7 +9,6 @@ import type {User} from './user'; export enum SentryInitRenderReactComponent { INDICATORS = 'Indicators', SETUP_WIZARD = 'SetupWizard', - SYSTEM_ALERTS = 'SystemAlerts', WEB_AUTHN_ASSSERT = 'WebAuthnAssert', SU_STAFF_ACCESS_FORM = 'SuperuserStaffAccessForm', } diff --git a/static/app/views/app/appBodyContent.tsx b/static/app/views/app/appBodyContent.tsx index 3218b29124b3..5c1e0e19f678 100644 --- a/static/app/views/app/appBodyContent.tsx +++ b/static/app/views/app/appBodyContent.tsx @@ -3,7 +3,7 @@ import {Outlet} from 'react-router-dom'; import {useHasPageFrameFeature} from 'sentry/views/navigation/useHasPageFrameFeature'; -import SystemAlerts from './systemAlerts'; +import {SystemAlerts} from './systemAlerts'; interface AppContentProps { children: React.ReactNode; diff --git a/static/app/views/app/systemAlerts.tsx b/static/app/views/app/systemAlerts.tsx index d5feb582f594..4f43c17c45c0 100644 --- a/static/app/views/app/systemAlerts.tsx +++ b/static/app/views/app/systemAlerts.tsx @@ -7,7 +7,7 @@ import {AlertMessage} from './alertMessage'; type Props = {className?: string}; -function SystemAlerts(props: Props) { +export function SystemAlerts(props: Props) { const alerts = useLegacyStore(AlertStore); return ( @@ -18,5 +18,3 @@ function SystemAlerts(props: Props) { ); } - -export default SystemAlerts; diff --git a/static/app/views/organizationLayout/index.tsx b/static/app/views/organizationLayout/index.tsx index e8209151a195..3422ba22c08b 100644 --- a/static/app/views/organizationLayout/index.tsx +++ b/static/app/views/organizationLayout/index.tsx @@ -23,7 +23,7 @@ import {useRouteAnalyticsHookSetup} from 'sentry/utils/routeAnalytics/useRouteAn import {useInitSentryToolbar} from 'sentry/utils/useInitSentryToolbar'; import {useOrganization} from 'sentry/utils/useOrganization'; import {AppBodyContent} from 'sentry/views/app/appBodyContent'; -import SystemAlerts from 'sentry/views/app/systemAlerts'; +import {SystemAlerts} from 'sentry/views/app/systemAlerts'; import {useReleasesDrawer} from 'sentry/views/explore/releases/drawer/useReleasesDrawer'; import {useRegisterDomainViewUsage} from 'sentry/views/insights/common/utils/domainRedirect'; import {Navigation} from 'sentry/views/navigation'; diff --git a/static/gsAdmin/views/layout.tsx b/static/gsAdmin/views/layout.tsx index 01da9cd4db54..89e36e48e753 100644 --- a/static/gsAdmin/views/layout.tsx +++ b/static/gsAdmin/views/layout.tsx @@ -14,7 +14,7 @@ import {ScrapsProviders} from 'sentry/scrapsProviders'; import {localStorageWrapper} from 'sentry/utils/localStorage'; // eslint-disable-next-line no-restricted-imports import {darkTheme, lightTheme} from 'sentry/utils/theme/theme'; -import SystemAlerts from 'sentry/views/app/systemAlerts'; +import {SystemAlerts} from 'sentry/views/app/systemAlerts'; import {GlobalStyles} from 'admin/globalStyles';