:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(frontend): load the project notice after the shell renders (#126924)
Paul D'Ambra627444fe11a1
diff --git a/frontend/bin/check-eager-graph.mjs b/frontend/bin/check-eager-graph.mjsindex 601a640eaf86..1c6e1803de4c 100644--- a/frontend/bin/check-eager-graph.mjs+++ b/frontend/bin/check-eager-graph.mjs@@ -104,8 +104,8 @@ const ROOTS = [{root: AUTHENTICATED_SHELL,label: 'authenticated shell (every logged-in page)',- // 2026-11-01: 5.27 MiB eager output, stable CSS included. ~0.3% headroom.- budgetBytes: 5_550_000,+ // 2026-11-01: 5.21 MiB eager output, stable CSS included. ~0.3% headroom.+ budgetBytes: 5_480_000,forbidden: ['node_modules/monaco-editor/','products/product_analytics/frontend/insights/activityDescriptions',@@ -123,6 +123,8 @@ const ROOTS = ['src/layout/panel-layout/ProjectTree/menus/SessionReplayMenuItems.tsx',// A hit means a module on the shell path imports taxonomy/registerCoreFilterDefinitions.'src/taxonomy/core-filter-definitions-by-group.json',+ // The project notice logic pulls in dompurify and the sample data logic.+ 'src/layout/navigation/projectNoticeLogic.tsx',// The wizard run card opens this drawer on click, and the drawer pulls in quill primitives.'products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx',// The Today layout renders only behind the today-rail-nav flag, and it pulls in quill primitives.@@ -183,8 +185,8 @@ const ROOTS = ['src/scenes/project-homepage/today/TodayHome.tsx',],label: 'today home path',- // 2026-11-01: 5.71 MiB, stable CSS included. ~0.3% headroom.- budgetBytes: 6_010_000,+ // 2026-11-01: 5.65 MiB, stable CSS included. ~0.3% headroom.+ budgetBytes: 5_945_000,forbidden: ['src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx','src/scenes/project-homepage/today/TodayReportPage.tsx',diff --git a/frontend/src/layout/navigation-3000/components/ProjectNoticeSlot.tsx b/frontend/src/layout/navigation-3000/components/ProjectNoticeSlot.tsxindex 842a8c680cbc..0b205dbf32d1 100644--- a/frontend/src/layout/navigation-3000/components/ProjectNoticeSlot.tsx+++ b/frontend/src/layout/navigation-3000/components/ProjectNoticeSlot.tsx@@ -1,11 +1,23 @@import { useValues } from 'kea'+import { Suspense } from 'react'import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { cn } from 'lib/utils/css-classes'+import { lazyWithRetry } from 'lib/utils/retryImport'+import { ChunkLoadErrorBoundary } from 'scenes/ChunkLoadErrorBoundary'import { sceneLogic } from 'scenes/sceneLogic'import { Scene, SceneConfig } from 'scenes/sceneTypes'-import { ProjectNotice } from '../../navigation/ProjectNotice'+import { ErrorBoundary } from '~/layout/ErrorBoundary'++import type { ProjectNotice as ProjectNoticeComponent } from '../../navigation/ProjectNotice'++// The notice logic pulls in dompurify, the sample data logic and the product push branding.+const loadProjectNotice = (): Promise<{ default: typeof ProjectNoticeComponent }> =>+ import('../../navigation/ProjectNotice').then(({ ProjectNotice }) => ({ default: ProjectNotice }))+// Start the fetch at boot, so the banner usually lands before the scene paints and does not push it down.+void loadProjectNotice().catch(() => {})+const ProjectNotice = lazyWithRetry(loadProjectNotice)/** SceneMenuBar replaces the project notice, so hide the notice when the menu bar is on. */export function ProjectNoticeSlot({@@ -30,11 +42,17 @@ export function ProjectNoticeSlot({'md:ml-[calc(var(--settings-nav-width)+2rem)]': activeSceneId === Scene.Settings,})}>- <ProjectNotice- className={cn('my-0 mb-4', {- 'mt-4': noPaddingScene,- })}- />+ <ErrorBoundary>+ <ChunkLoadErrorBoundary>+ <Suspense fallback={null}>+ <ProjectNotice+ className={cn('my-0 mb-4', {+ 'mt-4': noPaddingScene,+ })}+ />+ </Suspense>+ </ChunkLoadErrorBoundary>+ </ErrorBoundary></div>)}