: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
feat(toolbar): give the toolbar its own urls duplicate with a parity test (#69071)
Rafael Audiberte54dd36d086c
diff --git a/.agents/toolbar-migration.md b/.agents/toolbar-migration.mdindex 76f12ff22f51..fc5cefd33ad8 100644--- a/.agents/toolbar-migration.md+++ b/.agents/toolbar-migration.md@@ -4,9 +4,10 @@ This file is the committed source of truth for the toolbar bundle modernization## Status-- **Current step**: Step 1 (implemented, PR pending review); next up Step 2+- **Current step**: Step 3 (products split) — deliberately landing BEFORE Step 2, see reorder note below. Step 2 (loader + splitting) is implemented and stashed (`toolbar-step2-loader-esm-wip`), gated on the reorder.- **Last updated**: 2026-07-07-- **PRs**: Step 1 — branch `rafa/toolbar-migration-1-graph-guard`+- **PRs**: Step 1 — `rafa/toolbar-migration-1-graph-guard` (#69045); Step 3 — `rafa/toolbar-migration-2-products-urls-split` (stacked on Step 1)+- **Reorder note**: a trial Step 2 build emitted **487 dead chunks** — with `products.tsx` reachable, every product scene's dynamic import becomes a real chunk in `dist/toolbar/`, bloating dist, CI artifacts, and the posthog-js release (all uploaded at 3 CDN prefixes). So the graph cuts that disconnect `products.tsx` land first. After the products split, `products.tsx` is still reachable through exactly two chain families (verified from the metafile): `experimentsTabLogic → scenes/experiments/experimentsLogic → featureFlagsLogic → ProductSetup → products.tsx` (Step 5 cut) and `Elements → HeatmapCanvas → HeatmapEventsPanel → scenes/persons/PersonDisplay → PersonPreview → {personLogic → scenes.ts, NotebookSelectButton → notebooksModel → projectTreeLogic} → products.tsx` (Step 6 cut). Flip the format (Step 2) only once `check-toolbar-graph` shows `src/products.tsx` out of the graph.- **posthog-js prerequisite**: DONE — release pipeline is layout-agnostic and verified as a no-op against today's build. Nothing blocks any step. See Step 0 for the constraints it imposes on the build here.## Why@@ -56,7 +57,9 @@ Work one step per PR (Graphite stack via `gt`; keep the stack shallow — mergeDone when: CI runs the graph check green with the baseline allowlist.-### Step 2 — loader + ESM code splitting (no import-graph changes)+### Step 2 — loader + ESM code splitting (GATED: land after `src/products.tsx` leaves the toolbar graph, see reorder note in Status)++Implementation is done and stashed as `toolbar-step2-loader-esm-wip` (loader.ts, two-config build, esbuilder `esbuildBuild` re-export, globals.d.ts). Known adjustments still needed when unstashing: esbuild 0.25 DOES emit per-chunk CSS files — drop the single-CSS assertion in `finalizeToolbarBuild` and instead require the entry CSS (it holds all statically-reachable styles; chunk CSS is dead weight for lazy scenes, but toolbar features must keep their styles statically imported — recheck at Step 7); surface `finalizeToolbarBuild` errors (buildInParallel's catch swallows them silently).Target layout: `dist/toolbar.js` (~1-2KB classic loader) + `dist/toolbar.css` (single file, esbuild doesn't split CSS) + `dist/toolbar/toolbar-app-<hash>.js` + `dist/toolbar/toolbar-app.js` (hashless fallback) + `dist/toolbar/chunk-*-<hash>.js`.@@ -72,11 +75,14 @@ Target layout: `dist/toolbar.js` (~1-2KB classic loader) + `dist/toolbar.css` (sDone when: ~30% of the bundle is deferred with no source changes and all guards are green. Known-unsupported: exact-path CSP allowlists (`script-src .../toolbar.js`) — document in the PR.-### Step 3 — split the generated products manifest (biggest graph cut; helps the main app too)+### Step 3 — toolbar-owned `urls` duplicate (landed before Step 2, see reorder note)++Approach (revised on review): rather than restructuring the generated products manifest so `scenes/urls` stops dragging it in, the toolbar gets its own deliberately duplicated `frontend/src/toolbar/urls.ts` with only the url helpers it links to, and a parity test keeps it honest. A first version of this PR split `products-urls.tsx` out of the generator; that was reverted as over-engineered — the duplicate + test is simpler to review and keeps the generator untouched.-- [ ] `frontend/build-products.mjs`: emit `frontend/src/products-urls.tsx` (only `productUrls` + the per-property imports it already tracks via `keepOnlyImport`) separately from `products.tsx` (scenes/routes/redirects/configuration; re-export `productUrls` for compat)-- [ ] Repoint `frontend/src/scenes/urls.ts` to `~/products-urls`; strip its value imports (`fileSystemTypes` href loop moves out; `OutputTab` from data-warehouse editor and `DataPipelinesNewSceneKind` become leaf enums or literals)-- [ ] Delete the retired edges from the Step 1 allowlist; coordinate with the `check-eager-graph.mjs` owners (this also shrinks the app's eager path)+- [x] `frontend/src/toolbar/urls.ts`: the 12 helpers toolbar code uses (`action(s)`, `experiment(s)`, `featureFlag(s)`, `productTour`, `sessionProfile`, `settings`, `survey(s)`, `webAnalyticsWebVitals`), plus a documented `urlToResource` null stub (the real one walks a matcher tree built from every product manifest; its only toolbar-shipped consumer is Link's drag-to-notebook annotation, inert on customer pages)+- [x] `frontend/src/toolbar/urls.test.ts`: parity test asserting each helper matches `scenes/urls` byte-for-byte over sample args (the test deliberately crosses the boundary — that's its job); a helper without samples fails+- [x] All 11 toolbar files import `~/toolbar/urls`; their `-> src/scenes/urls.ts` baseline edges are deleted (47 → 36)+- [ ] The 3 lib files shipped in the toolbar (`TZLabel`, `HeatmapEventsPanel`, `Link`) still import `scenes/urls` — they're shared with the app and can't be repointed; the shim added in the next PR resolves `scenes/urls` to the toolbar duplicate at build time, which removes their edges and takes the products manifest out of the toolbar graph entirely### Step 4 — `~/types` hygienediff --git a/frontend/bin/toolbar-graph-baseline.json b/frontend/bin/toolbar-graph-baseline.jsonindex 71aeed57056f..810ab397c1e6 100644--- a/frontend/bin/toolbar-graph-baseline.json+++ b/frontend/bin/toolbar-graph-baseline.json@@ -28,25 +28,14 @@"src/lib/utils/eventUsageLogic.ts -> src/scenes/web-analytics/achievements/recordInteraction.ts","src/taxonomy/helpers.ts -> src/scenes/surveys/surveyQuestionLabelsLogic.ts","src/taxonomy/taxonomy.tsx -> src/scenes/web-analytics/tabs/marketing-analytics/utils.ts",- "src/toolbar/actions/ActionsToolbarMenu.tsx -> src/scenes/urls.ts","src/toolbar/actions/StepField.tsx -> ../products/actions/frontend/utils/hints.tsx",- "src/toolbar/actions/actionsTabLogic.tsx -> src/scenes/urls.ts","src/toolbar/debug/EventDebugMenu.tsx -> src/scenes/session-recordings/components/PanelSettings.tsx",- "src/toolbar/experiments/ExperimentsToolbarMenu.tsx -> src/scenes/urls.ts","src/toolbar/experiments/experimentsTabLogic.tsx -> src/scenes/experiments/experimentsLogic.ts","src/toolbar/experiments/experimentsTabLogic.tsx -> src/scenes/experiments/utils.ts",- "src/toolbar/experiments/experimentsTabLogic.tsx -> src/scenes/urls.ts",- "src/toolbar/flags/FlagsToolbarMenu.tsx -> src/scenes/urls.ts","src/toolbar/product-tours/ProductToursSidebar.tsx -> src/scenes/product-tours/stepUtils.tsx","src/toolbar/product-tours/StepCard.tsx -> src/scenes/product-tours/stepUtils.tsx","src/toolbar/product-tours/productToursLogic.ts -> src/scenes/product-tours/constants.ts","src/toolbar/product-tours/productToursLogic.ts -> src/scenes/product-tours/editor/generateStepHtml.ts",- "src/toolbar/product-tours/productToursLogic.ts -> src/scenes/product-tours/stepUtils.tsx",- "src/toolbar/product-tours/productToursLogic.ts -> src/scenes/urls.ts",- "src/toolbar/stats/HeatmapToolbarMenu.tsx -> src/scenes/urls.ts",- "src/toolbar/surveys/SurveyRow.tsx -> src/scenes/urls.ts",- "src/toolbar/surveys/SurveySidebar.tsx -> src/scenes/urls.ts",- "src/toolbar/surveys/surveysToolbarLogic.ts -> src/scenes/urls.ts",- "src/toolbar/web-vitals/WebVitalsToolbarMenu.tsx -> src/scenes/urls.ts"+ "src/toolbar/product-tours/productToursLogic.ts -> src/scenes/product-tours/stepUtils.tsx"]}diff --git a/frontend/src/toolbar/actions/ActionsToolbarMenu.tsx b/frontend/src/toolbar/actions/ActionsToolbarMenu.tsxindex 70d8782f95a4..da4b3b28c1e3 100644--- a/frontend/src/toolbar/actions/ActionsToolbarMenu.tsx+++ b/frontend/src/toolbar/actions/ActionsToolbarMenu.tsx@@ -8,7 +8,6 @@ import { LemonButton } from 'lib/lemon-ui/LemonButton'import { LemonInput } from 'lib/lemon-ui/LemonInput'import { Link } from 'lib/lemon-ui/Link'import { Spinner } from 'lib/lemon-ui/Spinner'-import { urls } from 'scenes/urls'import { ActionsEditingToolbarMenu } from '~/toolbar/actions/ActionsEditingToolbarMenu'import { ActionsListView } from '~/toolbar/actions/ActionsListView'@@ -16,6 +15,7 @@ import { actionsLogic } from '~/toolbar/actions/actionsLogic'import { actionsTabLogic } from '~/toolbar/actions/actionsTabLogic'import { ToolbarMenu } from '~/toolbar/bar/ToolbarMenu'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'const ActionsListToolbarMenu = (): JSX.Element => {diff --git a/frontend/src/toolbar/actions/actionsTabLogic.tsx b/frontend/src/toolbar/actions/actionsTabLogic.tsxindex 36a2888dbdce..2d7770088381 100644--- a/frontend/src/toolbar/actions/actionsTabLogic.tsx+++ b/frontend/src/toolbar/actions/actionsTabLogic.tsx@@ -3,7 +3,6 @@ import { forms } from 'kea-forms'import { subscriptions } from 'kea-subscriptions'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'-import { urls } from 'scenes/urls'import { actionsLogic } from '~/toolbar/actions/actionsLogic'import { toolbarLogic } from '~/toolbar/bar/toolbarLogic'@@ -11,6 +10,7 @@ import { toolbarApi } from '~/toolbar/toolbarApi'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'import { toolbarPosthogJS } from '~/toolbar/toolbarPosthogJS'import { ActionDraftType, ActionForm } from '~/toolbar/types'+import { urls } from '~/toolbar/urls'import {actionStepToActionStepFormItem,elementToActionStep,@@ -20,7 +20,7 @@ import {import { AccessControlLevel, ActionType, ElementType } from '~/types'import type { actionsTabLogicType } from './actionsTabLogicType'-import { ActionStepPropertyKey } from './ActionStep'+import type { ActionStepPropertyKey } from './ActionStep'function newAction(element: HTMLElement | null,diff --git a/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx b/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsxindex 2ae832861bd3..a521927c3996 100644--- a/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx+++ b/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx@@ -9,7 +9,6 @@ import { LemonButton } from 'lib/lemon-ui/LemonButton'import { LemonInput } from 'lib/lemon-ui/LemonInput'import { Link } from 'lib/lemon-ui/Link'import { Spinner } from 'lib/lemon-ui/Spinner'-import { urls } from 'scenes/urls'import { ToolbarMenu } from '~/toolbar/bar/ToolbarMenu'import { ExperimentsEditingToolbarMenu } from '~/toolbar/experiments/ExperimentsEditingToolbarMenu'@@ -17,6 +16,7 @@ import { ExperimentsListView } from '~/toolbar/experiments/ExperimentsListView'import { experimentsLogic } from '~/toolbar/experiments/experimentsLogic'import { experimentsTabLogic } from '~/toolbar/experiments/experimentsTabLogic'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'const ExperimentsListToolbarMenu = (): JSX.Element => {diff --git a/frontend/src/toolbar/experiments/experimentsTabLogic.tsx b/frontend/src/toolbar/experiments/experimentsTabLogic.tsxindex ae8f38b4d7ba..3749f556e698 100644--- a/frontend/src/toolbar/experiments/experimentsTabLogic.tsx+++ b/frontend/src/toolbar/experiments/experimentsTabLogic.tsx@@ -5,7 +5,6 @@ import { subscriptions } from 'kea-subscriptions'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'import { EXPERIMENT_TARGET_SELECTOR } from 'lib/utils/actions'import { isLaunched } from 'scenes/experiments/experimentsLogic'-import { urls } from 'scenes/urls'import { percentageDistribution } from '~/scenes/experiments/utils'import { toolbarLogic } from '~/toolbar/bar/toolbarLogic'@@ -20,6 +19,7 @@ import { toolbarApi } from '~/toolbar/toolbarApi'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'import { toolbarPosthogJS } from '~/toolbar/toolbarPosthogJS'import { WebExperiment, WebExperimentDraftType, WebExperimentForm } from '~/toolbar/types'+import { urls } from '~/toolbar/urls'import { elementToQuery, joinWithUiHost } from '~/toolbar/utils'import { Experiment, ExperimentIdType } from '~/types'diff --git a/frontend/src/toolbar/flags/FlagsToolbarMenu.tsx b/frontend/src/toolbar/flags/FlagsToolbarMenu.tsxindex 304787bf53e7..ac152d38da86 100644--- a/frontend/src/toolbar/flags/FlagsToolbarMenu.tsx+++ b/frontend/src/toolbar/flags/FlagsToolbarMenu.tsx@@ -13,11 +13,11 @@ import { LemonSwitch } from 'lib/lemon-ui/LemonSwitch'import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea'import { Link } from 'lib/lemon-ui/Link'import { Spinner } from 'lib/lemon-ui/Spinner'-import { urls } from 'scenes/urls'import { ToolbarMenu } from '~/toolbar/bar/ToolbarMenu'import { flagsToolbarLogic } from '~/toolbar/flags/flagsToolbarLogic'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'export const FlagsToolbarMenu = (): JSX.Element => {diff --git a/frontend/src/toolbar/product-tours/productToursLogic.ts b/frontend/src/toolbar/product-tours/productToursLogic.tsindex 099678490e87..c3e2bd89f472 100644--- a/frontend/src/toolbar/product-tours/productToursLogic.ts+++ b/frontend/src/toolbar/product-tours/productToursLogic.ts@@ -17,7 +17,6 @@ import {hasElementTarget,hasIncompleteTargeting,} from 'scenes/product-tours/stepUtils'-import { urls } from 'scenes/urls'import { toolbarLogic } from '~/toolbar/bar/toolbarLogic'import { toolbarApi } from '~/toolbar/toolbarApi'@@ -25,6 +24,7 @@ import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'import { toolbarLogger } from '~/toolbar/toolbarLogger'import { captureToolbarException, toolbarPosthogJS } from '~/toolbar/toolbarPosthogJS'import { ElementRect } from '~/toolbar/types'+import { urls } from '~/toolbar/urls'import { TOOLBAR_ID, elementToActionStep, getRectForElement, joinWithUiHost } from '~/toolbar/utils'import { captureAndUploadElementScreenshot } from '~/toolbar/utils/screenshot'import { ProductTour, ProductTourStep, ProductTourStepType } from '~/types'diff --git a/frontend/src/toolbar/stats/HeatmapToolbarMenu.tsx b/frontend/src/toolbar/stats/HeatmapToolbarMenu.tsxindex 17b575c62fdd..38dd674991d7 100644--- a/frontend/src/toolbar/stats/HeatmapToolbarMenu.tsx+++ b/frontend/src/toolbar/stats/HeatmapToolbarMenu.tsx@@ -14,13 +14,13 @@ import { LemonLabel } from 'lib/lemon-ui/LemonLabel'import { LemonSegmentedButton } from 'lib/lemon-ui/LemonSegmentedButton'import { Spinner } from 'lib/lemon-ui/Spinner'import { Tooltip } from 'lib/lemon-ui/Tooltip'-import { urls } from 'scenes/urls'import { ToolbarMenu } from '~/toolbar/bar/ToolbarMenu'import { elementsLogic } from '~/toolbar/elements/elementsLogic'import { heatmapToolbarMenuLogic } from '~/toolbar/elements/heatmapToolbarMenuLogic'import { currentPageLogic } from '~/toolbar/stats/currentPageLogic'import { useToolbarFeatureFlag } from '~/toolbar/toolbarPosthogJS'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'import { toolbarConfigLogic } from '../toolbarConfigLogic'diff --git a/frontend/src/toolbar/surveys/SurveyRow.tsx b/frontend/src/toolbar/surveys/SurveyRow.tsxindex 5f2d4c0b63b4..195feb5cad87 100644--- a/frontend/src/toolbar/surveys/SurveyRow.tsx+++ b/frontend/src/toolbar/surveys/SurveyRow.tsx@@ -6,9 +6,9 @@ import { LemonBadge } from '@posthog/lemon-ui'import { IconOpenInNew } from 'lib/lemon-ui/icons'import { LemonButton } from 'lib/lemon-ui/LemonButton'import { Link } from 'lib/lemon-ui/Link'-import { urls } from 'scenes/urls'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'import { Survey } from '~/types'diff --git a/frontend/src/toolbar/surveys/SurveySidebar.tsx b/frontend/src/toolbar/surveys/SurveySidebar.tsxindex dd0ec0f0ae4b..ddde2610462d 100644--- a/frontend/src/toolbar/surveys/SurveySidebar.tsx+++ b/frontend/src/toolbar/surveys/SurveySidebar.tsx@@ -10,9 +10,9 @@ import { LemonRadio } from 'lib/lemon-ui/LemonRadio'import { LemonSelect } from 'lib/lemon-ui/LemonSelect'import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea'import { Link } from 'lib/lemon-ui/Link'-import { urls } from 'scenes/urls'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'import { SurveyMatchType } from '~/types'diff --git a/frontend/src/toolbar/surveys/surveysToolbarLogic.ts b/frontend/src/toolbar/surveys/surveysToolbarLogic.tsindex 45647c635f86..2bc05daaeab7 100644--- a/frontend/src/toolbar/surveys/surveysToolbarLogic.ts+++ b/frontend/src/toolbar/surveys/surveysToolbarLogic.ts@@ -2,12 +2,12 @@ import { actions, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'-import { urls } from 'scenes/urls'import { toolbarLogic } from '~/toolbar/bar/toolbarLogic'import { toolbarApi } from '~/toolbar/toolbarApi'import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'import { toolbarPosthogJS } from '~/toolbar/toolbarPosthogJS'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'import {Survey,diff --git a/frontend/src/toolbar/urls.test.ts b/frontend/src/toolbar/urls.test.tsnew file mode 100644index 000000000000..1430550fa3df--- /dev/null+++ b/frontend/src/toolbar/urls.test.ts@@ -0,0 +1,34 @@+// This test deliberately crosses the toolbar/app boundary: it exists to catch the toolbar's+// duplicated url helpers drifting from the app's real routes (e.g. a product manifest changing+// its path shape), which would break every "open in PostHog" link the toolbar renders.+import { urls as appUrls } from 'scenes/urls'++import { urls as toolbarUrls } from '~/toolbar/urls'++describe('toolbar urls duplicate', () => {+ // Every helper in ~/toolbar/urls needs sample args here — the completeness test enforces it.+ const samples: Record<keyof typeof toolbarUrls, unknown[][]> = {+ action: [[123], ['abc-def']],+ actions: [[]],+ experiment: [[42], ['new'], [42, 'edit'], [7, null, { name: 'my experiment' }]],+ experiments: [[]],+ featureFlag: [[123], ['my-flag']],+ featureFlags: [[], ['history']],+ productTour: [['tour-id'], ['tour-id', 'step=2'], ['tour-id', '?step=2']],+ sessionProfile: [['session-uuid']],+ settings: [[], ['project'], ['environment-customization', 'date-and-time'], ['user']],+ survey: [['survey-uuid'], ['new']],+ surveys: [[], ['archived']],+ webAnalyticsWebVitals: [[]],+ }++ it.each(Object.keys(toolbarUrls) as (keyof typeof toolbarUrls)[])('%s matches the app implementation', (helper) => {+ const argSets = samples[helper]+ expect(argSets.length).toBeGreaterThan(0)+ for (const args of argSets) {+ const toolbarResult = (toolbarUrls[helper] as (...a: unknown[]) => string)(...args)+ const appResult = (appUrls[helper] as (...a: unknown[]) => string)(...args)+ expect(toolbarResult).toBe(appResult)+ }+ })+})diff --git a/frontend/src/toolbar/urls.ts b/frontend/src/toolbar/urls.tsnew file mode 100644index 000000000000..ff06668e6ddb--- /dev/null+++ b/frontend/src/toolbar/urls.ts@@ -0,0 +1,41 @@+import { combineUrl } from 'kea-router'++import { toParams } from 'lib/utils/url'++// The toolbar's own copy of the `urls` helpers it links to in the PostHog app. The app's+// `scenes/urls.ts` spreads every product manifest into its `urls` object, which would pull the+// entire product scene graph into the customer-facing toolbar bundle — so toolbar code imports+// this deliberate duplicate instead. `urls.test.ts` asserts each helper stays byte-identical+// with the app implementation; add the matching sample there when you add a helper here.+export const urls = {+ action: (id: string | number): string => `/data-management/actions/${id}`,+ actions: (): string => '/data-management/actions',+ experiment: (+ id: string | number,+ formMode?: string | null,+ options?: {+ name?: string+ }+ ): string => {+ const baseUrl = formMode ? `/experiments/${id}/${formMode}` : `/experiments/${id}`+ return `${baseUrl}${options ? `?${toParams(options)}` : ''}`+ },+ experiments: (): string => '/experiments',+ featureFlag: (id: string | number): string => `/feature_flags/${id}`,+ featureFlags: (tab?: string): string => `/feature_flags${tab ? `?tab=${tab}` : ''}`,+ productTour: (id: string, params?: string): string =>+ `/product_tours/${id}${params ? `?${params.startsWith('?') ? params.slice(1) : params}` : ''}`,+ sessionProfile: (id: string): string => `/sessions/${id}`,+ settings: (section: string = 'project', setting?: string): string =>+ combineUrl(`/settings/${section}`, undefined, setting).url,+ survey: (id: string): string => `/surveys/${id}`,+ surveys: (tab?: string): string => `/surveys${tab ? `?tab=${tab}` : ''}`,+ webAnalyticsWebVitals: (): string => `/web/web-vitals`,+}++// Deliberate stub, NOT parity-tested: the app's urlToResource walks a matcher tree built from+// every product manifest's fileSystemTypes. Its only consumer shipped in the toolbar is Link's+// drag-to-notebook annotation, which doesn't apply on customer pages — null disables it.+export function urlToResource(_url: string): { type: string; ref: string } | null {+ return null+}diff --git a/frontend/src/toolbar/web-vitals/WebVitalsToolbarMenu.tsx b/frontend/src/toolbar/web-vitals/WebVitalsToolbarMenu.tsxindex 5da1b0bb49d0..b1e3f4de7aba 100644--- a/frontend/src/toolbar/web-vitals/WebVitalsToolbarMenu.tsx+++ b/frontend/src/toolbar/web-vitals/WebVitalsToolbarMenu.tsx@@ -3,7 +3,6 @@ import { useValues } from 'kea'import { LemonBanner, Link, Spinner, Tooltip } from '@posthog/lemon-ui'import { inStorybook, inStorybookTestRunner } from 'lib/utils/dom'-import { urls } from 'scenes/urls'import {METRIC_DESCRIPTION,@@ -13,6 +12,7 @@ import {} from '~/queries/nodes/WebVitals/definitions'import { WebVitalsMetric } from '~/queries/schema/schema-general'import { ToolbarMenu } from '~/toolbar/bar/ToolbarMenu'+import { urls } from '~/toolbar/urls'import { joinWithUiHost } from '~/toolbar/utils'import { toolbarConfigLogic } from '../toolbarConfigLogic'