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 ( +