: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(signals): share the inbox onboarding intro across variants (#123253)
Georgiy Tarasovbdcd5157e232
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex cc38fb34c011..20c7fee66ae7 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -11964,6 +11964,10 @@ snapshots:hash: v1.k794b7964.9c362d9b9c26bb883910cfbdd1836a4527c166f4c96a2f5360e69023c79d5f0e.DuYijIxQuSoZCwSuCLHfE5vpQ9S7-wEi7vbYSPvUoQYscenes-app-inbox-focused-setup--built-in-scouts--light:hash: v1.k794b7964.5218eb7e49c96084e51040039f1a1d65e8146a1c71fc41101537b3d743a9323c.BIPRFRy76xqqc4q0D41zmRuDqMJy4dpNwDZ-TU24b4Y+ scenes-app-inbox-focused-setup--experiment-disabled-entry--dark:+ hash: v1.k794b7964.6c70ca121885ddce07610304d817ad796012e50a59ad252d5e6579266cf4f16a._BaYx_Cdy8pSHQmYsZyPgK_7NpDEzi7z1lX7_7r1ECo+ scenes-app-inbox-focused-setup--experiment-disabled-entry--light:+ hash: v1.k794b7964.f1abd2d97a96ac5409cdd995fabc39d2f5a0a2207218ed0c6fe8a101fe112af4.0qy6zrp9xu1ndFM-fk2LlZLb67K0mBIagRMpm4MrXposcenes-app-inbox-focused-setup--github--dark:hash: v1.k794b7964.2f22b978f644c1c0b4673abc1417da42588fb907d7839fcf0bf7a35980b2e8dc.yEa2Mh7klA-11G--wkqe5uconS0kX2dDS_rH0gxJRXMscenes-app-inbox-focused-setup--github--light:@@ -11981,9 +11985,9 @@ snapshots:scenes-app-inbox-focused-setup--github-without-automatic-implementation--light:hash: v1.k794b7964.11facf4293ae6eace59b5d869c8f0ff6916040f90c969a15db0186b542ca2cb1.eoht0_hDv2jDlrJIx0Bup0fYp4lUmB8bJ37BK8ZAqtYscenes-app-inbox-focused-setup--manual-entry--dark:- hash: v1.k794b7964.ffef931600e70b99b707e8e5153406ed2489a138311b2373e5154d32952e3bc2.0nf9GadNMHxdAJLVVgXa5xYpJO0iy3OPG2E5a9s9JTU+ hash: v1.k794b7964.6c70ca121885ddce07610304d817ad796012e50a59ad252d5e6579266cf4f16a.-9JOdwzXSCp_6MJk4ZD-9-XLW8YcUDPpzUMtxjjfCWsscenes-app-inbox-focused-setup--manual-entry--light:- hash: v1.k794b7964.9e8e10b45c5efcea55776381ec88184984060e6e8bb8996d3bda9e759353c6a4.FMN8bqvId-nhT5Jol9Rj7S94agjW1Je-jaeu6Vmhggg+ hash: v1.k794b7964.f1abd2d97a96ac5409cdd995fabc39d2f5a0a2207218ed0c6fe8a101fe112af4.KxpmZUdWtyIHmUbHyo-iiWcR8tIkD9WDZxi2BECuViIscenes-app-inbox-focused-setup--narrow-signals--dark:hash: v1.k794b7964.f2687f1eeaf64c59623cc67601507d3602f74d6b691458f6f0b658445c19685f.gujM9C1Fm0DOLvHc36o1R7NhRLrqiUcz8aOSOCa8b8oscenes-app-inbox-focused-setup--narrow-signals--light:@@ -12121,9 +12125,9 @@ snapshots:scenes-app-inbox-scene--empty-with-many-scouts--light:hash: v1.k794b7964.facecddc48f471398f32d48fed8287b91573105ddd2d2ce2adc18eaf649900e7.QVbf6XPS8aj7-Jrj-3T_o1fu7tZNl8ZCJqGw3yRl8Qwscenes-app-inbox-scene--focused-onboarding--dark:- hash: v1.k794b7964.4fcfaa0984e34489b28669ed5eb0edb6e97fc264d23ff773d1186ff3c34f57fd.GiD0odqQbMhT21w3-gYboiZG8Qq-It2y0yHpPdIA-zc+ hash: v1.k794b7964.c9a8c502ba6cdc70ac335c4cb704c2b2f487b302bb0a9c9ecee0b0d80efe450c.5nsV4WOm_fjrbGvVv44HZEfgHJL3byPtSwwZ3YDIlt8scenes-app-inbox-scene--focused-onboarding--light:- hash: v1.k794b7964.3fd7edfc3a61559d26da40b6486b4d2f712db05fd5072cbc8332f57a74849aa8.9j0sGbHDpLsWr_Bt34mOIe_lp-l9PXoUsKbK8nZRWyE+ hash: v1.k794b7964.3e78ccccf98ee9e524c1bd460956be3291c4c00c15064f7318b8fa270d47e881.XsQxa59uXcfjEOekG3uzpT6CCN4aSLxlAik5lQyKLFYscenes-app-inbox-scene--focused-onboarding-complete--dark:hash: v1.k794b7964.414a7eecf51038fad769cfe620b23bb48b6e3df4b00b6b6d53a6605c0f586514.sfr-mU-Cqlz1Z76x8U-c4jGYcc7oeT4ph0Y4wQIpGcsscenes-app-inbox-scene--focused-onboarding-complete--light:@@ -12153,9 +12157,9 @@ snapshots:scenes-app-inbox-scene--scouts--light:hash: v1.k794b7964.751f7acf90211fb843c29021e4c5c07199a016d3758a98aebd030a2459e7e727.-dob_PqMSyNGS0sWCDRL7239l7w9pUTs5Oil7XD97cMscenes-app-inbox-scene--self-driving-onboarding--dark:- hash: v1.k794b7964.7c138b7c3b04457d678483199e387c9a6797ca50900ed05eba270099ffe0f49e.cAslMYO6RM6u1zEhNY5k-QZMghw16mfbi7qaJiyRepc+ hash: v1.k794b7964.c9a8c502ba6cdc70ac335c4cb704c2b2f487b302bb0a9c9ecee0b0d80efe450c.mlOHMz_uc-DEqSmt2XhNjSz1LwfIVXqLhQ4njNIOUh8scenes-app-inbox-scene--self-driving-onboarding--light:- hash: v1.k794b7964.c275d6da929a341c281ac17ff3acd47f4b1fa16f30bdeae50e0ca028f1bdbacc.0ToliYIOVkbsvNIsw0HSIY2i-8iFr4TkpJ5KVtranr0+ hash: v1.k794b7964.3e78ccccf98ee9e524c1bd460956be3291c4c00c15064f7318b8fa270d47e881.sUTDYLjeu3lJGnpqYDjUXZ8dcoao4jC0PSqgt3KwRnkscenes-app-inbox-scene--self-driving-paused--dark:hash: v1.k794b7964.d93230f18f04b762f3ae875c5a326911b98476668fa8cfd8e37894fe43ba1f1f._zlmaBrFV16p8GGadEQ1GL7s0r_HfNZZypbmh0fGYd4scenes-app-inbox-scene--self-driving-paused--light:diff --git a/products/signals/frontend/inbox/InboxScene.stories.tsx b/products/signals/frontend/inbox/InboxScene.stories.tsxindex a898f3836a91..81b101409e5d 100644--- a/products/signals/frontend/inbox/InboxScene.stories.tsx+++ b/products/signals/frontend/inbox/InboxScene.stories.tsx@@ -10,6 +10,8 @@ import { urls } from 'scenes/urls'import { mswDecorator } from '~/mocks/browser'+import { expect } from 'storybook/test'+import {allReports,mockArtefacts,@@ -226,19 +228,30 @@ export const InstallingSelfDriving: Story = {// Fresh project: nothing watching and nothing in the inbox → the full-pane welcome page (no tab row).export const SelfDrivingOnboarding: Story = {+ name: 'Control onboarding with Wizard and manual setup',+ parameters: {+ featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'control' },+ },decorators: [mswDecorator({get: {'/api/projects/:id/signals/reports': () => [200, { results: [], count: 0, next: null, previous: null }],'/api/projects/:id/signals/source_configs': () => [200, { results: [], count: 0 }],'/api/projects/:id/signals/scout/configs': () => [200, []],+ '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'control' },+ },+ post: {+ '/api/projects/:id/signals/onboarding/expose/': { draft: null, completed_at: null, variant: 'control' },},}),],}export const FocusedOnboarding: Story = {- parameters: { featureFlags: { [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-ui' } },+ name: 'Guided onboarding with manual setup only',+ parameters: {+ featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-ui' },+ },decorators: [...(Array.isArray(SelfDrivingOnboarding.decorators) ? SelfDrivingOnboarding.decorators : []),mswDecorator({@@ -300,6 +313,12 @@ export const SelfDrivingVerdictPending: Story = {// over the normal inbox, so existing work stays accessible. Reports are mocked explicitly (not// inherited) so "existing work" is unambiguous and the banner – not the takeover – is shown.export const SelfDrivingPaused: Story = {+ parameters: {+ featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'control' },+ },+ play: async ({ canvas }) => {+ await expect(canvas.findByText('Self-driving is paused')).resolves.toBeVisible()+ },decorators: [mswDecorator({get: {@@ -309,6 +328,11 @@ export const SelfDrivingPaused: Story = {],'/api/projects/:id/signals/source_configs': () => [200, { results: [], count: 0 }],'/api/projects/:id/signals/scout/configs': () => [200, []],+ '/api/projects/:id/signals/onboarding/': {+ draft: null,+ completed_at: '2026-06-11T10:00:00Z',+ variant: 'control',+ },},}),],diff --git a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsx b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsxindex b314f194723f..09359fbcbeb8 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingBanner.tsx@@ -8,7 +8,7 @@ import { CommandBlock } from 'lib/components/CommandBlock/CommandBlock'import { captureInboxWelcomeCommandCopied } from '../../inboxAnalytics'import { inboxOnboardingLogic } from '../../logics/inboxOnboardingLogic'import { inboxSetupLogic } from '../../logics/inboxSetupLogic'-import { SELF_DRIVING_WIZARD_COMMAND } from './InboxWelcome'+import { SELF_DRIVING_WIZARD_COMMAND } from '../../utils/selfDrivingWizardCommand'export function InboxOnboardingBanner(): JSX.Element {const { isTreatment } = useValues(inboxSetupLogic)diff --git a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsx b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsxindex 702a463bc61e..58be581d3b25 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsx@@ -9,14 +9,12 @@ import { captureInboxWelcomeViewed } from '../../inboxAnalytics'import { inboxSetupLogic } from '../../logics/inboxSetupLogic'import { InboxSetupEmptyState } from './InboxSetupEmptyState'import { InboxSetupFlow } from './InboxSetupFlow'-import { InboxWelcome } from './InboxWelcome'export function InboxOnboardingEntry(): JSX.Element {const { currentTeamId } = useValues(teamLogic)const { expose, loadSetup } = useActions(inboxSetupLogic)const {experimentVariant: variant,- usesFocusedSetup,inProgress,isQuickSetup,savedState,@@ -27,13 +25,8 @@ export function InboxOnboardingEntry(): JSX.Element {if (variant === 'control' || variant === 'test-ui' || variant === 'test-github') {expose(variant)}- if (variant === 'test-ui' || variant === 'test-github') {- captureInboxWelcomeViewed()- }+ captureInboxWelcomeViewed()}, [variant, currentTeamId, expose])- if (!usesFocusedSetup) {- return <InboxWelcome />- }if (!savedState && !inProgress) {return (<div className="mx-auto w-full max-w-2xl px-6 py-8">diff --git a/products/signals/frontend/inbox/components/onboarding/InboxSetupActions.tsx b/products/signals/frontend/inbox/components/onboarding/InboxSetupActions.tsxnew file mode 100644index 000000000000..fc46e3693d78--- /dev/null+++ b/products/signals/frontend/inbox/components/onboarding/InboxSetupActions.tsx@@ -0,0 +1,51 @@+import { useActions, useValues } from 'kea'++import { IconArrowRight } from '@posthog/icons'+import { LemonButton } from '@posthog/lemon-ui'++import { TerminalCard } from 'lib/components/CommandBlock/TerminalCard'++import { captureInboxWelcomeCommandCopied } from '../../inboxAnalytics'+import { inboxSetupLogic } from '../../logics/inboxSetupLogic'+import { SELF_DRIVING_WIZARD_COMMAND } from '../../utils/selfDrivingWizardCommand'+import { InboxQuickSetupAction } from './InboxQuickSetupAction'++export function InboxSetupActions(): JSX.Element {+ const { continueFromWelcome } = useActions(inboxSetupLogic)+ const { isTreatment, isQuickSetup } = useValues(inboxSetupLogic)++ return (+ <div className="flex w-full min-w-0 flex-col gap-4">+ {!isTreatment && (+ <div className="flex min-w-0 flex-col gap-2">+ <p className="m-0 text-sm text-secondary">+ Install with Wizard. Run the setup agent in your repository to connect GitHub and choose your+ signals and scouts.+ </p>+ <TerminalCard+ command={SELF_DRIVING_WIZARD_COMMAND}+ copyLabel="self-driving setup command"+ onCopy={() => captureInboxWelcomeCommandCopied({ surface: 'takeover' })}+ />+ </div>+ )}+ {isQuickSetup ? (+ <InboxQuickSetupAction />+ ) : (+ // pinned: autocapture data-attr - dashboards and test selectors match on this string+ <div data-attr="inbox-welcome-set-up-manually" className="self-start">+ <LemonButton+ type={isTreatment ? 'primary' : 'secondary'}+ status={isTreatment ? 'alt' : undefined}+ sideIcon={<IconArrowRight />}+ onClick={continueFromWelcome}+ // pinned: data-attr - the welcome funnel and test selectors match on this string+ data-attr="inbox-setup-welcome-continue"+ >+ {isTreatment ? 'Set up Self-Driving' : 'Start manually'}+ </LemonButton>+ </div>+ )}+ </div>+ )+}diff --git a/products/signals/frontend/inbox/components/onboarding/InboxSetupEmptyState.tsx b/products/signals/frontend/inbox/components/onboarding/InboxSetupEmptyState.tsxindex 1716f761fa1c..83daf5cf6921 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxSetupEmptyState.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxSetupEmptyState.tsx@@ -1,8 +1,4 @@-import { useActions, useValues } from 'kea'-import * as selfDrivingPng from '@posthog/brand/hoggies/png/self-driving'-import { IconArrowRight } from '@posthog/icons'-import { LemonButton } from '@posthog/lemon-ui'import { pngHoggie } from 'lib/brand/hoggies'import { ProductEmptyState } from 'lib/components/ProductEmptyState/ProductEmptyState'@@ -11,35 +7,11 @@ import { IconSelfDriving } from 'lib/lemon-ui/icons'import { ProductKey } from '~/queries/schema/schema-general'-import { inboxSetupLogic } from '../../logics/inboxSetupLogic'-import { InboxQuickSetupAction } from './InboxQuickSetupAction'import { InboxReportPreview } from './InboxReportPreview'+import { InboxSetupActions } from './InboxSetupActions'const HedgehogSelfDriving = pngHoggie(selfDrivingPng)-function SetUpSelfDrivingAction(): JSX.Element {- const { continueFromWelcome } = useActions(inboxSetupLogic)- const { isQuickSetup } = useValues(inboxSetupLogic)-- if (isQuickSetup) {- return <InboxQuickSetupAction />- }-- return (- <LemonButton- type="primary"- status="alt"- sideIcon={<IconArrowRight />}- className="self-start"- onClick={continueFromWelcome}- // pinned: data-attr - the welcome funnel and test selectors match on this string- data-attr="inbox-setup-welcome-continue"- >- Set up Self-Driving- </LemonButton>- )-}-const INBOX_SETUP_EMPTY_STATE: ProductEmptyStateConfig = {productKey: ProductKey.SELF_DRIVING,productName: 'Self-Driving',@@ -54,7 +26,7 @@ const INBOX_SETUP_EMPTY_STATE: ProductEmptyStateConfig = {lead: 'AI does the research for you. Get reports with evidence and next steps. Ship fixes with your agent of choice, or let PostHog do it for you.',},},- PrimaryAction: SetUpSelfDrivingAction,+ PrimaryAction: InboxSetupActions,docsUrl: 'https://posthog.com/docs/self-driving',previewLabel: 'Example report',previewClassName: 'items-center [&>*]:w-full [&>*]:max-w-120',@@ -65,7 +37,7 @@ const INBOX_SETUP_EMPTY_STATE: ProductEmptyStateConfig = {/*** Rendered by the inbox's own takeover gate rather than the scene-level one: the setup flow it opens- * lives inside the same scene, and the control variant still shows the wizard takeover.+ * lives inside the same scene.*/export function InboxSetupEmptyState(): JSX.Element {return <ProductEmptyState config={INBOX_SETUP_EMPTY_STATE} mode="needs-setup" />diff --git a/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.stories.tsx b/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.stories.tsxindex 01222cbbb1d6..1eab1f4fa174 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.stories.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.stories.tsx@@ -7,9 +7,12 @@ import { FEATURE_FLAGS, TeamMembershipLevel } from 'lib/constants'import { mswDecorator } from '~/mocks/browser'+import { expect } from 'storybook/test'+import type { InboxOnboardingDraftApi } from '../../../generated/api.schemas'import { mockScoutSuggestionSet, mockScoutConfigs } from '../../__mocks__/scoutConfigs'import { inboxSetupLogic } from '../../logics/inboxSetupLogic'+import { SELF_DRIVING_WIZARD_COMMAND } from '../../utils/selfDrivingWizardCommand'import { InboxActivationPanel } from './InboxActivationPanel'import { InboxOnboardingBanner } from './InboxOnboardingBanner'import { InboxOnboardingEntry } from './InboxOnboardingEntry'@@ -314,7 +317,12 @@ export const GithubAccessRequired: Story = {}export const TreatmentEntry = {+ name: 'Guided intro with manual setup only',render: () => <InboxOnboardingEntry />,+ play: async ({ canvas }) => {+ await canvas.findByText('Set up Self-Driving')+ await expect(canvas.queryByLabelText(`Copy command: ${SELF_DRIVING_WIZARD_COMMAND}`)).not.toBeInTheDocument()+ },decorators: [mswDecorator({get: { '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'test-ui' } },@@ -327,6 +335,7 @@ export const TreatmentEntry = {export const NarrowTreatmentEntry: Story = {...TreatmentEntry,+ name: 'Narrow guided intro',decorators: [...(TreatmentEntry.decorators ?? []),(Story) => (@@ -338,10 +347,15 @@ export const NarrowTreatmentEntry: Story = {}export const ManualEntry: Story = {+ name: 'Control intro with Wizard and manual setup',parameters: {- featureFlags: { [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'control' },+ featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'control' },},render: () => <InboxOnboardingEntry />,+ play: async ({ canvas }) => {+ await canvas.findByText('Start manually')+ await expect(canvas.getByLabelText(`Copy command: ${SELF_DRIVING_WIZARD_COMMAND}`)).toBeVisible()+ },decorators: [mswDecorator({get: { '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'control' } },@@ -356,6 +370,19 @@ export const ManualEntry: Story = {],}+export const ExperimentDisabledEntry: Story = {+ ...ManualEntry,+ name: 'Experiment disabled with control intro',+ parameters: {+ featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: false },+ },+ decorators: [+ mswDecorator({+ get: { '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: null } },+ }),+ ],+}+export const TreatmentReminder: Story = {render: () => <InboxOnboardingBanner />,}@@ -381,10 +408,15 @@ const quickGeneralScout = {}export const QuickEntry: Story = {+ name: 'Quick setup intro with manual setup only',parameters: {- featureFlags: { [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-github' },+ featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-github' },},render: () => <QuickActivationPreview />,+ play: async ({ canvas }) => {+ await canvas.findByText('Connect GitHub')+ await expect(canvas.queryByLabelText(`Copy command: ${SELF_DRIVING_WIZARD_COMMAND}`)).not.toBeInTheDocument()+ },decorators: [mswDecorator({get: {@@ -412,6 +444,11 @@ export const QuickEntry: Story = {export const QuickConnected: Story = {...QuickEntry,+ name: 'Quick setup with GitHub connected',+ play: async ({ canvas }) => {+ await canvas.findByText('Activate Self-Driving')+ await expect(canvas.queryByLabelText(`Copy command: ${SELF_DRIVING_WIZARD_COMMAND}`)).not.toBeInTheDocument()+ },decorators: [mswDecorator({get: {diff --git a/products/signals/frontend/inbox/components/onboarding/InboxWelcome.scss b/products/signals/frontend/inbox/components/onboarding/InboxWelcome.scssindex d4453a0d9411..7b87ce54cb42 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxWelcome.scss+++ b/products/signals/frontend/inbox/components/onboarding/InboxWelcome.scss@@ -1,35 +1,4 @@-// Styles for the self-driving welcome takeover.-// The hero CTA is a deliberate terminal-dark block, so its colors are hardcoded rather than-// tokenized; everything else leans on the app tokens.-.InboxWelcome {- &__cta {- background: #18181a;- border-radius: 10px;-- // The flat offset elevation of the 3000 style (never blur); the border token doubles as- // the shadow color so it reads correctly on both the light and dark app background.- box-shadow: 0 3px 0 var(--color-border-primary);-- // The near-black block sits at the same lightness as the dark app background, so it- // disappears into the page. Lift it into a raised surface instead — the one element the- // page asks the user to act on has to read as a distinct block in both themes.- [theme='dark'] & {- background: var(--color-neutral-cool-750);- }- }-- &__copy-button {- padding: 6px 12px;- font-size: 11px;- font-weight: 700;- color: #111;- cursor: pointer;- background: var(--brand-yellow);- border: none;- border-radius: 6px;- }-&__stage {animation: InboxWelcome__stage 9s infinite;diff --git a/products/signals/frontend/inbox/components/onboarding/InboxWelcome.tsx b/products/signals/frontend/inbox/components/onboarding/InboxWelcome.tsxdeleted file mode 100644index 4a6ee1c8c4aa..000000000000--- a/products/signals/frontend/inbox/components/onboarding/InboxWelcome.tsx+++ /dev/null@@ -1,170 +0,0 @@-import './InboxWelcome.scss'--import { useActions, useMountedLogic, useValues } from 'kea'-import { combineUrl } from 'kea-router'-import { useEffect, useRef, useState } from 'react'--import { IconCheck } from '@posthog/icons'-import { LemonButton, LemonSkeleton, LemonTag } from '@posthog/lemon-ui'--import { FEATURE_FLAGS } from 'lib/constants'-import { integrationsLogic } from 'lib/integrations/integrationsLogic'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'-import { copyToClipboard } from 'lib/utils/copyToClipboard'-import { GithubIntegration } from 'scenes/integrations/components/GithubIntegration'-import { urls } from 'scenes/urls'--import { captureInboxWelcomeCommandCopied, captureInboxWelcomeViewed } from '../../inboxAnalytics'-import { inboxOnboardingLogic } from '../../logics/inboxOnboardingLogic'-import { InboxWelcomeLayout } from './InboxWelcomeLayout'-import { LoopDiagram } from './LoopDiagram'--/** The one command that sets up self-driving. The whole onboarding orbits this string. */-export const SELF_DRIVING_WIZARD_COMMAND = 'npx -y @posthog/wizard@latest self-driving'--/** How long the copy button reads "Copied" before flipping back. */-const COPIED_RESET_MS = 1600--/**- * The hero CTA: the wizard command on a near-black block with a single yellow copy button.- * The button is its own feedback ("Copy" -> "Copied"), so the clipboard toast is suppressed.- */-function CommandCta(): JSX.Element {- const [copied, setCopied] = useState(false)- const resetTimerRef = useRef<number | null>(null)-- useEffect(() => {- return () => {- if (resetTimerRef.current !== null) {- window.clearTimeout(resetTimerRef.current)- }- }- }, [])-- const handleCopy = (): void => {- void copyToClipboard(SELF_DRIVING_WIZARD_COMMAND, 'self-driving setup command', { silent: true })- captureInboxWelcomeCommandCopied({ surface: 'takeover' })- setCopied(true)- if (resetTimerRef.current !== null) {- window.clearTimeout(resetTimerRef.current)- }- resetTimerRef.current = window.setTimeout(() => setCopied(false), COPIED_RESET_MS)- }-- return (- <div className="InboxWelcome__cta flex flex-wrap items-center justify-center gap-x-3 gap-y-2.5 py-2.5 pl-4 pr-2.5">- <span className="whitespace-nowrap font-mono text-sm text-white">- <span className="select-none text-[#6f6f76]">$ </span>- {SELF_DRIVING_WIZARD_COMMAND}- </span>- <button- type="button"- className="InboxWelcome__copy-button"- onClick={handleCopy}- aria-label="Copy self-driving setup command"- >- {copied ? 'Copied' : 'Copy'}- </button>- </div>- )-}--function GithubFirstCta(): JSX.Element {- useMountedLogic(integrationsLogic)- const { githubIntegrations, integrationsLoading } = useValues(integrationsLogic)- const hasGithubIntegration = githubIntegrations.some(- (integration) => integration.installation_status !== 'unavailable'- )-- if (integrationsLoading) {- return <LemonSkeleton className="h-10 w-64 rounded" />- }-- if (hasGithubIntegration) {- return (- <>- <div className="mb-4">- <LemonTag type="success" icon={<IconCheck />}>- GitHub connected- </LemonTag>- </div>- <h2 className="mb-4 text-lg font-semibold">Almost there</h2>- <CommandCta />- <p className="mt-3.5 max-w-[520px] text-[13px] text-tertiary">- Run the setup agent in your repo to pick the signal sources and scouts to watch. PRs start landing- in this inbox.- </p>- </>- )- }-- return (- <div className="w-full max-w-[560px] text-left">- <GithubIntegration- next={combineUrl(urls.inbox(), { setup: 'github-first' }).url}- connectSurface="inbox_welcome"- connectText="Connect GitHub"- emphasizeConnect- showPersonalConnectionHelp={false}- />- </div>- )-}--function ManualSetupAction(): JSX.Element {- const { requestManualSetup } = useActions(inboxOnboardingLogic)-- return (- <div className="mt-7 flex flex-col items-center gap-2 text-center">- <LemonButton- type="secondary"- // pinned: autocapture data-attr - dashboards and test selectors match on this string- data-attr="inbox-welcome-set-up-manually"- className="w-fit"- onClick={() => requestManualSetup()}- >- Set up manually- </LemonButton>- <p className="m-0 max-w-prose text-[13px] text-tertiary">- Choose your signals and scouts, then review and activate Self-Driving.- </p>- </div>- )-}--/**- * Self-driving welcome takeover, shown when self-driving isn't set up and there's nothing in the- * inbox yet. Leads with the payoff, makes the wizard command the one CTA, and explains signal- * sources and the scouts & pipeline stage as labels over an animated loop instead of prose.- * Rendered in place of the report list and without the tab bar: a full-pane welcome, not a tab.- */-export function InboxWelcome(): JSX.Element {- const { featureFlags } = useValues(featureFlagLogic)- const githubFirst = !!featureFlags[FEATURE_FLAGS.GITHUB_FIRST_SELF_DRIVING_ONBOARDING]-- useEffect(() => {- captureInboxWelcomeViewed()- }, [])-- return (- <InboxWelcomeLayout- title="Ship fixes while you sleep"- description="PostHog watches your session replays, errors, and Slack. When it finds something worth fixing, it writes the pull request. You review and merge."- illustration={<LoopDiagram />}- footer="Your first 3 PRs each month are free, then $15 per PR. Reports are always free."- >- {githubFirst ? (- <GithubFirstCta />- ) : (- <>- <CommandCta />- <p className="mt-3.5 max-w-[520px] text-[13px] text-tertiary">- Run it in your repo. That's the whole setup: it connects GitHub and picks the signal sources and- scouts to watch. PRs start landing in this inbox.- </p>- </>- )}- <ManualSetupAction />- </InboxWelcomeLayout>- )-}diff --git a/products/signals/frontend/inbox/components/onboarding/InboxWelcomeLayout.tsx b/products/signals/frontend/inbox/components/onboarding/InboxWelcomeLayout.tsxdeleted file mode 100644index efe8fe656b1e..000000000000--- a/products/signals/frontend/inbox/components/onboarding/InboxWelcomeLayout.tsx+++ /dev/null@@ -1,47 +0,0 @@-import { ReactNode } from 'react'--import { Logomark } from 'lib/brand'--import { InboxMcpBanner } from '../InboxMcpBanner'--interface InboxWelcomeLayoutProps {- title: string- description: string- illustration: ReactNode- footer: string- children: ReactNode-}--export function InboxWelcomeLayout({- title,- description,- illustration,- footer,- children,-}: InboxWelcomeLayoutProps): JSX.Element {- return (- <div className="InboxWelcome @container/welcome flex min-h-full flex-col justify-center py-10">- <div className="mx-auto mb-8 w-full max-w-4xl px-6">- <InboxMcpBanner />- </div>- <div className="px-6 pb-12">- <div className="mx-auto flex max-w-[720px] flex-col items-center text-center">- <div className="mb-7">- <Logomark jumpOnClick size="xl" />- </div>- <h1 className="mb-4 text-2xl font-bold leading-[1.1] tracking-[-0.02em] @2xl/welcome:text-[32px]">- {title}- </h1>- <p className="mb-9 max-w-[560px] text-[15px] leading-[1.55] text-secondary">{description}</p>- {children}- </div>- </div>- <div className="px-6 @3xl/welcome:px-12">- <div className="mx-auto max-w-[1060px]">- {illustration}- <p className="mt-6 text-center text-xs text-tertiary">{footer}</p>- </div>- </div>- </div>- )-}diff --git a/products/signals/frontend/inbox/logics/inboxSetupLogic.test.ts b/products/signals/frontend/inbox/logics/inboxSetupLogic.test.tsindex 855e89767e5c..17f26cd74c70 100644--- a/products/signals/frontend/inbox/logics/inboxSetupLogic.test.ts+++ b/products/signals/frontend/inbox/logics/inboxSetupLogic.test.ts@@ -18,6 +18,7 @@ import type {SignalSourceConfigApi,SignalScoutConfigApi,} from '../../generated/api.schemas'+import { allReports } from '../__mocks__/inboxMocks'import { mockScoutConfigs, mockScoutSuggestionSet } from '../__mocks__/scoutConfigs'import { signalSourcesLogic } from '../signalSourcesLogic'import { inboxOnboardingLogic } from './inboxOnboardingLogic'@@ -69,6 +70,7 @@ describe('focused Inbox setup', () => {get: {'/api/projects/@current': () => [200, { ...MOCK_DEFAULT_TEAM, ingested_event: hasEvents }],'/api/projects/:id/signals/reports/available_reviewers/': {},+ '/api/projects/:id/wizard/sessions/latest/': () => [204, null],'/api/environments/:id/external_data_sources/': () => ({results: warehouseConnected? [@@ -289,12 +291,8 @@ describe('focused Inbox setup', () => {const onboarding = inboxOnboardingLogic()onboarding.mount()try {- if (assignment === 'test-ui') {- await expectLogic(logic, () => logic.actions.continueFromWelcome()).toFinishAllListeners()- await expectLogic(logic, () => logic.actions.continueFromWelcome()).toFinishAllListeners()- } else {- await expectLogic(logic, () => onboarding.actions.requestManualSetup()).toFinishAllListeners()- }+ await expectLogic(logic, () => logic.actions.continueFromWelcome()).toFinishAllListeners()+ await expectLogic(logic, () => logic.actions.continueFromWelcome()).toFinishAllListeners()expect(logic.values.usesFocusedSetup).toBe(true)expect(logic.values.inProgress).toBe(true)expect(onboarding.values.onboardingMode).toBe('takeover')@@ -349,7 +347,10 @@ describe('focused Inbox setup', () => {)expect(capture.mock.calls.filter(([event]) => event === 'self-driving onboarding welcome continued')- ).toHaveLength(assignment === 'test-ui' ? 1 : 0)+ ).toHaveLength(1)+ expect(+ capture.mock.calls.filter(([event]) => event === 'Inbox welcome manual setup clicked')+ ).toHaveLength(assignment === 'test-ui' ? 0 : 1)} finally {onboarding.unmount()capture.mockRestore()@@ -385,6 +386,52 @@ describe('focused Inbox setup', () => {})+ it('shows the paused reminder when a Wizard-completed control project disables its sources', async () => {+ variant = 'control'+ savedDraft = null+ completedAt = '2026-10-14T12:00:00Z'+ sources = [+ {+ ...draft.sources[0],+ id: 'source-one',+ created_at: completedAt,+ updated_at: completedAt,+ status: null,+ },+ ]+ useMocks({+ get: {+ '/api/projects/:id/signals/reports/': {+ results: allReports.slice(0, 1),+ count: 1,+ next: null,+ previous: null,+ },+ },+ })+ await expectLogic(logic, () => logic.actions.loadSetup()).toFinishAllListeners()+ const onboarding = inboxOnboardingLogic()+ onboarding.mount()+ try {+ await expectLogic(onboarding, () => {+ onboarding.actions.refreshSetupState()+ signalSourcesLogic.actions.loadVisionScanners()+ }).toFinishAllListeners()+ await waitFor(() => expect(onboarding.values.isSetupLoaded).toBe(true))+ expect(logic.values.completed).toBe(true)+ expect(onboarding.values.onboardingMode).toBe('none')++ sources[0].enabled = false+ await expectLogic(signalSourcesLogic, () =>+ signalSourcesLogic.actions.loadSourceConfigs()+ ).toFinishAllListeners()+ await waitFor(() => expect(onboarding.values.onboardingMode).toBe('banner'))+ expect(logic.values.completed).toBe(true)+ } finally {+ onboarding.unmount()+ }+ })+it.each([true, false])('retries partial activation with usage-based pricing %s', async (usageBasedPricing) => {featureFlagLogic.actions.setFeatureFlags([], {[FEATURE_FLAGS.SELF_DRIVING_UBP]: usageBasedPricing,diff --git a/products/signals/frontend/inbox/logics/inboxSetupLogic.ts b/products/signals/frontend/inbox/logics/inboxSetupLogic.tsindex 5f9b2ae67345..4e459588dd3b 100644--- a/products/signals/frontend/inbox/logics/inboxSetupLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxSetupLogic.ts@@ -43,7 +43,7 @@ import type {} from '../../generated/api.schemas'import type { InboxOnboardingStepEnumApi } from '../../generated/api.schemas'import type { AgentRosterSource } from '../components/config/agentRosterMeta'-import { captureSignalSourceConnected } from '../inboxAnalytics'+import { captureInboxWelcomeManualSetupClicked, captureSignalSourceConnected } from '../inboxAnalytics'import { signalSourcesLogic, WAREHOUSE_SOURCE_SETUP, type WarehouseBackedSource } from '../signalSourcesLogic'import type { SourceProductStatus } from '../signalSourcesLogic'import type { SignalSourceConfig } from '../types'@@ -709,6 +709,9 @@ export const inboxSetupLogic = kea<inboxSetupLogicType>([if (values.inProgress) {return}+ if (!values.isTreatment) {+ captureInboxWelcomeManualSetupClicked()+ }capture('self-driving onboarding welcome continued')actions.openSetup()},diff --git a/products/signals/frontend/inbox/utils/selfDrivingWizardCommand.ts b/products/signals/frontend/inbox/utils/selfDrivingWizardCommand.tsnew file mode 100644index 000000000000..bb55fc58cb81--- /dev/null+++ b/products/signals/frontend/inbox/utils/selfDrivingWizardCommand.ts@@ -0,0 +1 @@+export const SELF_DRIVING_WIZARD_COMMAND = 'npx -y @posthog/wizard@latest self-driving'