: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(alerts): add flagged platform alert list and detail pages (#112163)
Jimmy Zhu7cf51313104d
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 43606e2e4d4b..81821f79e5ec 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -12830,6 +12830,14 @@ snapshots:hash: v1.k794b7964.543e6b89c21b4a0de9fca38a2a7b585c4e467382f5ce5772d50424b866ec9f31.ya9rrl_NUzwRgesGT5CjUr6YpnBH7zRoH2U6TQnyZ5Uscenes-app-persons-modal--with-results--light:hash: v1.k794b7964.892edabd980ca7b6b06f80ed8879ef4b9100ae8ff6a6c03fc77d9a9574a4f553.YVtPZaAGoU1C4_4htQ_YK_xO1AxKBVtTuEEYW-n0eUM+ scenes-app-platformalerts--detail--dark:+ hash: v1.k794b7964.888d953d422c04e421f3603549e4704dd2b718897df92814149c218eec46eca6.lTtI1hfXTS-GDSkgNVVRZ_O3MyyM8GjvCs6ChptwJXI+ scenes-app-platformalerts--detail--light:+ hash: v1.k794b7964.60df5deb2c9dafac546acf889862925d1852290b0ff6fe97168fbc43908a70ec.e17thFNgW2nMl9GRZBa2Bii_TZ4tVHg6ID8RFF6ZXIo+ scenes-app-platformalerts--list--dark:+ hash: v1.k794b7964.aab1c9fbc591759a9e754595061e016837e6c4e862c2360de2168635f64a83ab.5EgAUewtjNyO6pUOWeokaTKJMivFHpfxpi9aOWBt9VM+ scenes-app-platformalerts--list--light:+ hash: v1.k794b7964.de5bad7fdb767b1af67aff9f17311843e261cf6a397ae81eb869be106367bf54.zfo-7njw2DSU3-XaDFSukMRuOZAxgU3CZ4a94pqsapAscenes-app-posthog-ai--chat-history--dark:hash: v1.k794b7964.eee0d73adae1a95b8020e415795b22d598502020aca651bbf0e9d6efc874570d.bRIMlhqBUQzGifiT0EX3if9HvBrvwa0aLAzSQMEAu-wscenes-app-posthog-ai--chat-history--light:diff --git a/frontend/src/productScenes.tsx b/frontend/src/productScenes.tsxindex aa5602f9d1af..8b2ec53666aa 100644--- a/frontend/src/productScenes.tsx+++ b/frontend/src/productScenes.tsx@@ -45,6 +45,8 @@ export const productScenes: Record<string, () => Promise<any>> = {AIObservabilityCluster: () =>import('../../products/ai_observability/frontend/clusters/AIObservabilityClusterScene'),Alerts: () => import('../../products/alerts/frontend/AlertsScene'),+ PlatformAlerts: () => import('../../products/alerts_platform/frontend/PlatformAlertsScene'),+ PlatformAlert: () => import('../../products/alerts_platform/frontend/PlatformAlertScene'),PrecomputeDebug: () => import('../../products/analytics_platform/frontend/PrecomputeDebugScene'),Annotations: () => import('../../products/annotations/frontend/pages/Annotations'),Autoresearch: () => import('../../products/autoresearch/frontend/AutoresearchScene'),diff --git a/frontend/src/products.tsx b/frontend/src/products.tsxindex 01e58567bec3..b95f8ea20c81 100644--- a/frontend/src/products.tsx+++ b/frontend/src/products.tsx@@ -107,6 +107,8 @@ export const productRoutes: Record<string, [string, string]> = {'/prompt-management/prompts': ['AIObservabilityPrompts', 'aiObservabilityPrompts'],'/prompt-management/prompts/:name': ['AIObservabilityPrompt', 'aiObservabilityPrompt'],'/alerts': ['Alerts', 'alerts'],+ '/platform-alerts': ['PlatformAlerts', 'platformAlerts'],+ '/platform-alerts/:id': ['PlatformAlert', 'platformAlert'],'/debug/precompute': ['PrecomputeDebug', 'precomputeDebug'],'/data-management/annotations': ['Annotations', 'annotations'],'/data-management/annotations/:id': ['Annotations', 'annotation'],@@ -642,6 +644,8 @@ export const productConfiguration: Record<string, any> = {iconType: 'inbox',description: 'Monitor insight metrics and get notified when conditions are met.',},+ PlatformAlerts: { name: 'Platform alerts', projectBased: true, iconType: 'inbox' },+ PlatformAlert: { name: 'Platform alert', projectBased: true, iconType: 'inbox' },PrecomputeDebug: {projectBased: true,name: 'Precompute debug',@@ -1309,6 +1313,8 @@ export const productUrls = {`/ai-observability/clusters/${encodeURIComponent(runId)}/${clusterId}`,alert: (alertId: string): string => `/alerts?alert_type=insights&alert_id=${alertId}`,alerts: (): string => '/alerts',+ platformAlerts: (): string => '/platform-alerts',+ platformAlert: (id: string): string => `/platform-alerts/${id}`,precomputeDebug: (): string => `/debug/precompute`,annotations: (): string => '/data-management/annotations',annotation: (id: AnnotationType['id'] | ':id'): string => `/data-management/annotations/${id}`,diff --git a/frontend/src/scenes/sceneTypes.ts b/frontend/src/scenes/sceneTypes.tsindex 6fb3ebb80438..f236dbc2ecd9 100644--- a/frontend/src/scenes/sceneTypes.ts+++ b/frontend/src/scenes/sceneTypes.ts@@ -15,6 +15,8 @@ export enum Scene {AgenticAccountMismatch = 'AgenticAccountMismatch',AgenticAuthorize = 'AgenticAuthorize',Alerts = 'Alerts',+ PlatformAlerts = 'PlatformAlerts',+ PlatformAlert = 'PlatformAlert',Annotations = 'Annotations',Autoresearch = 'Autoresearch',AutoresearchNew = 'AutoresearchNew',diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 38d224f68c3a..7658e2e648ff 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -2531,7 +2531,27 @@ importers:specifier: 'catalog:'version: 0.2.4([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))- products/alerts_platform: {}+ products/alerts_platform:+ dependencies:+ '@posthog/lemon-ui':+ specifier: '*'+ version: 0.0.0([email protected]([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected])))([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))([email protected]([email protected]))([email protected])+ '@types/react':+ specifier: 18.3.27+ version: 18.3.27+ kea:+ specifier: 'catalog:'+ version: 4.0.0-pre.6(patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected])+ kea-loaders:+ specifier: 'catalog:'+ version: 3.1.1([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))+ react:+ specifier: 18.3.1+ version: 18.3.1+ devDependencies:+ '@storybook/react':+ specifier: 'catalog:'+ version: 10.4.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])([email protected](@testing-library/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected])products/analytics_platform:dependencies:diff --git a/products/alerts_platform/frontend/OptionalTimeLabel.tsx b/products/alerts_platform/frontend/OptionalTimeLabel.tsxnew file mode 100644index 000000000000..5ff4607edad8--- /dev/null+++ b/products/alerts_platform/frontend/OptionalTimeLabel.tsx@@ -0,0 +1,5 @@+import { TZLabel } from 'lib/components/TZLabel'++export function OptionalTimeLabel({ time, fallback }: { time: string | null; fallback: string }): JSX.Element {+ return time ? <TZLabel time={time} /> : <span className="text-secondary">{fallback}</span>+}diff --git a/products/alerts_platform/frontend/PlatformAlertConfigurationDetails.tsx b/products/alerts_platform/frontend/PlatformAlertConfigurationDetails.tsxnew file mode 100644index 000000000000..86805858e79e--- /dev/null+++ b/products/alerts_platform/frontend/PlatformAlertConfigurationDetails.tsx@@ -0,0 +1,44 @@+import { TZLabel } from 'lib/components/TZLabel'++import { PlatformAlertConfigurationApi } from './generated/api.schemas'+import { OptionalTimeLabel } from './OptionalTimeLabel'+import {+ SOURCE_KINDS,+ configurationStatus,+ describeCondition,+ describeQuietHours,+ describeSchedule,+} from './platformAlertFormat'+import { PlatformAlertStatusTag } from './PlatformAlertStatusTag'++export function PlatformAlertConfigurationDetails({+ configuration,+}: {+ configuration: PlatformAlertConfigurationApi+}): JSX.Element {+ const rows: [string, JSX.Element | string | number][] = [+ ['Source', SOURCE_KINDS[configuration.source_kind].label],+ ['Status', <PlatformAlertStatusTag key="status" status={configurationStatus(configuration)} />],+ ['Condition', describeCondition(configuration)],+ ['Schedule', describeSchedule(configuration)],+ ['Fires after', `${configuration.datapoints_to_alarm} of ${configuration.evaluation_periods} checks breach`],+ ['Cooldown', `${configuration.cooldown_minutes} min`],+ ['Quiet hours', describeQuietHours(configuration)],+ ['Next check', <OptionalTimeLabel key="next" time={configuration.next_check_at} fallback="Not scheduled" />],+ ['Failed checks in a row', configuration.consecutive_failures],+ ['Configuration ID', configuration.id],+ ['Legacy configuration ID', configuration.legacy_configuration_id ?? 'None'],+ ['Created', <TZLabel key="created" time={configuration.created_at} />],+ ['Updated', <TZLabel key="updated" time={configuration.updated_at} />],+ ]+ return (+ <dl className="grid grid-cols-[max-content_1fr] gap-x-6 gap-y-2 m-0">+ {rows.map(([label, value]) => (+ <div key={label} className="contents">+ <dt className="text-secondary">{label}</dt>+ <dd className="m-0 break-all">{value}</dd>+ </div>+ ))}+ </dl>+ )+}diff --git a/products/alerts_platform/frontend/PlatformAlertGroupsTable.tsx b/products/alerts_platform/frontend/PlatformAlertGroupsTable.tsxnew file mode 100644index 000000000000..cd91c94ff6a1--- /dev/null+++ b/products/alerts_platform/frontend/PlatformAlertGroupsTable.tsx@@ -0,0 +1,41 @@+import { LemonTable, LemonTableColumns } from '@posthog/lemon-ui'++import { PlatformAlertApi } from './generated/api.schemas'+import { OptionalTimeLabel } from './OptionalTimeLabel'+import { PlatformAlertStatusTag } from './PlatformAlertStatusTag'++const COLUMNS: LemonTableColumns<PlatformAlertApi> = [+ {+ title: 'Group',+ dataIndex: 'grouping_key',+ render: (_, alert) => alert.grouping_key || <span className="text-secondary">Ungrouped</span>,+ },+ {+ title: 'State',+ dataIndex: 'state',+ render: (_, alert) => <PlatformAlertStatusTag status={alert.state} />,+ },+ {+ title: 'Firing since',+ render: (_, alert) => <OptionalTimeLabel time={alert.firing_started_at} fallback="Not firing" />,+ },+ {+ title: 'Last notified',+ render: (_, alert) => <OptionalTimeLabel time={alert.last_notified_at} fallback="Never" />,+ },+ {+ title: 'Snoozed until',+ render: (_, alert) => <OptionalTimeLabel time={alert.snooze_until} fallback="Not snoozed" />,+ },+]++export function PlatformAlertGroupsTable({ alerts }: { alerts: readonly PlatformAlertApi[] }): JSX.Element {+ return (+ <LemonTable+ dataSource={[...alerts]}+ columns={COLUMNS}+ rowKey="id"+ emptyState="No checks have run for this alert yet."+ />+ )+}diff --git a/products/alerts_platform/frontend/PlatformAlertScene.tsx b/products/alerts_platform/frontend/PlatformAlertScene.tsxnew file mode 100644index 000000000000..4016ed4ce49f--- /dev/null+++ b/products/alerts_platform/frontend/PlatformAlertScene.tsx@@ -0,0 +1,96 @@+import { useActions, useValues } from 'kea'++import { LemonBanner, LemonButton, Spinner } from '@posthog/lemon-ui'++import { CodeSnippet, Language } from 'lib/components/CodeSnippet'+import { NotFound } from 'lib/components/NotFound'+import { FEATURE_FLAGS } from 'lib/constants'+import { featureFlagLogic } from 'lib/logic/featureFlagLogic'+import { SceneExport } from 'scenes/sceneTypes'++import { SceneContent } from '~/layout/scenes/components/SceneContent'+import { SceneSection } from '~/layout/scenes/components/SceneSection'+import { SceneTitleSection } from '~/layout/scenes/components/SceneTitleSection'++import { PlatformAlertConfigurationDetails } from './PlatformAlertConfigurationDetails'+import { SOURCE_KINDS, sourceAlertUrl } from './platformAlertFormat'+import { PlatformAlertGroupsTable } from './PlatformAlertGroupsTable'+import { PlatformAlertLogicProps, platformAlertLogic } from './platformAlertLogic'++export const scene: SceneExport = {+ component: PlatformAlertScene,+ logic: platformAlertLogic,+ paramsToProps: ({ params: { id } }): PlatformAlertLogicProps => ({ id }),+}++export function PlatformAlertScene(): JSX.Element {+ const { featureFlags } = useValues(featureFlagLogic)+ const { configuration, configurationLoading, configurationError } = useValues(platformAlertLogic)+ const { loadConfiguration } = useActions(platformAlertLogic)++ if (!featureFlags[FEATURE_FLAGS.PLATFORM_ALERTS]) {+ return <NotFound object="page" />+ }++ if (configurationLoading || configurationError || !configuration) {+ return (+ <SceneContent>+ <SceneTitleSection name={configurationLoading ? '' : 'Alert'} resourceType={{ type: 'inbox' }} />+ {configurationLoading || !configurationError ? (+ <Spinner />+ ) : (+ <LemonBanner+ type="error"+ action={{+ children: 'Retry',+ onClick: () => loadConfiguration(),+ 'data-attr': 'platform-alert-retry',+ }}+ >+ Couldn't load this alert. It may have been deleted, or you may not have access to its source.+ Try again, or go back to the alert list.+ </LemonBanner>+ )}+ </SceneContent>+ )+ }++ const sourceLabel = SOURCE_KINDS[configuration.source_kind].label+ const sourceUrl = sourceAlertUrl(configuration)++ return (+ <SceneContent>+ <SceneTitleSection+ name={configuration.name}+ description={`${sourceLabel} alert`}+ resourceType={{ type: 'inbox' }}+ actions={+ sourceUrl ? (+ <LemonButton+ type="secondary"+ size="small"+ to={sourceUrl}+ data-attr="platform-alert-open-source"+ >+ Open in {sourceLabel}+ </LemonButton>+ ) : undefined+ }+ />+ <SceneSection title="Configuration">+ <PlatformAlertConfigurationDetails configuration={configuration} />+ </SceneSection>+ <SceneSection+ title="Groups"+ description="Runtime state for each result group. An alert that does not group results has one row."+ >+ <PlatformAlertGroupsTable alerts={configuration.alerts} />+ </SceneSection>+ <SceneSection title="Source settings">+ <CodeSnippet language={Language.JSON} wrap>+ {JSON.stringify(configuration.source_config, null, 2)}+ </CodeSnippet>+ </SceneSection>+ </SceneContent>+ )+}diff --git a/products/alerts_platform/frontend/PlatformAlertStatusTag.tsx b/products/alerts_platform/frontend/PlatformAlertStatusTag.tsxnew file mode 100644index 000000000000..364d14fe48f4--- /dev/null+++ b/products/alerts_platform/frontend/PlatformAlertStatusTag.tsx@@ -0,0 +1,19 @@+import { LemonTag, LemonTagType } from '@posthog/lemon-ui'++import { PlatformAlertConfigurationStatus } from './platformAlertFormat'++const STATUS_CONFIG: Record<PlatformAlertConfigurationStatus, { label: string; type: LemonTagType }> = {+ not_firing: { label: 'OK', type: 'success' },+ firing: { label: 'Firing', type: 'danger' },+ errored: { label: 'Errored', type: 'danger' },+ snoozed: { label: 'Snoozed', type: 'muted' },+ broken: { label: 'Broken', type: 'danger' },+ disabled: { label: 'Disabled', type: 'muted' },+ not_checked: { label: 'Not checked yet', type: 'default' },+}++export function PlatformAlertStatusTag({ status }: { status: PlatformAlertConfigurationStatus }): JSX.Element {+ // A state added on the backend before this map knows it still renders.+ const { label, type } = STATUS_CONFIG[status] ?? { label: status, type: 'default' }+ return <LemonTag type={type}>{label}</LemonTag>+}diff --git a/products/alerts_platform/frontend/PlatformAlerts.stories.tsx b/products/alerts_platform/frontend/PlatformAlerts.stories.tsxnew file mode 100644index 000000000000..06821850868d--- /dev/null+++ b/products/alerts_platform/frontend/PlatformAlerts.stories.tsx@@ -0,0 +1,99 @@+import { Meta, StoryObj } from '@storybook/react'++import { FEATURE_FLAGS } from 'lib/constants'+import { App } from 'scenes/App'+import { urls } from 'scenes/urls'++import { mswDecorator } from '~/mocks/browser'++import { PlatformAlertConfigurationApi } from './generated/api.schemas'++const CONFIGURATION: PlatformAlertConfigurationApi = {+ id: '0192a5b0-0000-7000-8000-000000000001',+ name: 'Checkout errors above 100',+ enabled: true,+ source_kind: 'logs',+ source_config: {+ serviceNames: ['checkout'],+ severityLevels: ['error'],+ condition: { threshold_count: 100, threshold_operator: 'above', window_minutes: 5 },+ },+ check_interval_minutes: 1,+ recurrence_unit: null,+ anchor_time: null,+ evaluation_periods: 3,+ datapoints_to_alarm: 2,+ cooldown_minutes: 30,+ schedule_restriction: { blocked_windows: [{ start: '22:00', end: '07:00' }] },+ next_check_at: '2026-10-05T12:01:00Z',+ consecutive_failures: 0,+ legacy_configuration_id: '0192a5b0-0000-7000-8000-0000000000aa',+ created_at: '2026-09-20T09:00:00Z',+ updated_at: '2026-10-01T09:00:00Z',+ alerts: [+ {+ id: '0192a5b0-0000-7000-8000-000000000101',+ grouping_key: '',+ state: 'firing',+ firing_started_at: '2026-10-05T11:42:00Z',+ last_notified_at: '2026-10-05T11:42:05Z',+ snooze_until: null,+ },+ ],+}++const DISABLED_CONFIGURATION: PlatformAlertConfigurationApi = {+ ...CONFIGURATION,+ id: '0192a5b0-0000-7000-8000-000000000002',+ name: 'Daily signup volume below 10',+ enabled: false,+ source_kind: 'insight',+ source_config: {+ insight_id: 42,+ condition: {+ threshold: { type: 'absolute', bounds: { lower: 10 } },+ comparison: { type: 'absolute_value' },+ },+ },+ recurrence_unit: 'day',+ anchor_time: '09:00',+ schedule_restriction: null,+ next_check_at: null,+ legacy_configuration_id: null,+ alerts: [],+}++const meta: Meta = {+ component: App,+ title: 'Scenes-App/PlatformAlerts',+ parameters: {+ layout: 'fullscreen',+ viewMode: 'story',+ mockDate: '2026-10-05',+ featureFlags: [FEATURE_FLAGS.PLATFORM_ALERTS],+ },+ decorators: [+ mswDecorator({+ get: {+ '/api/projects/:team_id/platform_alerts/': {+ count: 2,+ next: null,+ previous: null,+ results: [CONFIGURATION, DISABLED_CONFIGURATION],+ },+ [`/api/projects/:team_id/platform_alerts/${CONFIGURATION.id}/`]: CONFIGURATION,+ },+ }),+ ],+}+export default meta++type Story = StoryObj<{}>++export const List: Story = {+ parameters: { pageUrl: urls.platformAlerts() },+}++export const Detail: Story = {+ parameters: { pageUrl: urls.platformAlert(CONFIGURATION.id) },+}diff --git a/products/alerts_platform/frontend/PlatformAlertsScene.tsx b/products/alerts_platform/frontend/PlatformAlertsScene.tsxnew file mode 100644index 000000000000..489b0aa7e363--- /dev/null+++ b/products/alerts_platform/frontend/PlatformAlertsScene.tsx@@ -0,0 +1,110 @@+import { useActions, useValues } from 'kea'++import { LemonBanner, LemonTable, LemonTableColumns, Link } from '@posthog/lemon-ui'++import { NotFound } from 'lib/components/NotFound'+import { FEATURE_FLAGS } from 'lib/constants'+import { featureFlagLogic } from 'lib/logic/featureFlagLogic'+import { SceneExport } from 'scenes/sceneTypes'+import { urls } from 'scenes/urls'++import { SceneContent } from '~/layout/scenes/components/SceneContent'+import { SceneTitleSection } from '~/layout/scenes/components/SceneTitleSection'++import { PlatformAlertConfigurationApi } from './generated/api.schemas'+import { OptionalTimeLabel } from './OptionalTimeLabel'+import { SOURCE_KINDS, configurationStatus, describeCondition, describeSchedule } from './platformAlertFormat'+import { PLATFORM_ALERTS_PAGE_SIZE, platformAlertsLogic } from './platformAlertsLogic'+import { PlatformAlertStatusTag } from './PlatformAlertStatusTag'++export const scene: SceneExport = {+ component: PlatformAlertsScene,+ logic: platformAlertsLogic,+}++const COLUMNS: LemonTableColumns<PlatformAlertConfigurationApi> = [+ {+ title: 'Name',+ dataIndex: 'name',+ render: (_, configuration) => (+ <Link to={urls.platformAlert(configuration.id)} data-attr="platform-alerts-row-link">+ {configuration.name}+ </Link>+ ),+ },+ {+ title: 'Source',+ dataIndex: 'source_kind',+ render: (_, configuration) => SOURCE_KINDS[configuration.source_kind].label,+ },+ {+ title: 'Status',+ render: (_, configuration) => <PlatformAlertStatusTag status={configurationStatus(configuration)} />,+ },+ {+ title: 'Condition',+ render: (_, configuration) => describeCondition(configuration),+ },+ {+ title: 'Schedule',+ render: (_, configuration) => describeSchedule(configuration),+ },+ {+ title: 'Groups',+ render: (_, configuration) => configuration.alerts.length,+ },+ {+ title: 'Next check',+ dataIndex: 'next_check_at',+ render: (_, configuration) => <OptionalTimeLabel time={configuration.next_check_at} fallback="Not scheduled" />,+ },+]++export function PlatformAlertsScene(): JSX.Element {+ const { featureFlags } = useValues(featureFlagLogic)+ const { configurationsPage, configurationsPageLoading, configurationsError, page } = useValues(platformAlertsLogic)+ const { loadConfigurations, setPage } = useActions(platformAlertsLogic)++ if (!featureFlags[FEATURE_FLAGS.PLATFORM_ALERTS]) {+ return <NotFound object="page" />+ }++ return (+ <SceneContent>+ <SceneTitleSection+ name="Platform alerts"+ description="Alert configurations evaluated by the shared alerts platform. Read only."+ resourceType={{ type: 'inbox' }}+ />+ {configurationsError ? (+ <LemonBanner+ type="error"+ action={{+ children: 'Retry',+ onClick: () => loadConfigurations(),+ 'data-attr': 'platform-alerts-retry',+ }}+ >+ Couldn't load alert configurations. Try again in a moment.+ </LemonBanner>+ ) : null}+ {!configurationsError ? (+ <LemonTable+ dataSource={configurationsPage?.results ?? []}+ columns={COLUMNS}+ loading={configurationsPageLoading || configurationsPage === null}+ rowKey="id"+ emptyState="No alert configurations on the platform for this project yet."+ pagination={{+ controlled: true,+ pageSize: PLATFORM_ALERTS_PAGE_SIZE,+ currentPage: page,+ entryCount: configurationsPage?.count ?? 0,+ onForward: configurationsPage?.next ? () => setPage(page + 1) : undefined,+ onBackward: page > 1 ? () => setPage(page - 1) : undefined,+ }}+ />+ ) : null}+ </SceneContent>+ )+}diff --git a/products/alerts_platform/frontend/platformAlertFormat.test.ts b/products/alerts_platform/frontend/platformAlertFormat.test.tsnew file mode 100644index 000000000000..15f863c67f63--- /dev/null+++ b/products/alerts_platform/frontend/platformAlertFormat.test.ts@@ -0,0 +1,108 @@+import {+ BillingAlertConfigurationStateEnumApi as PlatformAlertStateApi,+ CalendarUnitEnumApi,+ PlatformAlertApi,+ PlatformAlertConfigurationApi,+} from './generated/api.schemas'+import {+ PlatformAlertConfigurationStatus,+ configurationStatus,+ describeCondition,+ describeSchedule,+} from './platformAlertFormat'++function makeConfiguration(overrides: Partial<PlatformAlertConfigurationApi> = {}): PlatformAlertConfigurationApi {+ return {+ id: 'configuration-id',+ name: 'Error spike',+ enabled: true,+ source_kind: 'logs',+ source_config: {},+ check_interval_minutes: 1,+ recurrence_unit: null,+ anchor_time: null,+ evaluation_periods: 1,+ datapoints_to_alarm: 1,+ cooldown_minutes: 0,+ schedule_restriction: null,+ next_check_at: null,+ consecutive_failures: 0,+ legacy_configuration_id: null,+ created_at: '2026-10-01T00:00:00Z',+ updated_at: '2026-10-01T00:00:00Z',+ alerts: [],+ ...overrides,+ }+}++function makeAlert(state: PlatformAlertStateApi): PlatformAlertApi {+ return {+ id: `alert-${state}`,+ grouping_key: state,+ state,+ firing_started_at: null,+ last_notified_at: null,+ snooze_until: null,+ }+}++describe('platformAlertFormat', () => {+ test.each<[string, Partial<PlatformAlertConfigurationApi>, PlatformAlertConfigurationStatus]>([+ ['no groups yet', {}, 'not_checked'],+ [+ 'disabled hides group state',+ { enabled: false, alerts: [makeAlert(PlatformAlertStateApi.Firing)] },+ 'disabled',+ ],+ [+ 'one firing group outranks healthy ones',+ {+ alerts: [+ makeAlert(PlatformAlertStateApi.NotFiring),+ makeAlert(PlatformAlertStateApi.Firing),+ makeAlert(PlatformAlertStateApi.Snoozed),+ ],+ },+ 'firing',+ ],+ [+ 'broken outranks firing',+ { alerts: [makeAlert(PlatformAlertStateApi.Firing), makeAlert(PlatformAlertStateApi.Broken)] },+ 'broken',+ ],+ ])('configurationStatus: %s', (_, overrides, expected) => {+ expect(configurationStatus(makeConfiguration(overrides))).toEqual(expected)+ })++ test.each<[string, Partial<PlatformAlertConfigurationApi>, string]>([+ ['interval', { check_interval_minutes: 15 }, 'Every 15 min'],+ [+ 'calendar unit ignores the interval',+ { check_interval_minutes: 15, recurrence_unit: CalendarUnitEnumApi.Week },+ 'Every week',+ ],+ [+ 'calendar unit with anchor',+ { recurrence_unit: CalendarUnitEnumApi.Day, anchor_time: '09:00' },+ 'Every day at 09:00',+ ],+ ])('describeSchedule: %s', (_, overrides, expected) => {+ expect(describeSchedule(makeConfiguration(overrides))).toEqual(expected)+ })++ test.each<[string, Record<string, unknown>, string]>([+ [+ 'logs bound',+ { condition: { threshold_count: 100, threshold_operator: 'below', window_minutes: 5 } },+ 'Below 100 in 5 min',+ ],+ [+ 'insight bound has no one-line form',+ { condition: { threshold: { bounds: { lower: 10 } }, comparison: { type: 'absolute_value' } } },+ 'See source settings',+ ],+ ['no condition', {}, 'See source settings'],+ ])('describeCondition: %s', (_, source_config, expected) => {+ expect(describeCondition(makeConfiguration({ source_config }))).toEqual(expected)+ })+})diff --git a/products/alerts_platform/frontend/platformAlertFormat.ts b/products/alerts_platform/frontend/platformAlertFormat.tsnew file mode 100644index 000000000000..256a61dd38fa--- /dev/null+++ b/products/alerts_platform/frontend/platformAlertFormat.ts@@ -0,0 +1,83 @@+import { urls } from 'scenes/urls'++import {+ BillingAlertConfigurationStateEnumApi as PlatformAlertStateApi,+ CalendarUnitEnumApi,+ PlatformAlertConfigurationApi,+ PlatformAlertConfigurationSourceKindEnumApi,+} from './generated/api.schemas'++export type PlatformAlertConfigurationStatus = PlatformAlertStateApi | 'disabled' | 'not_checked'++interface SourceKind {+ label: string+ // The source product's own page for the alert, reached through the legacy configuration id.+ alertUrl?: (legacyConfigurationId: string) => string+}++export const SOURCE_KINDS: Record<PlatformAlertConfigurationSourceKindEnumApi, SourceKind> = {+ [PlatformAlertConfigurationSourceKindEnumApi.Logs]: {+ label: 'Logs',+ alertUrl: (legacyConfigurationId) => urls.logsAlertDetail(legacyConfigurationId),+ },+ [PlatformAlertConfigurationSourceKindEnumApi.Insight]: {+ label: 'Insight',+ alertUrl: (legacyConfigurationId) => urls.alert(legacyConfigurationId),+ },+}++export function sourceAlertUrl(configuration: PlatformAlertConfigurationApi): string | null {+ const { alertUrl } = SOURCE_KINDS[configuration.source_kind]+ return alertUrl && configuration.legacy_configuration_id ? alertUrl(configuration.legacy_configuration_id) : null+}++// Most urgent first, so a configuration shows the state that needs attention.+const STATE_PRIORITY: PlatformAlertStateApi[] = [+ PlatformAlertStateApi.Broken,+ PlatformAlertStateApi.Errored,+ PlatformAlertStateApi.Firing,+ PlatformAlertStateApi.Snoozed,+ PlatformAlertStateApi.NotFiring,+]++const CALENDAR_UNIT_LABELS: Record<CalendarUnitEnumApi, string> = {+ [CalendarUnitEnumApi.Day]: 'day',+ [CalendarUnitEnumApi.Week]: 'week',+ [CalendarUnitEnumApi.Month]: 'month',+}++export function configurationStatus(configuration: PlatformAlertConfigurationApi): PlatformAlertConfigurationStatus {+ if (!configuration.enabled) {+ return 'disabled'+ }+ const states = new Set(configuration.alerts.map((alert) => alert.state))+ return STATE_PRIORITY.find((state) => states.has(state)) ?? 'not_checked'+}++// Each source keeps its bound under `source_config.condition` in its own shape. Only the logs shape+// reads as one line, so other sources fall back to the raw settings on the detail page.+export function describeCondition(configuration: PlatformAlertConfigurationApi): string {+ const condition = configuration.source_config.condition+ if (typeof condition !== 'object' || condition === null) {+ return 'See source settings'+ }+ const { threshold_operator, threshold_count, window_minutes } = condition as Record<string, unknown>+ if (typeof threshold_count !== 'number' || typeof window_minutes !== 'number') {+ return 'See source settings'+ }+ const operator = threshold_operator === 'below' ? 'Below' : 'Above'+ return `${operator} ${threshold_count} in ${window_minutes} min`+}++export function describeSchedule(configuration: PlatformAlertConfigurationApi): string {+ if (configuration.recurrence_unit === null) {+ return `Every ${configuration.check_interval_minutes} min`+ }+ const unit = CALENDAR_UNIT_LABELS[configuration.recurrence_unit]+ return configuration.anchor_time ? `Every ${unit} at ${configuration.anchor_time}` : `Every ${unit}`+}++export function describeQuietHours(configuration: PlatformAlertConfigurationApi): string {+ const windows = configuration.schedule_restriction?.blocked_windows ?? []+ return windows.length ? windows.map((window) => `${window.start}-${window.end}`).join(', ') : 'None'+}diff --git a/products/alerts_platform/frontend/platformAlertLogic.ts b/products/alerts_platform/frontend/platformAlertLogic.tsnew file mode 100644index 000000000000..ed92f70a4900--- /dev/null+++ b/products/alerts_platform/frontend/platformAlertLogic.ts@@ -0,0 +1,129 @@+import {+ LogicWrapper,+ MakeLogicType,+ afterMount,+ connect,+ kea,+ key,+ listeners,+ path,+ props,+ reducers,+ selectors,+} from 'kea'+import { loaders } from 'kea-loaders'++import { Scene } from 'scenes/sceneTypes'+import { teamLogic } from 'scenes/teamLogic'++import { Breadcrumb } from '~/types'++import { platformAlertsRetrieve } from './generated/api'+import { PlatformAlertConfigurationApi } from './generated/api.schemas'+import { PLATFORM_ALERTS_BREADCRUMB } from './platformAlertsLogic'++export interface PlatformAlertLogicProps {+ id: string+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface platformAlertLogicValues {+ currentTeamId: number | null // teamLogic+ breadcrumbs: Breadcrumb[]+ configuration: PlatformAlertConfigurationApi | null+ configurationError: boolean+ configurationLoading: boolean+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface platformAlertLogicActions {+ loadCurrentTeamSuccess: (+ currentTeam: null | import('~/types').TeamPublicType,+ payload?: any+ ) => {+ currentTeam: null | import('~/types').TeamPublicType+ payload?: any+ } // teamLogic+ loadConfiguration: () => any+ loadConfigurationFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadConfigurationSuccess: (+ configuration: PlatformAlertConfigurationApi | null,+ payload?: any+ ) => {+ configuration: PlatformAlertConfigurationApi | null+ payload?: any+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface platformAlertLogicMeta {+ key: string+ __keaTypeGenInternalSelectorTypes: {+ breadcrumbs: (configuration: PlatformAlertConfigurationApi | null, arg: any) => Breadcrumb[]+ }+}++export type platformAlertLogicType = MakeLogicType<+ platformAlertLogicValues,+ platformAlertLogicActions,+ PlatformAlertLogicProps,+ platformAlertLogicMeta+>++export const platformAlertLogic: LogicWrapper<platformAlertLogicType> = kea<platformAlertLogicType>([+ props({} as PlatformAlertLogicProps),+ key((props) => props.id),+ path((key) => ['products', 'alerts_platform', 'frontend', 'platformAlertLogic', key]),+ connect(() => ({+ values: [teamLogic, ['currentTeamId']],+ actions: [teamLogic, ['loadCurrentTeamSuccess']],+ })),+ loaders(({ values, props }) => ({+ configuration: [+ null as PlatformAlertConfigurationApi | null,+ {+ loadConfiguration: async () => {+ if (!values.currentTeamId) {+ return values.configuration+ }+ return await platformAlertsRetrieve(String(values.currentTeamId), props.id)+ },+ },+ ],+ })),+ reducers({+ configurationError: [+ false,+ {+ loadConfiguration: () => false,+ loadConfigurationFailure: () => true,+ },+ ],+ }),+ selectors({+ breadcrumbs: [+ (s) => [s.configuration, (_, props) => props.id],+ (configuration: PlatformAlertConfigurationApi | null, id: string): Breadcrumb[] => [+ PLATFORM_ALERTS_BREADCRUMB,+ {+ key: [Scene.PlatformAlert, id],+ name: configuration?.name ?? 'Alert',+ },+ ],+ ],+ }),+ listeners(({ actions }) => ({+ loadCurrentTeamSuccess: () => {+ actions.loadConfiguration()+ },+ })),+ afterMount(({ actions }) => {+ actions.loadConfiguration()+ }),+])diff --git a/products/alerts_platform/frontend/platformAlertsLogic.ts b/products/alerts_platform/frontend/platformAlertsLogic.tsnew file mode 100644index 000000000000..975141e8c763--- /dev/null+++ b/products/alerts_platform/frontend/platformAlertsLogic.ts@@ -0,0 +1,121 @@+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { loaders } from 'kea-loaders'++import { Scene } from 'scenes/sceneTypes'+import { teamLogic } from 'scenes/teamLogic'+import { urls } from 'scenes/urls'++import { Breadcrumb } from '~/types'++import { platformAlertsList } from './generated/api'+import { PaginatedPlatformAlertConfigurationListApi } from './generated/api.schemas'++export const PLATFORM_ALERTS_PAGE_SIZE = 50++export const PLATFORM_ALERTS_BREADCRUMB: Breadcrumb = {+ key: Scene.PlatformAlerts,+ name: 'Platform alerts',+ path: urls.platformAlerts(),+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface platformAlertsLogicValues {+ currentTeamId: number | null // teamLogic+ breadcrumbs: Breadcrumb[]+ configurationsError: boolean+ configurationsPage: PaginatedPlatformAlertConfigurationListApi | null+ configurationsPageLoading: boolean+ page: number+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface platformAlertsLogicActions {+ loadCurrentTeamSuccess: (+ currentTeam: null | import('~/types').TeamPublicType,+ payload?: any+ ) => {+ currentTeam: null | import('~/types').TeamPublicType+ payload?: any+ } // teamLogic+ loadConfigurations: (_: void) => void+ loadConfigurationsFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadConfigurationsSuccess: (+ configurationsPage: PaginatedPlatformAlertConfigurationListApi | null,+ payload?: void+ ) => {+ configurationsPage: PaginatedPlatformAlertConfigurationListApi | null+ payload?: void+ }+ setPage: (page: number) => {+ page: number+ }+}++export type platformAlertsLogicType = MakeLogicType<platformAlertsLogicValues, platformAlertsLogicActions>++export const platformAlertsLogic = kea<platformAlertsLogicType>([+ path(['products', 'alerts_platform', 'frontend', 'platformAlertsLogic']),+ connect(() => ({+ values: [teamLogic, ['currentTeamId']],+ actions: [teamLogic, ['loadCurrentTeamSuccess']],+ })),+ actions({+ setPage: (page: number) => ({ page }),+ }),+ reducers({+ page: [+ 1,+ {+ setPage: (_, { page }) => page,+ loadCurrentTeamSuccess: () => 1,+ },+ ],+ }),+ loaders(({ values }) => ({+ configurationsPage: [+ null as PaginatedPlatformAlertConfigurationListApi | null,+ {+ loadConfigurations: async (_: void, breakpoint) => {+ if (!values.currentTeamId) {+ return values.configurationsPage+ }+ const configurationsPage = await platformAlertsList(String(values.currentTeamId), {+ limit: PLATFORM_ALERTS_PAGE_SIZE,+ offset: (values.page - 1) * PLATFORM_ALERTS_PAGE_SIZE,+ })+ breakpoint()+ return configurationsPage+ },+ },+ ],+ })),+ reducers({+ configurationsError: [+ false,+ {+ loadConfigurations: () => false,+ loadConfigurationsFailure: () => true,+ },+ ],+ }),+ selectors({+ breadcrumbs: [() => [], (): Breadcrumb[] => [PLATFORM_ALERTS_BREADCRUMB]],+ }),+ listeners(({ actions }) => ({+ setPage: () => {+ actions.loadConfigurations()+ },+ loadCurrentTeamSuccess: () => {+ actions.loadConfigurations()+ },+ })),+ afterMount(({ actions }) => {+ actions.loadConfigurations()+ }),+])diff --git a/products/alerts_platform/manifest.tsx b/products/alerts_platform/manifest.tsxindex 8181765f8d48..dabb5e689b39 100644--- a/products/alerts_platform/manifest.tsx+++ b/products/alerts_platform/manifest.tsx@@ -2,10 +2,29 @@ import { ProductManifest } from '../../frontend/src/types'export const manifest: ProductManifest = {name: 'AlertsPlatform',- scenes: {},- routes: {},+ scenes: {+ PlatformAlerts: {+ name: 'Platform alerts',+ import: () => import('./frontend/PlatformAlertsScene'),+ projectBased: true,+ iconType: 'inbox',+ },+ PlatformAlert: {+ name: 'Platform alert',+ import: () => import('./frontend/PlatformAlertScene'),+ projectBased: true,+ iconType: 'inbox',+ },+ },+ routes: {+ '/platform-alerts': ['PlatformAlerts', 'platformAlerts'],+ '/platform-alerts/:id': ['PlatformAlert', 'platformAlert'],+ },redirects: {},- urls: {},+ urls: {+ platformAlerts: (): string => '/platform-alerts',+ platformAlert: (id: string): string => `/platform-alerts/${id}`,+ },fileSystemTypes: {},treeItemsNew: [],treeItemsProducts: [],diff --git a/products/alerts_platform/package.json b/products/alerts_platform/package.jsonindex 5944d8f689ed..cd659ebe65b4 100644--- a/products/alerts_platform/package.json+++ b/products/alerts_platform/package.json@@ -3,5 +3,17 @@"scripts": {"backend:test": "pytest -c ../../pytest.ini --rootdir ../.. backend/tests -v --tb=short","backend:contract-check": "echo 'Contract files unchanged'"+ },+ "dependencies": {+ "kea": "catalog:",+ "kea-loaders": "catalog:"+ },+ "devDependencies": {+ "@storybook/react": "catalog:"+ },+ "peerDependencies": {+ "@posthog/lemon-ui": "*",+ "@types/react": "*",+ "react": "*"}}diff --git a/services/mcp/src/tools/links/app-url-manifest.json b/services/mcp/src/tools/links/app-url-manifest.jsonindex 6ac8ef1fbfbd..3dc33877f8fb 100644--- a/services/mcp/src/tools/links/app-url-manifest.json+++ b/services/mcp/src/tools/links/app-url-manifest.json@@ -1339,6 +1339,16 @@"params": [],"scope": "project"},+ "platformAlert": {+ "template": "/platform-alerts/{id}",+ "params": ["id"],+ "scope": "project"+ },+ "platformAlerts": {+ "template": "/platform-alerts",+ "params": [],+ "scope": "project"+ },"precomputeDebug": {"template": "/debug/precompute","params": [],diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.jsonindex 53b9a55bfb7d..0b0572f9980f 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json@@ -13,7 +13,7 @@"type": "object"},"url": {- "description": "A path template copied verbatim from the catalog below (e.g. `/persons/{uuid}`). Its `{placeholders}` are filled from `params`. These slugs come from PostHog's canonical route table, so they are always correct — never pass a path that is not in this list.\n\n/account-connected/{kind}\n/account/credential-review\n/account/social-connected\n/activity-logs\n/activity/{tab}\n/agentic/account-mismatch\n/agentic/authorize\n/ai\n/ai-enrichment\n/ai-evals/datasets\n/ai-evals/datasets/{id}\n/ai-evals/evaluations\n/ai-evals/evaluations/offline/experiments\n/ai-evals/evaluations/offline/experiments/{experimentId}\n/ai-evals/evaluations/scorers\n/ai-evals/evaluations/scorers/{scorerId}\n/ai-evals/evaluations/scorers/{scorerId}/offline\n/ai-evals/evaluations/templates\n/ai-evals/evaluations/{id}\n/ai-evals/taggers\n/ai-evals/taggers/{id}\n/ai-observability/clusters\n/ai-observability/clusters/{runId}/{clusterId}\n/ai-observability/dashboard\n/ai-observability/errors\n/ai-observability/generations\n/ai-observability/playground\n/ai-observability/reviews\n/ai-observability/self-driving\n/ai-observability/sentiment\n/ai-observability/sessions\n/ai-observability/sessions/{id}\n/ai-observability/tools\n/ai-observability/traces\n/ai-observability/traces/{id}\n/ai-observability/users\n/ai/history\n/alerts\n/approvals/{id}\n/autoresearch\n/autoresearch/new\n/autoresearch/{id}\n/bi\n/bi/new\n/bi/{insightShortId}\n/billing/authorization_status\n/broadcasts\n/broadcasts/new\n/broadcasts/{id}\n/business-knowledge\n/business-knowledge/playground\n/business-knowledge/settings\n/business-knowledge/{id}\n/canvas\n/canvases\n/canvases/new\n/canvases/{id}\n/cli/authorize\n/cli/live\n/code-review\n/code/canvas/{channelId}/{dashboardId}\n/code/channel/{channelId}\n/code/loop/{loopId}\n/code/task/{taskId}\n/cohorts\n/cohorts/{id}\n/cohorts/{id}/calculation-history\n/connect/vercel/link\n/coupons/{campaign}\n/create-organization\n/cross-project-dashboards\n/cross-project-dashboards/{id}\n/customer_analytics\n/customer_analytics/accounts\n/customer_analytics/accounts/by-external-id/{externalId}\n/customer_analytics/accounts/{accountId}\n/customer_analytics/announcements\n/customer_analytics/configuration\n/customer_analytics/dashboard\n/customer_analytics/feature-requests\n/customer_analytics/feed\n/customer_analytics/journeys\n/customer_analytics/journeys/new\n/customer_analytics/journeys/templates\n/customer_analytics/journeys/{id}/edit\n/customer_analytics/notes\n/customer_analytics/tasks\n/dashboard\n/dashboard/templates/{templateId}/copy-to-project\n/dashboard/{id}\n/dashboard/{id}/sharing\n/dashboard/{id}/subscriptions\n/dashboard/{id}/subscriptions/{subscriptionId}\n/dashboard/{id}/tiles/{tileId}\n/data-catalog\n/data-catalog/metrics/{name}\n/data-management/actions\n/data-management/actions/new\n/data-management/actions/new/\n/data-management/actions/{id}\n/data-management/annotations\n/data-management/annotations/{id}\n/data-management/core-events\n/data-management/database\n/data-management/destinations\n/data-management/event-filtering\n/data-management/events\n/data-management/events/{id}\n/data-management/events/{id}/edit\n/data-management/history\n/data-management/ingestion-warnings\n/data-management/ingestion-warnings-v2\n/data-management/managed-viewsets\n/data-management/materialized-columns\n/data-management/properties\n/data-management/properties/{id}\n/data-management/properties/{id}/edit\n/data-management/revenue\n/data-management/schema\n/data-management/sources\n/data-management/sources/{id}/schemas\n/data-management/sources/{sourceId}/schemas/{schemaId}\n/data-management/transformations\n/data-management/variables\n/data-management/variables/{id}\n/data-management/variables/{id}/edit\n/data-management/warehouse-destinations\n/data-management/warehouse-properties\n/data-ops\n/data-warehouse/connect\n/data-warehouse/new-source\n/debug\n/debug/hog\n/debug/precompute\n/early_access_features\n/early_access_features/{id}\n/embedded/{token}\n/endpoints\n/endpoints/{name}\n/engineering-analytics/authors\n/engineering-analytics/authors/{handle}\n/engineering-analytics/deploys\n/engineering-analytics/overview\n/engineering-analytics/pull-requests\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/runs/{runId}\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/workflows/{workflowName}\n/engineering-analytics/repos/{repoOwner}/{repoName}/pull-requests/{number}\n/engineering-analytics/teams\n/engineering-analytics/teams/{ownerTeam}\n/engineering-analytics/tests\n/engineering-analytics/workflows\n/error_tracking\n/error_tracking/alerts/new/{templateId}\n/error_tracking/alerts/{id}\n/error_tracking/fingerprint/{fingerprint}\n/error_tracking/{id}\n/etl\n/events/{id}/{timestamp}\n/experiments\n/experiments/shared-metrics\n/experiments/shared-metrics/{id}\n/experiments/staff\n/experiments/{id}\n/exports\n/feature_flags\n/feature_flags/new\n/feature_flags/staff\n/feature_flags/staff/cohorts\n/feature_flags/templates\n/feature_flags/{id}\n/files\n/functions/new/{templateId}\n/functions/{id}\n/games/368hedgehogs\n/games/flappyhog\n/games/shipit\n/groups/{groupTypeIndex}\n/groups/{groupTypeIndex}/new\n/groups/{groupTypeIndex}/{groupKey}\n/health\n/health/alerts\n/health/pipeline-status\n/health/sdk-health\n/health/{category}\n/heatmaps\n/heatmaps/new\n/heatmaps/recording\n/heatmaps/{id}\n/home\n/identity-matching\n/inbox\n/inbox/reports/triage\n/inbox/scout-trials\n/inbox/scouts/findings\n/inbox/scouts/runs\n/inbox/scouts/scratchpad\n/inbox/scouts/{skillName}\n/inbox/{tab}/{reportId}\n/insights\n/insights/new\n/insights/quick-start\n/insights/{id}\n/insights/{id}/edit\n/insights/{id}/sharing\n/insights/{id}/subscriptions\n/insights/{id}/subscriptions/{subscriptionId}\n/insights/{insightShortId}/alerts\n/instance/async_migrations\n/instance/async_migrations/future\n/instance/async_migrations/settings\n/instance/dead_letter_queue\n/instance/kafka_inspector\n/instance/metrics\n/instance/settings\n/instance/staff_users\n/instance/status\n/integrations/stripe/confirm-install\n/integrations/vercel/link-error\n/integrations/{kind}/callback\n/integrations/{slug}\n/legal\n/legal/new/{type}\n/login\n/login/2fa\n/login/2fa_setup\n/logs\n/logs/alerts/{alertId}/notifications/{hogFunctionId}\n/logs/alerts/{id}\n/logs/drop-rules/new\n/logs/drop-rules/{id}\n/logs/retention-rules/new\n/logs/retention-rules/{id}\n/managed_migrations\n/managed_migrations/new\n/marketing\n/mcp-analytics\n/mcp-analytics/activity\n/mcp-analytics/dashboard\n/mcp-analytics/intent-clustering\n/mcp-analytics/missing-capabilities\n/mcp-analytics/notifications\n/mcp-analytics/sessions\n/mcp-analytics/tool-quality\n/mcp-analytics/tool-quality/{toolName}\n/mcp-registry\n/mcp-servers\n/mcp-servers/agent/{id}\n/mcp-servers/member/{id}\n/mcp-servers/server/{id}\n/mcp-servers/{tab}\n/metrics\n/models\n/models/{id}\n/move-to-cloud\n/my-tickets\n/notebooks\n/notebooks/widgets/{widgetId}\n/notebooks/{shortId}\n/oauth/authorize\n/onboarding\n/organization-deactivated\n/organization-pending-deletion\n/organization/billing\n/organization/billing/overview\n/organization/billing/real-time-usage\n/organization/confirm-creation\n/organization/create-project\n/person/{id}\n/persons\n/persons/{uuid}\n/pipeline/batch-exports/new/{service}\n/pipeline/batch-exports/{id}\n/pipeline/new/\n/pipeline/plugins/{id}\n/preflight\n/product_tours\n/product_tours/{id}\n/project-pending-deletion\n/prompt-management/prompts\n/prompt-management/prompts/{name}\n/pulse\n/replay-vision\n/replay-vision/new/template\n/replay-vision/observations/{observationId}\n/replay-vision/{id}/budget\n/replay-vision/{id}/configure\n/replay-vision/{id}/details\n/replay-vision/{id}/overview\n/replay-vision/{id}/template\n/replay-vision/{id}/triggers\n/replay/file-playback\n/replay/home\n/replay/kiosk\n/replay/playlists/{id}\n/replay/settings\n/replay/{id}\n/reset\n/reset/{userUuid}/{token}\n/reset_2fa/{userUuid}/{token}\n/resource-transfer/{resourceKind}/{resourceId}\n/sessions/{id}\n/settings/environment-approvals\n/settings/organization-authentication/{feature}/{configId}\n/settings/project\n/settings/user-feature-previews\n/shared/{token}\n/shared_dashboard/{shareToken}\n/signup\n/signup/{id}\n/site/{url}\n/skills\n/skills/community\n/skills/{categoryTab}\n/skills/{name}\n/slack-task-context\n/spaces\n/spaces/new\n/spaces/{id}\n/spaces/{id}/canvases\n/spaces/{id}/new\n/spaces/{id}/settings\n/sql\n/stamphog\n/stamphog/digests\n/stamphog/install/callback\n/stamphog/runs\n/startups\n/streamlit-apps\n/streamlit-apps/new\n/streamlit-apps/{id}\n/streamlit-apps/{id}/edit\n/subscriptions\n/subscriptions/new\n/subscriptions/{id}\n/subscriptions/{id}/edit\n/support\n/support/settings\n/support/tickets\n/support/tickets/{ticketId}\n/surveys\n/surveys/form/new\n/surveys/guided/new\n/surveys/{id}\n/tasks\n/tasks/new\n/tasks/{taskId}\n/terminal\n/themes/custom-css\n/toolbar\n/tools\n/tracing\n/tracing/retention-rules/new\n/tracing/retention-rules/{id}\n/unsubscribe\n/verify_email\n/views\n/views/new\n/visual_review\n/visual_review/repos/{repoId}/flakiness\n/visual_review/repos/{repoId}/runs\n/visual_review/repos/{repoId}/snapshots\n/visual_review/repos/{repoId}/{runType}/snapshots/{identifier}\n/visual_review/runs/{runId}\n/visual_review/settings\n/web\n/web-scripts\n/web-scripts/new\n/web/agents\n/web/bots\n/web/content-autopilot\n/web/health\n/web/live\n/web/marketing\n/web/page-performance\n/web/page-reports\n/web/recap\n/web/session-attribution-explorer\n/web/web-vitals\n/wizard/runs\n/workflows\n/workflows/library/messages/{id}\n/workflows/library/templates/new\n/workflows/library/templates/{id}\n/workflows/new/workflow\n/workflows/{id}/{tab}",+ "description": "A path template copied verbatim from the catalog below (e.g. `/persons/{uuid}`). Its `{placeholders}` are filled from `params`. These slugs come from PostHog's canonical route table, so they are always correct — never pass a path that is not in this list.\n\n/account-connected/{kind}\n/account/credential-review\n/account/social-connected\n/activity-logs\n/activity/{tab}\n/agentic/account-mismatch\n/agentic/authorize\n/ai\n/ai-enrichment\n/ai-evals/datasets\n/ai-evals/datasets/{id}\n/ai-evals/evaluations\n/ai-evals/evaluations/offline/experiments\n/ai-evals/evaluations/offline/experiments/{experimentId}\n/ai-evals/evaluations/scorers\n/ai-evals/evaluations/scorers/{scorerId}\n/ai-evals/evaluations/scorers/{scorerId}/offline\n/ai-evals/evaluations/templates\n/ai-evals/evaluations/{id}\n/ai-evals/taggers\n/ai-evals/taggers/{id}\n/ai-observability/clusters\n/ai-observability/clusters/{runId}/{clusterId}\n/ai-observability/dashboard\n/ai-observability/errors\n/ai-observability/generations\n/ai-observability/playground\n/ai-observability/reviews\n/ai-observability/self-driving\n/ai-observability/sentiment\n/ai-observability/sessions\n/ai-observability/sessions/{id}\n/ai-observability/tools\n/ai-observability/traces\n/ai-observability/traces/{id}\n/ai-observability/users\n/ai/history\n/alerts\n/approvals/{id}\n/autoresearch\n/autoresearch/new\n/autoresearch/{id}\n/bi\n/bi/new\n/bi/{insightShortId}\n/billing/authorization_status\n/broadcasts\n/broadcasts/new\n/broadcasts/{id}\n/business-knowledge\n/business-knowledge/playground\n/business-knowledge/settings\n/business-knowledge/{id}\n/canvas\n/canvases\n/canvases/new\n/canvases/{id}\n/cli/authorize\n/cli/live\n/code-review\n/code/canvas/{channelId}/{dashboardId}\n/code/channel/{channelId}\n/code/loop/{loopId}\n/code/task/{taskId}\n/cohorts\n/cohorts/{id}\n/cohorts/{id}/calculation-history\n/connect/vercel/link\n/coupons/{campaign}\n/create-organization\n/cross-project-dashboards\n/cross-project-dashboards/{id}\n/customer_analytics\n/customer_analytics/accounts\n/customer_analytics/accounts/by-external-id/{externalId}\n/customer_analytics/accounts/{accountId}\n/customer_analytics/announcements\n/customer_analytics/configuration\n/customer_analytics/dashboard\n/customer_analytics/feature-requests\n/customer_analytics/feed\n/customer_analytics/journeys\n/customer_analytics/journeys/new\n/customer_analytics/journeys/templates\n/customer_analytics/journeys/{id}/edit\n/customer_analytics/notes\n/customer_analytics/tasks\n/dashboard\n/dashboard/templates/{templateId}/copy-to-project\n/dashboard/{id}\n/dashboard/{id}/sharing\n/dashboard/{id}/subscriptions\n/dashboard/{id}/subscriptions/{subscriptionId}\n/dashboard/{id}/tiles/{tileId}\n/data-catalog\n/data-catalog/metrics/{name}\n/data-management/actions\n/data-management/actions/new\n/data-management/actions/new/\n/data-management/actions/{id}\n/data-management/annotations\n/data-management/annotations/{id}\n/data-management/core-events\n/data-management/database\n/data-management/destinations\n/data-management/event-filtering\n/data-management/events\n/data-management/events/{id}\n/data-management/events/{id}/edit\n/data-management/history\n/data-management/ingestion-warnings\n/data-management/ingestion-warnings-v2\n/data-management/managed-viewsets\n/data-management/materialized-columns\n/data-management/properties\n/data-management/properties/{id}\n/data-management/properties/{id}/edit\n/data-management/revenue\n/data-management/schema\n/data-management/sources\n/data-management/sources/{id}/schemas\n/data-management/sources/{sourceId}/schemas/{schemaId}\n/data-management/transformations\n/data-management/variables\n/data-management/variables/{id}\n/data-management/variables/{id}/edit\n/data-management/warehouse-destinations\n/data-management/warehouse-properties\n/data-ops\n/data-warehouse/connect\n/data-warehouse/new-source\n/debug\n/debug/hog\n/debug/precompute\n/early_access_features\n/early_access_features/{id}\n/embedded/{token}\n/endpoints\n/endpoints/{name}\n/engineering-analytics/authors\n/engineering-analytics/authors/{handle}\n/engineering-analytics/deploys\n/engineering-analytics/overview\n/engineering-analytics/pull-requests\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/runs/{runId}\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/workflows/{workflowName}\n/engineering-analytics/repos/{repoOwner}/{repoName}/pull-requests/{number}\n/engineering-analytics/teams\n/engineering-analytics/teams/{ownerTeam}\n/engineering-analytics/tests\n/engineering-analytics/workflows\n/error_tracking\n/error_tracking/alerts/new/{templateId}\n/error_tracking/alerts/{id}\n/error_tracking/fingerprint/{fingerprint}\n/error_tracking/{id}\n/etl\n/events/{id}/{timestamp}\n/experiments\n/experiments/shared-metrics\n/experiments/shared-metrics/{id}\n/experiments/staff\n/experiments/{id}\n/exports\n/feature_flags\n/feature_flags/new\n/feature_flags/staff\n/feature_flags/staff/cohorts\n/feature_flags/templates\n/feature_flags/{id}\n/files\n/functions/new/{templateId}\n/functions/{id}\n/games/368hedgehogs\n/games/flappyhog\n/games/shipit\n/groups/{groupTypeIndex}\n/groups/{groupTypeIndex}/new\n/groups/{groupTypeIndex}/{groupKey}\n/health\n/health/alerts\n/health/pipeline-status\n/health/sdk-health\n/health/{category}\n/heatmaps\n/heatmaps/new\n/heatmaps/recording\n/heatmaps/{id}\n/home\n/identity-matching\n/inbox\n/inbox/reports/triage\n/inbox/scout-trials\n/inbox/scouts/findings\n/inbox/scouts/runs\n/inbox/scouts/scratchpad\n/inbox/scouts/{skillName}\n/inbox/{tab}/{reportId}\n/insights\n/insights/new\n/insights/quick-start\n/insights/{id}\n/insights/{id}/edit\n/insights/{id}/sharing\n/insights/{id}/subscriptions\n/insights/{id}/subscriptions/{subscriptionId}\n/insights/{insightShortId}/alerts\n/instance/async_migrations\n/instance/async_migrations/future\n/instance/async_migrations/settings\n/instance/dead_letter_queue\n/instance/kafka_inspector\n/instance/metrics\n/instance/settings\n/instance/staff_users\n/instance/status\n/integrations/stripe/confirm-install\n/integrations/vercel/link-error\n/integrations/{kind}/callback\n/integrations/{slug}\n/legal\n/legal/new/{type}\n/login\n/login/2fa\n/login/2fa_setup\n/logs\n/logs/alerts/{alertId}/notifications/{hogFunctionId}\n/logs/alerts/{id}\n/logs/drop-rules/new\n/logs/drop-rules/{id}\n/logs/retention-rules/new\n/logs/retention-rules/{id}\n/managed_migrations\n/managed_migrations/new\n/marketing\n/mcp-analytics\n/mcp-analytics/activity\n/mcp-analytics/dashboard\n/mcp-analytics/intent-clustering\n/mcp-analytics/missing-capabilities\n/mcp-analytics/notifications\n/mcp-analytics/sessions\n/mcp-analytics/tool-quality\n/mcp-analytics/tool-quality/{toolName}\n/mcp-registry\n/mcp-servers\n/mcp-servers/agent/{id}\n/mcp-servers/member/{id}\n/mcp-servers/server/{id}\n/mcp-servers/{tab}\n/metrics\n/models\n/models/{id}\n/move-to-cloud\n/my-tickets\n/notebooks\n/notebooks/widgets/{widgetId}\n/notebooks/{shortId}\n/oauth/authorize\n/onboarding\n/organization-deactivated\n/organization-pending-deletion\n/organization/billing\n/organization/billing/overview\n/organization/billing/real-time-usage\n/organization/confirm-creation\n/organization/create-project\n/person/{id}\n/persons\n/persons/{uuid}\n/pipeline/batch-exports/new/{service}\n/pipeline/batch-exports/{id}\n/pipeline/new/\n/pipeline/plugins/{id}\n/platform-alerts\n/platform-alerts/{id}\n/preflight\n/product_tours\n/product_tours/{id}\n/project-pending-deletion\n/prompt-management/prompts\n/prompt-management/prompts/{name}\n/pulse\n/replay-vision\n/replay-vision/new/template\n/replay-vision/observations/{observationId}\n/replay-vision/{id}/budget\n/replay-vision/{id}/configure\n/replay-vision/{id}/details\n/replay-vision/{id}/overview\n/replay-vision/{id}/template\n/replay-vision/{id}/triggers\n/replay/file-playback\n/replay/home\n/replay/kiosk\n/replay/playlists/{id}\n/replay/settings\n/replay/{id}\n/reset\n/reset/{userUuid}/{token}\n/reset_2fa/{userUuid}/{token}\n/resource-transfer/{resourceKind}/{resourceId}\n/sessions/{id}\n/settings/environment-approvals\n/settings/organization-authentication/{feature}/{configId}\n/settings/project\n/settings/user-feature-previews\n/shared/{token}\n/shared_dashboard/{shareToken}\n/signup\n/signup/{id}\n/site/{url}\n/skills\n/skills/community\n/skills/{categoryTab}\n/skills/{name}\n/slack-task-context\n/spaces\n/spaces/new\n/spaces/{id}\n/spaces/{id}/canvases\n/spaces/{id}/new\n/spaces/{id}/settings\n/sql\n/stamphog\n/stamphog/digests\n/stamphog/install/callback\n/stamphog/runs\n/startups\n/streamlit-apps\n/streamlit-apps/new\n/streamlit-apps/{id}\n/streamlit-apps/{id}/edit\n/subscriptions\n/subscriptions/new\n/subscriptions/{id}\n/subscriptions/{id}/edit\n/support\n/support/settings\n/support/tickets\n/support/tickets/{ticketId}\n/surveys\n/surveys/form/new\n/surveys/guided/new\n/surveys/{id}\n/tasks\n/tasks/new\n/tasks/{taskId}\n/terminal\n/themes/custom-css\n/toolbar\n/tools\n/tracing\n/tracing/retention-rules/new\n/tracing/retention-rules/{id}\n/unsubscribe\n/verify_email\n/views\n/views/new\n/visual_review\n/visual_review/repos/{repoId}/flakiness\n/visual_review/repos/{repoId}/runs\n/visual_review/repos/{repoId}/snapshots\n/visual_review/repos/{repoId}/{runType}/snapshots/{identifier}\n/visual_review/runs/{runId}\n/visual_review/settings\n/web\n/web-scripts\n/web-scripts/new\n/web/agents\n/web/bots\n/web/content-autopilot\n/web/health\n/web/live\n/web/marketing\n/web/page-performance\n/web/page-reports\n/web/recap\n/web/session-attribution-explorer\n/web/web-vitals\n/wizard/runs\n/workflows\n/workflows/library/messages/{id}\n/workflows/library/templates/new\n/workflows/library/templates/{id}\n/workflows/new/workflow\n/workflows/{id}/{tab}","type": "string"}},