From 6f9e6f94dc595a260a6c0b9620206943b936738c Mon Sep 17 00:00:00 2001 From: Luke Belton <58511679+luke-belton@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:57:11 +0100 Subject: [PATCH 1/2] feat(data-management): add wizard hint to ingestion warnings page Adds an agent-flavored hint above the ingestion warnings table that surfaces the `npx @posthog/wizard ingestion-warnings` command, so users can hand the fix to the wizard instead of tracing each warning back to their code by hand. Mirrors the existing warehouse / MCP hint cards and is hidden on self-hosted (the wizard CLI only targets cloud/dev). Generated-By: PostHog Code Task-Id: 9e7dceff-bc33-4dcd-bf3d-aa14f0abee65 --- .../IngestionWarningsView.tsx | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx b/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx index bd59e019b28a..b6f0187fb33b 100644 --- a/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx +++ b/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx @@ -1,15 +1,18 @@ import { useActions, useValues } from 'kea' -import { IconOpenSidebar } from '@posthog/icons' +import { IconOpenSidebar, IconSparkles } from '@posthog/icons' import { LemonButton, LemonInput } from '@posthog/lemon-ui' +import { CommandBlock } from 'lib/components/CommandBlock/CommandBlock' import { ReadingHog } from 'lib/components/hedgehogs' +import { AgentBadgeRotator } from 'lib/components/MCPHint/AgentBadgeRotator' import { ProductIntroduction } from 'lib/components/ProductIntroduction/ProductIntroduction' import { Sparkline } from 'lib/components/Sparkline' import { TZLabel } from 'lib/components/TZLabel' import ViewRecordingButton from 'lib/components/ViewRecordingButton/ViewRecordingButton' import { LemonTable } from 'lib/lemon-ui/LemonTable' import { Link } from 'lib/lemon-ui/Link' +import { useWizardCommand } from 'scenes/onboarding/shared/SetupWizardBanner' import { sceneConfigurations } from 'scenes/scenes' import { Scene } from 'scenes/sceneTypes' import { urls } from 'scenes/urls' @@ -307,6 +310,48 @@ const WARNING_TYPE_RENDERER = { }, } +/** + * Agent-flavored nudge shown above the warnings table: pushes the + * `npx @posthog/wizard ingestion-warnings` CLI, which finds the code behind each + * warning and fixes the instrumentation producing it. Mirrors the warehouse / MCP + * hint cards. + */ +function IngestionWarningsWizardHint(): JSX.Element | null { + const { wizardCommand, isCloudOrDev } = useWizardCommand('ingestion-warnings') + + // The wizard CLI only targets cloud (US/EU) and dev instances — self-hosted has no + // preconfigured endpoint, so hide it rather than show a command that can't work. + if (!isCloudOrDev) { + return null + } + + return ( +
+
+ +

+ Let fix these warnings for you +

+
+
+ Ingestion warnings can't be fixed after the fact — the events are already dropped or degraded. Run this + in your project and the wizard traces each warning back to the code producing it and fixes the + instrumentation. +
+
+ +
+
+ ) +} + export function IngestionWarningsView(): JSX.Element { const { data, dataLoading, summaryDatasets, dates, searchQuery, showProductIntro } = useValues(ingestionWarningsLogic) @@ -344,6 +389,7 @@ export function IngestionWarningsView(): JSX.Element { /> ) : ( + Date: Tue, 30 Jun 2026 17:13:41 +0100 Subject: [PATCH 2/2] feat(data-management): capture telemetry when wizard hint copied Fires a posthog.capture on copy of the ingestion-warnings wizard command, mirroring WarehouseWizardHint, so we can measure adoption of the command. Flagged by Greptile review. Generated-By: PostHog Code Task-Id: 9e7dceff-bc33-4dcd-bf3d-aa14f0abee65 --- .../ingestion-warnings/IngestionWarningsView.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx b/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx index b6f0187fb33b..b27f949c562a 100644 --- a/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx +++ b/frontend/src/scenes/data-management/ingestion-warnings/IngestionWarningsView.tsx @@ -1,4 +1,5 @@ import { useActions, useValues } from 'kea' +import posthog from 'posthog-js' import { IconOpenSidebar, IconSparkles } from '@posthog/icons' import { LemonButton, LemonInput } from '@posthog/lemon-ui' @@ -346,6 +347,7 @@ function IngestionWarningsWizardHint(): JSX.Element | null { size="sm" decoration="rainbow" className="bg-surface-secondary border border-primary !m-0 hover:border-accent" + onCopy={() => posthog.capture('ingestion warnings wizard hint command copied')} />