: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): make the combined onboarding flow the default (#124902)
Georgiy Tarasov786f7e970764
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex d830403997b6..75ac4a633d7b 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -12166,14 +12166,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.94d4d56e6f378ac1850c7e09331a0fb870bb597ac292bbd40892c6e4ff5d4d04.TQOsv6HTn4IOgzmNX1UnLMMsxLJpELgyjyJ82PgIPV8- scenes-app-inbox-focused-setup--experiment-disabled-entry--light:- hash: v1.k794b7964.0ac93666c22ddf7eb27f107e4beef5f9aa5d09c47c44400f90e89259a03a614d.PxnXVspx2ptHwijyAcIOBb2dsZ8HcNOWWaotBfggYxgscenes-app-inbox-focused-setup--github--dark:- hash: v1.k794b7964.2f22b978f644c1c0b4673abc1417da42588fb907d7839fcf0bf7a35980b2e8dc.yEa2Mh7klA-11G--wkqe5uconS0kX2dDS_rH0gxJRXM+ hash: v1.k794b7964.9bd5d04a3360f1780ea3cd78a8ed631a86608a70b190176c8b2a7e7a53f440ee.HxQ05LcaBI7LOGWkD0wocpfom7PSK3j7OQ-FYMfiF3Escenes-app-inbox-focused-setup--github--light:- hash: v1.k794b7964.8a339557c1ca11053380c4996f86fb9bc30971b601cb20327f808acf348a90f6.HXwJQKUmddwj9iSDWBGjx8X7gsrj4MnOHmMa_rEGCLE+ hash: v1.k794b7964.364be8d973b14cba0fa245239d7a0b07913c4492b39ae2bd6c0495bc87240eae.7-eOQtwfA6AO05VpBRj1pU7O1BmnOK7c-5q52hMGweUscenes-app-inbox-focused-setup--github-access-required--dark:hash: v1.k794b7964.da39166a14544a95756ec01524bd7a2b2029ba0178df800dd7185c8f5b595f0d.DpTqPSqIoDbXO8F3l4U9FPVJsbNKCgTceZVR_EEmwS8scenes-app-inbox-focused-setup--github-access-required--light:@@ -12187,25 +12183,25 @@ snapshots:scenes-app-inbox-focused-setup--github-optional--light:hash: v1.k794b7964.ebc3621a8d2898cd4e684d6c38a53231543158f2463b72e1564526f85c663ff6.4ETAHoDCK1k-fG_TyUe7a67SitYAcFPIi7VBfxuwHM8scenes-app-inbox-focused-setup--github-without-automatic-implementation--dark:- hash: v1.k794b7964.65add98c7b7ca1ef5c937f57e619c355e7350b680f78d2823a7fcfcb4c14b9c4.HzFGZjD0QK7T2fN0qIXfMF9bDGuHcg0wdH0h2jXMj0E+ hash: v1.k794b7964.81248bc9725853d60f6abaa48b7dfd3da16e12b2a0737dc24e9528ce6bc7f92b.obY1rKohrnBvh71Ep3wJZzs8J56ZUo98dlJDXlzwj-Escenes-app-inbox-focused-setup--github-without-automatic-implementation--light:- hash: v1.k794b7964.11facf4293ae6eace59b5d869c8f0ff6916040f90c969a15db0186b542ca2cb1.eoht0_hDv2jDlrJIx0Bup0fYp4lUmB8bJ37BK8ZAqtY- scenes-app-inbox-focused-setup--manual-entry--dark:- hash: v1.k794b7964.94d4d56e6f378ac1850c7e09331a0fb870bb597ac292bbd40892c6e4ff5d4d04.E0-kblxno0YaODoTAsOqK3p5dRwQmS_7Zh6YY-UQEsI- scenes-app-inbox-focused-setup--manual-entry--light:- hash: v1.k794b7964.0ac93666c22ddf7eb27f107e4beef5f9aa5d09c47c44400f90e89259a03a614d.aB30qRiqXekxVGJ3aqYbKfKL92KgT289bl_LURdQWqE+ hash: v1.k794b7964.f1f816f4c2b6ba1413ff091272a8021fdc44314dceb96d616e9f415897f82f79.3FhvU092qzAnjrX6WgGo_40G2gJA90Ou68IFOuZIxqAscenes-app-inbox-focused-setup--narrow-signals--dark:hash: v1.k794b7964.f2687f1eeaf64c59623cc67601507d3602f74d6b691458f6f0b658445c19685f.gujM9C1Fm0DOLvHc36o1R7NhRLrqiUcz8aOSOCa8b8oscenes-app-inbox-focused-setup--narrow-signals--light:hash: v1.k794b7964.5bf7db12cc74d13fb7c4d54340713b27cbbed447a418130ca9c6b0c420640062.Pp6_ViU79ZscAecpcpkBPT0Alq_X3_4eRr2odBPpqfc- scenes-app-inbox-focused-setup--narrow-treatment-entry--dark:- hash: v1.k794b7964.0d51555b11409e1ab13bb8be13d2be9b03fb7999568a673652599e3cc09cab24.PEZS7OzPf7syfs02Fn8XzZACNbosmhz7GaSPtwd3zZg- scenes-app-inbox-focused-setup--narrow-treatment-entry--light:- hash: v1.k794b7964.2aea6da7b1c7b3a61aa08bed696438ed18b9cdabc360d3386b5f9f8548259252.qK9T5EX7Yes7ArRbrRP_T4AT9q2B1HEHV-hg2hjFIGg+ scenes-app-inbox-focused-setup--narrow-welcome-entry--dark:+ hash: v1.k794b7964.0d51555b11409e1ab13bb8be13d2be9b03fb7999568a673652599e3cc09cab24.0W1rrKlR64ez1F5-dCVKACr4wRIyxpGRuVt1mTG3ghc+ scenes-app-inbox-focused-setup--narrow-welcome-entry--light:+ hash: v1.k794b7964.2aea6da7b1c7b3a61aa08bed696438ed18b9cdabc360d3386b5f9f8548259252.MM1kM4EC-pcCD33TMXAQGsHQRKTeFQSEYxlAJe9Q38Qscenes-app-inbox-focused-setup--no-products-enabled--dark:hash: v1.k794b7964.764ef45e781be980c6bc60eab99aaef22e011afcccafb78586a7507c9313c345.HjJi0LKC8d2x9Qr76jCkCfYHxucQrnEH3jkQ9ro_mkQscenes-app-inbox-focused-setup--no-products-enabled--light:hash: v1.k794b7964.20b18f5ab4b378c6b06c45b3de05dd4ba1783f7995d842ac40c3555a1dd450c5.Tw6tZ6X7sU3V4qVx9jmSBj4rS04FnKis1tqfTQuAhgY+ scenes-app-inbox-focused-setup--paused-reminder--dark:+ hash: v1.k794b7964.80667d13f6fd3903f1e1d602332472fb82b04068c9740f2c71bd768b625c6233.Fhdq5WYf05cjq_8xu9yz0uUugiQEssdkaOXziQEw45w+ scenes-app-inbox-focused-setup--paused-reminder--light:+ hash: v1.k794b7964.41b6bcc6d2de7d68b9bf72f1a3a248c326c44dea7905d7bcc1161ad09526d7e9.QsmJmhJ0CE7F08oOOjP9PhKhV5BDVCvW1CXDWtD5QlIscenes-app-inbox-focused-setup--quick-activated--dark:hash: v1.k794b7964.653864650883238be09ff223e227c4aef6d637308cd9cb5337bbd122ba0e16c6.KmAERZYNS8d-FYi019q153Z49JfnWLSi5oewFlizVZsscenes-app-inbox-focused-setup--quick-activated--light:@@ -12226,14 +12222,6 @@ snapshots:hash: v1.k794b7964.2fd61d81d1c3300e8270a3ffa4c3d3121f997051b91d9987426daf7dc9d3a2ad.L1egsU2zlebfWNXC0b6d6ubCZNtlsBUpPTJStyvipBsscenes-app-inbox-focused-setup--signals--light:hash: v1.k794b7964.6509c25bb6925e6c47261dec8cf7098cda679b92312bf31a062142fc3e77bb12.xGsSNmODSL8UdPd4hiJhAhMHAMwhoh5SfDHNuulisOA- scenes-app-inbox-focused-setup--treatment-entry--dark:- hash: v1.k794b7964.94d4d56e6f378ac1850c7e09331a0fb870bb597ac292bbd40892c6e4ff5d4d04.zL5r9ykjgXv8SyT-dW04H4-2fGPo05tT14ALE50LNqM- scenes-app-inbox-focused-setup--treatment-entry--light:- hash: v1.k794b7964.0ac93666c22ddf7eb27f107e4beef5f9aa5d09c47c44400f90e89259a03a614d.QLxw8DXJZl5Q7OZkJjtBSCTm3gwys4l6e-JBu3Ed1Ag- scenes-app-inbox-focused-setup--treatment-reminder--dark:- hash: v1.k794b7964.80667d13f6fd3903f1e1d602332472fb82b04068c9740f2c71bd768b625c6233.F80fM8smMQBS2gdsx4T5hqd7h-Vn5hZkZh3zJRvMuBo- scenes-app-inbox-focused-setup--treatment-reminder--light:- hash: v1.k794b7964.41b6bcc6d2de7d68b9bf72f1a3a248c326c44dea7905d7bcc1161ad09526d7e9.4E0B-L1wRoXtjDuhdRe2-x8CwfacDBMUa4hrUNBQbigscenes-app-inbox-hotkeyradio--with-selection--dark:hash: v1.k794b7964.096221ba2a8740bc3f146596ab7d2e9576a9634b42608a196af46696de44024b.Aa_uyyUpzKzR72cUKsxLQJvhEiP0VxyLDoYjQgAa-moscenes-app-inbox-hotkeyradio--with-selection--light:@@ -12243,9 +12231,9 @@ snapshots:scenes-app-inbox-implementbutton--choices--light:hash: v1.k794b7964.a179eeb16be74806e49a273f5e2df6c06e6c729f4696b7ea08806c515c508a5d.oPurfCP4WUVbo_EKSrjGF6FooFGZbvNcJjXEp9VK-R8scenes-app-inbox-implementbutton--connect-github--dark:- hash: v1.k794b7964.f0382f256582234f45b2932fc56f2423bfd5a42f1b5be159c6923584fa5a46a8._0saS_SsHzIDzJ4CuP8J5Aq7XveSJXxov2j0MpmkfZw+ hash: v1.k794b7964.487de1d00e22e069ac0d500ae17ce3553cab1e52fff744903ab30e85eb069ba1.PHQoBd1-V0SwkJX3QTM3boLaA587NkdgAu5-lbVKBD4scenes-app-inbox-implementbutton--connect-github--light:- hash: v1.k794b7964.633ef1a74bb24a94f602fa5651315b0d31d4b27c6629a4ad2e6fe803105e9f56.bBHasSiH_-W5J8ox2mYdc-BBP6G8kgAUwwTuaSz1qPA+ hash: v1.k794b7964.26ea8ef0a0f65e448257f893ae15f6b4c685111efbd01c1e7901a8eef8ba3328.zpZNrBn5JqwLoMTrLJqmCcTkRd7_6KN12DfbRiefQlUscenes-app-inbox-implementbutton--default--dark:hash: v1.k794b7964.f2b5351f205a0abb1531706c02950c727ede9d9f7cf220869b571442805a5a24.NvzH40X-7cVbDTiW0u9CRIwI3ENeZ37ePippBtcZg2Mscenes-app-inbox-implementbutton--default--light:@@ -12334,14 +12322,10 @@ snapshots:hash: v1.k794b7964.f317ce431f7683d0d3f243cce6a7431ccaace370e74c3d25c93339c00c9bad63.yDLBiHj337vJez3JG8kG__Fg6XNWkVyA8tGu9nPtn-Iscenes-app-inbox-scene--empty-with-many-scouts--light:hash: v1.k794b7964.facecddc48f471398f32d48fed8287b91573105ddd2d2ce2adc18eaf649900e7.QVbf6XPS8aj7-Jrj-3T_o1fu7tZNl8ZCJqGw3yRl8Qw- scenes-app-inbox-scene--focused-onboarding--dark:- hash: v1.k794b7964.46d59bd7778029f586a0e9eb50ebbfd731a040dcaf605844f9322cbfcef21018.jM_yTY6MK1BsvmUPUwshRKuQsSeVDNfM6TU-XfqELlI- scenes-app-inbox-scene--focused-onboarding--light:- hash: v1.k794b7964.00654ee8a6e5d5adcc4f8dc7bfab6c9cc3ec0f2b1bf1e614296c21c98072e557.RksVYg5pzR1pyErDZOKSHWyd31aKmUfS1itnkChhh94- scenes-app-inbox-scene--focused-onboarding-complete--dark:- hash: v1.k794b7964.e6ecff68e551584f79fb2c0d24eaebdcc275f767663926734615d2301b57573b.-WxAZwfw5OPG7jSozZfpgCPJCQ4FKzxD1qHSQGWWULs- scenes-app-inbox-scene--focused-onboarding-complete--light:- hash: v1.k794b7964.cf9af6b650777d2eac80e08944a56e9a6ebe07b95fd8f29a981716b7667e9b70.TsufTUwkucUTgfHUopvizIZuI_yfxudeBBJFxOy1nRo+ scenes-app-inbox-scene--guided-onboarding-complete--dark:+ hash: v1.k794b7964.e6ecff68e551584f79fb2c0d24eaebdcc275f767663926734615d2301b57573b.ALsNaySutBbqP12IB12j3QWRIV3sQMLFxydymlSn40U+ scenes-app-inbox-scene--guided-onboarding-complete--light:+ hash: v1.k794b7964.cf9af6b650777d2eac80e08944a56e9a6ebe07b95fd8f29a981716b7667e9b70.kBDMvUHgQMWITfNkYu4K4l_H993uB_c69gKx6pRH_agscenes-app-inbox-scene--inbox--dark:hash: v1.k794b7964.6cbb36fc4c162e81802ccbae4b4784be546693b3dbff09204f8daf799397189a.l1fKldRLFg22DuT9IBneuSIOMawxVc2rcRX0VT4DryIscenes-app-inbox-scene--inbox--light:diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex ea675ca82581..5f7918e27a43 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -359,7 +359,6 @@ export const FEATURE_FLAGS = {INBOX_REPORT_FEEDBACK_BANG: 'inbox-report-feedback-bang', // owner: #team-self-driving, gates the party hog that pops on a report thumbs-up in the inbox and on the Today home pageINBOX_SLACK_NOTIFICATIONS: 'inbox-slack-notifications', // owner: #team-self-driving, gates the Slack notifications config card in the inboxINBOX_TIME_WINDOW: 'inbox-time-window', // owner: #team-self-driving, gates the created-in window filter on the inbox report list- INBOX_UI_ONBOARDING: 'inbox-ui-onboarding', // owner: #team-self-driving, multivariate control/test-ui/test-githubINSIGHT_ALERTS_EMPTY_STATE_EXPERIMENT: 'insight-alerts-empty-state',INSIGHT_DATA_CHECKS: 'insight-data-checks', // owner: @sampennington #team-product-analytics, checks the events behind an insight and shows the result on the insight pageINSIGHT_DRAG_TO_ZOOM: 'insight-drag-to-zoom', // owner: @sampennington #team-product-analytics, gates x-axis drag-to-zoom on insight charts (trends today, SQL to follow)diff --git a/frontend/src/scenes/integrations/components/GithubIntegration.tsx b/frontend/src/scenes/integrations/components/GithubIntegration.tsxindex 6a0c722da570..2d031d929771 100644--- a/frontend/src/scenes/integrations/components/GithubIntegration.tsx+++ b/frontend/src/scenes/integrations/components/GithubIntegration.tsx@@ -221,7 +221,9 @@ export function GithubIntegration({{!isConnected &&!githubAvailableInstallationsResponse &&githubAvailableInstallationsResponseLoading && (- <p className="text-secondary mb-0">Looking for existing GitHub installations…</p>+ <span role="status" className="sr-only">+ Looking for existing GitHub installations…+ </span>)}{!isConnected &&!githubAvailableInstallationsResponseLoading &&@@ -238,8 +240,8 @@ export function GithubIntegration({)}{installRequestInProgress || (isConnected && !showManageButton) ? null : emphasizeConnect &&!isConnected ? (- <div className="flex w-full flex-col items-center gap-4">- <div className="flex flex-wrap justify-center gap-2">+ <div className={cn('flex w-full flex-col gap-4', centered ? 'items-center' : 'items-start')}>+ <div className={cn('flex flex-wrap gap-2', centered && 'justify-center')}><LemonButtontype={canLinkExisting ? 'secondary' : 'primary'}icon={<IconGithub />}diff --git a/products/signals/ARCHITECTURE.md b/products/signals/ARCHITECTURE.mdindex 17dee79c28b3..d5336b9f1c58 100644--- a/products/signals/ARCHITECTURE.md+++ b/products/signals/ARCHITECTURE.md@@ -238,7 +238,7 @@ On re-promotion:#### First report onboarding and email-Guided and quick activation enqueue a one-time `signals-scout-first-report` investigation immediately after onboarding commits, only for projects in a test arm of `self-driving-banger-scout` and with evidence of product or warehouse data. Dispatch checks scout-source eligibility before preparing context or probing data. Data evidence can be recorded event ingestion in the project or an environment, a positive warehouse sync count, or a successful live product probe. Warehouse eligibility uses recorded sync metadata without querying warehouse tables; the scout validates freshness during its investigation. Empty projects stop before workflow or sandbox startup and show `no_data`. When no other data evidence exists, failed or inconclusive product probes retry and eventually show `incomplete`, without starting an investigation. Outside the rollout and in the control arm, guided activation starts no immediate scout and quick activation retains its general-scout dispatch. The scout receives the products with completed onboarding (`products_in_use`, not proof of data usage) and a compact list of PostHog sources in investigation priority order: error tracking; logs, traces, and metrics; product analytics and dashboards; AI observability; then session recordings. The list distinguishes observed data from configured products and historical ingestion, and mentions accessible warehouse tables only when present, without enumerating them. Missing sources remain unverified rather than empty. The scout uses activity logs to find relevant analyses and combines sources to validate promising leads and establish impact, inspecting recordings only when a targeted sample can answer a concrete question. It authors at most one report through the direct report channel. A project-scoped report idempotency key enforces that limit independently of agent instructions. A report that was visible keeps the investigation successful after resolution or dismissal. The skill owns investigation policy and orientation; the shared prompt defers to its procedure. Early replay and persistence use the same project-scoped key, so a saved report is returned before checking changed emission gates or repeating the safety judge.+Guided and quick activation enqueue a one-time `signals-scout-first-report` investigation immediately after onboarding commits, only for projects in a test arm of `self-driving-banger-scout` and with evidence of product or warehouse data. Dispatch checks scout-source eligibility before preparing context or probing data. Data evidence can be recorded event ingestion in the project or an environment, a positive warehouse sync count, or a successful live product probe. Warehouse eligibility uses recorded sync metadata without querying warehouse tables; the scout validates freshness during its investigation. Empty projects stop before workflow or sandbox startup and show `no_data`. When no other data evidence exists, failed or inconclusive product probes retry and eventually show `incomplete`, without starting an investigation. Outside the first-report rollout and in its control arm, guided activation starts no immediate scout and quick activation dispatches the general scout. The scout receives the products with completed onboarding (`products_in_use`, not proof of data usage) and a compact list of PostHog sources in investigation priority order: error tracking; logs, traces, and metrics; product analytics and dashboards; AI observability; then session recordings. The list distinguishes observed data from configured products and historical ingestion, and mentions accessible warehouse tables only when present, without enumerating them. Missing sources remain unverified rather than empty. The scout uses activity logs to find relevant analyses and combines sources to validate promising leads and establish impact, inspecting recordings only when a targeted sample can answer a concrete question. It authors at most one report through the direct report channel. A project-scoped report idempotency key enforces that limit independently of agent instructions. A report that was visible keeps the investigation successful after resolution or dismissal. The skill owns investigation policy and orientation; the shared prompt defers to its procedure. Early replay and persistence use the same project-scoped key, so a saved report is returned before checking changed emission gates or repeating the safety judge.The first-report scout is excluded from scheduled registration and suggestions. Non-staff users do not see it in the normal scout roster or scout pickers; its configuration, runs, skill, and task remain available through the normal project-scoped APIs. Its template remains visible in the Skills store like other canonical scout skills. Onboarding returns the scout run, task, and task run IDs, and embeds the existing live run viewer so customers can follow the investigation in the inbox. The inbox folds the setup card to its header while a first-report state exists and shows one first-report card beneath it only after the selected report lists finish loading and the current filters return no reports: status and next steps in the left pane, the actual investigation in the right pane. A created report removes the card and refreshes the report list, so the first report appears as a normal row. A failed refresh shows a retry action even when the previous list was empty; retry reloads the failed sections and their counts. Empty projects see the existing onboarding example report instead of a run, without a connect-data callout. The panes stack in narrow containers. Running investigations show a rough 2½-minute estimate, and the terminal outcomes without a report retain their activity in the same place. The viewer follows the task until it finishes, including when a report appears before the final task output. Its structured close-out distinguishes insufficient data, no actionable finding, and an incomplete investigation. An in-app notification tells the activating user when a run finishes, including non-report outcomes. The page promises “We’ll notify you when your first report is ready” in every pre-report state only when the activating user is enrolled for the configured first-report email; completing a run without a report does not fulfill that promise. No-data skips have no run. Missing or failed data probes remain unknown rather than being presented as an empty project.@@ -250,7 +250,7 @@ The project-group experiment `self-driving-banger-scout` decides whether the firPi scouts require the Tasks worker's `SANDBOX_AI_GATEWAY_URL`, `SANDBOX_AI_GATEWAY_MINT_KEY`, and an entry in `SANDBOX_AI_GATEWAY_PRODUCTS` matching the scout, such as `signals_scout:first-report`. Only internally created scout tasks may mint these tokens. Pi provisioning fails when routing, minting, or recording the model pin fails; it never falls back to the legacy gateway. Before launching the experiment, verify the deployed Go gateway serves `posthog/deepseek-ai/deepseek-v4.1-flash-1017-fast` for `signals_scout`, with the Baseten host configured. The existing internal scout budget and paying-project configuration still apply.-Guided and quick onboarding create a `SignalFirstReportNotification` in the activation transaction, preserving the activating user for that environment. The first report that becomes `ready`, immediately actionable, and not already addressed after activation triggers a transactional email to that user's email address, tracked against their distinct ID. When the parent project's first investigation records this environment as its activation origin, email delivery selects the parent's reports and links while retaining the environment's recipient and notification preferences. The recipient must retain access to both projects. Other environment notifications keep their own report scope. Control onboarding does not identify an activator and does not enroll a recipient.+Guided and quick onboarding create a `SignalFirstReportNotification` in the activation transaction, preserving the activating user for that environment. The first report that becomes `ready`, immediately actionable, and not already addressed after activation triggers a transactional email to that user's email address, tracked against their distinct ID. When the parent project's first investigation records this environment as its activation origin, email delivery selects the parent's reports and links while retaining the environment's recipient and notification preferences. The recipient must retain access to both projects. Other environment notifications keep their own report scope.Sending requires the organization-scoped `signals-first-report-email` feature flag and is cloud-only. A disabled, missing, or unavailable flag leaves notifications pending without claiming or cancelling them, including in DEBUG. Sending also remains disabled until the dedicated `POSTHOG_TRANSACTIONAL_EMAIL_API_KEY` is configured. `SIGNALS_FIRST_REPORT_EMAIL_TEMPLATE_ID` in `backend/constants.py` selects the first-report transactional email template. The shared `POSTHOG_PROJECT_ID` and `POSTHOG_HOST` settings default to `2` and `https://us.posthog.com`, independently of the recipient's region. Both support optional environment overrides to select another sending project or host. The API key must be a project secret API key with `hog_flow:write` for that sending project, and the template must be an active transactional email template with a verified sender. Sending uses the shared transactional email client synchronously inside the notification task so the notification row can record the API's acceptance. Template creation and deployment configuration are separate from this code.diff --git a/products/signals/backend/facade/onboarding.py b/products/signals/backend/facade/onboarding.pyindex 1b8ea06e3bba..4ab623c749ab 100644--- a/products/signals/backend/facade/onboarding.py+++ b/products/signals/backend/facade/onboarding.py@@ -27,6 +27,7 @@ from products.signals.backend.first_report_scout_types import FirstReportStatusfrom products.signals.backend.github_optional import GITHUB_OPTIONAL_ACTIVATION, ResearchAccessPolicyfrom products.signals.backend.models import (AutonomyPriority,+ InboxOnboardingSetupMode,SignalFirstReportNotification,SignalScoutConfig,SignalScoutSuggestionSet,@@ -37,6 +38,7 @@ from products.signals.backend.models import (from products.signals.backend.onboarding_analytics import InboxOnboardingAnalyticsfrom products.signals.backend.onboarding_completion import InboxOnboardingReconcilerfrom products.signals.backend.onboarding_scouts import InboxOnboardingScouts+from products.signals.backend.onboarding_state import is_quick_setupfrom products.signals.backend.report_content_gates import team_first_report_email_enabledfrom products.signals.backend.scout_harness.create_access import can_create_scoutfrom products.signals.backend.scout_harness.team_limits import withheld_skills_for_team@@ -65,6 +67,10 @@ def onboarding_priorities() -> Sequence[tuple[str, str | Promise]]:return AutonomyPriority.choices+def onboarding_setup_modes() -> Sequence[tuple[str, str | Promise]]:+ return InboxOnboardingSetupMode.choices++def onboarding_first_report_statuses() -> Sequence[tuple[str, str | Promise]]:return FirstReportStatus.choices@@ -105,7 +111,6 @@ class InboxOnboarding:"github_optional_available": ResearchAccessPolicy.enabled(self.team_id),"draft": state.get("draft"),"completed_at": state.get("completed_at"),- "variant": state.get("variant"),**({"jobs": jobs} if "jobs" in state else {}),"first_report": first_report_state(self.team.parent_team_id or self.team_id)or (@@ -133,11 +138,7 @@ class InboxOnboarding:def state(self) -> dict[str, Any]:return self._state(get_or_create_team_extension(self.team, SignalTeamConfig))- def reconcile(self) -> dict[str, Any]:- InboxOnboardingReconciler(self.team_id).run()- return self.state()-- def expose(self, variant: str) -> dict[str, Any]:+ def expose(self) -> dict[str, Any]:config = get_or_create_team_extension(self.team, SignalTeamConfig)with transaction.atomic():config = SignalTeamConfig.objects.select_for_update().get(pk=config.pk, team_id=self.team_id)@@ -145,7 +146,6 @@ class InboxOnboarding:if not state.get("exposed_at"):config.onboarding = {**state,- "variant": variant,"exposed_at": timezone.now().isoformat(),"exposed_by": self.user.pk,}@@ -180,6 +180,8 @@ class InboxOnboarding:return self._state(config)def complete(self, draft: dict[str, Any]) -> dict[str, Any]:+ # Activation enqueues scout jobs after commit, so the scout write check has to pass before anything is saved.+ self.authorize_scouts(True)config = get_or_create_team_extension(self.team, SignalTeamConfig)if (config.onboarding or {}).get("completed_at"):self._enqueue_activation_jobs(config)@@ -193,8 +195,6 @@ class InboxOnboarding:raise InboxOnboardingPermissionError("Activating this pilot requires task editor access on the parent project.")- if pilot or (config.onboarding or {}).get("variant") in ("test-github", "test-ui"):- self.authorize_scouts(True)if pilot:if not any(item["kind"] == "canonical" and item["skill_name"] == "signals-scout-general"@@ -202,11 +202,6 @@ class InboxOnboarding:):raise InboxOnboardingValidationError("Quick activation requires the general scout.")- if any(- draft.get(key) or ((config.onboarding or {}).get("draft") or {}).get(key)- for key in ("suggestions", "activation_scouts")- ):- self.authorize_scouts(True)if draft["suggestions"]:if not InboxOnboardingReconciler.scouts_can_emit(self.team.parent_team_id or self.team_id):raise InboxOnboardingValidationError(@@ -255,11 +250,7 @@ class InboxOnboarding:or any(source["source_product"] == "signals_scout" for source in draft["sources"]))withheld = withheld_skills_for_team(scout_team_id) if resume_operational_scouts else set()- experiment = (- resolve_first_report_experiment(self.team.parent_team or self.team)- if (config.onboarding or {}).get("variant") in ("test-github", "test-ui")- else None- )+ experiment = resolve_first_report_experiment(self.team.parent_team or self.team)user = self.userwith transaction.atomic():config = SignalTeamConfig.objects.select_for_update().get(team_id=self.team_id, pk=config.pk)@@ -278,17 +269,13 @@ class InboxOnboarding:"completed_at": timezone.now().isoformat(),"activated_by": user.pk,}- if pilot or state.get("variant") in ("test-github", "test-ui"):- config.onboarding["jobs"] = {- "scout": "pending"- if pilot or experiment or state.get("variant") == "test-github"- else "skipped",- "recommendations": "skipped",- }+ quick = pilot or is_quick_setup(config.onboarding)+ config.onboarding["jobs"] = {+ "scout": "pending" if experiment or quick else "skipped",+ "recommendations": "pending" if quick else "skipped",+ }if experiment:config.onboarding["first_report_variant"] = experiment.variant- if pilot or state.get("variant") == "test-github":- config.onboarding["jobs"]["recommendations"] = "pending"config.save(update_fields=["onboarding", "autostart_enabled", "default_autostart_priority", "updated_at"])@@ -301,12 +288,6 @@ class InboxOnboarding:def _enqueue_activation_jobs(self, config: SignalTeamConfig) -> None:state = config.onboarding or {}- if (- state.get("variant") not in ("test-github", "test-ui")- and (state.get("draft") or {}).get("activation_mode") != GITHUB_OPTIONAL_ACTIVATION- ):- return- self.authorize_scouts(True)from products.signals.backend.tasks import (launch_inbox_onboarding_job, # noqa: PLC0415 - keep the Temporal graph off API route loading)@@ -332,9 +313,3 @@ class InboxOnboarding:team=self.team,organization=self.team.organization,)- if (config.onboarding or {}).get("variant") == "control":- from products.signals.backend.tasks import (- reconcile_inbox_onboarding, # noqa: PLC0415 - avoid task imports during API initialization- )-- reconcile_inbox_onboarding.delay(self.team_id)diff --git a/products/signals/backend/models.py b/products/signals/backend/models.pyindex 994d985c73f8..3306a688bab9 100644--- a/products/signals/backend/models.py+++ b/products/signals/backend/models.py@@ -187,6 +187,11 @@ class AutonomyPriority(models.TextChoices):P4 = "P4", "P4"+class InboxOnboardingSetupMode(models.TextChoices):+ QUICK = "quick", "Quick"+ GUIDED = "guided", "Guided"++# What GitHub accepts as a label name. Duplicated from the GitHub client rather than imported,# because that module pulls the HTTP stack in and this one is loaded on every Django start.GITHUB_LABEL_NAME_MAX_LENGTH = 50diff --git a/products/signals/backend/onboarding_activation.py b/products/signals/backend/onboarding_activation.pyindex 8374b8c0e07c..3872917c498e 100644--- a/products/signals/backend/onboarding_activation.py+++ b/products/signals/backend/onboarding_activation.py@@ -23,10 +23,10 @@ from products.signals.backend.first_report_scout import (set_first_report_state,)from products.signals.backend.first_report_scout_types import FirstReportStatus-from products.signals.backend.github_optional import GITHUB_OPTIONAL_ACTIVATIONfrom products.signals.backend.models import SignalScoutConfig, SignalTeamConfigfrom products.signals.backend.onboarding_analytics import InboxOnboardingAnalyticsfrom products.signals.backend.onboarding_completion import InboxOnboardingReconciler+from products.signals.backend.onboarding_state import is_quick_setupfrom products.signals.backend.scout_harness.run_gates import check_fleet_gates, check_run_in_flight, check_spend_gatesfrom products.signals.backend.scout_harness.suggestions import read_suggestion_settings, suggestions_allowed_for_teamfrom products.signals.backend.temporal.agentic.scout_scheduler import start_onboarding_signals_scout_run@@ -122,11 +122,7 @@ class InboxOnboardingActivation:return Truedef _start_default_scout(self, team: Team, state: dict[str, Any]) -> bool:- quick = (- state.get("variant") == "test-github"- or (state.get("draft") or {}).get("activation_mode") == GITHUB_OPTIONAL_ACTIVATION- )- return quick and self._start_general_scout(team)+ return is_quick_setup(state) and self._start_general_scout(team)def _start_general_scout(self, team: Team) -> bool:scout = (@@ -159,11 +155,7 @@ class InboxOnboardingActivation:team_id=self.team_id)state = config.onboarding or {}- quick = (- state.get("variant") in ("test-github", "test-ui")- or (state.get("draft") or {}).get("activation_mode") == GITHUB_OPTIONAL_ACTIVATION- )- if not quick or not state.get("completed_at"):+ if not state.get("completed_at"):returnif state.get("jobs", {}).get(job) in ("started", "skipped"):returndiff --git a/products/signals/backend/onboarding_analytics.py b/products/signals/backend/onboarding_analytics.pyindex a577a04c63a7..34e22709eed2 100644--- a/products/signals/backend/onboarding_analytics.py+++ b/products/signals/backend/onboarding_analytics.py@@ -6,6 +6,8 @@ import posthoganalyticsfrom posthog.event_usage import groups+from products.signals.backend.onboarding_state import setup_mode+if TYPE_CHECKING:from posthog.models.user import User@@ -29,25 +31,13 @@ class InboxOnboardingAnalytics:@classmethoddef properties(cls, config: SignalTeamConfig, user: User | None = None) -> dict[str, object]:- state = config.onboarding or {}- draft = state.get("draft") or {}- variant = state.get("variant")+ draft = (config.onboarding or {}).get("draft") or {}return {**({"activation_mode": draft["activation_mode"]} if draft.get("activation_mode") else {}),"project_id": config.team_id,- "variant": variant,- "$feature/inbox-ui-onboarding": variant,"flow_version": "ui-first-v1","inbox_client": "cloud",- # A draft without a stored mode is inferred from the assigned variant.- "setup_mode": draft.get("setup_mode")- or (- "quick"- if variant == "test-github" or draft.get("activation_mode") == "github_optional"- else "guided"- if draft or variant == "test-ui"- else "legacy"- ),+ "setup_mode": setup_mode(config.onboarding or {}),"self_driving_ubp": cls.pricing_flag(config, user),}diff --git a/products/signals/backend/onboarding_completion.py b/products/signals/backend/onboarding_completion.pyindex ffd5e7dd8213..fdaa3119179f 100644--- a/products/signals/backend/onboarding_completion.py+++ b/products/signals/backend/onboarding_completion.py@@ -1,26 +1,15 @@from __future__ import annotations-from datetime import timedelta--from django.db import transaction-from django.utils import timezone-from django.utils.dateparse import parse_datetime-from requests import RequestExceptionfrom rest_framework.exceptions import APIExceptionfrom posthog.egress.github.transport import GitHubRateLimitErrorfrom posthog.egress.limiter.policies import Priorityfrom posthog.egress.transport.transport import EgressBudgetExhausted-from posthog.event_usage import groupsfrom posthog.models.github_integration_base import GitHubIntegrationErrorfrom posthog.models.integration import GitHubIntegration, Integration-from posthog.models.user import User-from posthog.ph_client import ph_scoped_capture-from products.replay_vision.backend.facade.api import has_signal_emitting_scanner-from products.signals.backend.models import SignalScoutConfig, SignalSourceConfig, SignalTeamConfig-from products.signals.backend.onboarding_analytics import InboxOnboardingAnalytics+from products.signals.backend.models import SignalSourceConfigclass RepositoryCheckUnavailable(APIException):@@ -28,15 +17,10 @@ class RepositoryCheckUnavailable(APIException):default_detail = "Could not verify GitHub access. Please retry activation shortly."default_code = "repository_check_unavailable"- def __init__(self, retry_after: int = 0) -> None:- super().__init__()- self.retry_after = retry_after-class InboxOnboardingReconciler:- def __init__(self, team_id: int, *, priority: Priority = Priority.NORMAL) -> None:+ def __init__(self, team_id: int) -> None:self.team_id = team_id- self.priority = priority@staticmethoddef scouts_can_emit(team_id: int) -> bool:@@ -44,75 +28,17 @@ class InboxOnboardingReconciler:team_id, SignalSourceConfig.SourceProduct.SIGNALS_SCOUT, SignalSourceConfig.SourceType.CROSS_SOURCE_ISSUE)- def run(self) -> bool:- """Verify control completion; return whether another check is needed."""- config = (- SignalTeamConfig.objects.select_related("team", "team__organization").filter(team_id=self.team_id).first()- )- if config is None:- return False- state = config.onboarding or {}- exposed_at = parse_datetime(state.get("exposed_at", ""))- if (- state.get("variant") != "control"- or state.get("completed_at")- or state.get("draft") is not None- or exposed_at is None- or timezone.now() - exposed_at > timedelta(days=7)- ):- return False- sources_enabled = (- SignalSourceConfig.objects.filter(team_id=self.team_id, enabled=True)- .exclude(source_product__in=["signals_scout", "session_replay"])- .exists()- )- scout_team_id = config.team.parent_team_id or self.team_id- scouts_enabled = self.scouts_can_emit(scout_team_id) and (- SignalScoutConfig.objects.for_team(config.team.parent_team_id or self.team_id)- .filter(enabled=True, emit=True)- .exclude(managed_by="background")- .exclude(auto_pause_exempt_by_role=True)- .exists()- )- if not (sources_enabled or scouts_enabled or has_signal_emitting_scanner(self.team_id)):- return True- if not self.has_repository():- return True- with transaction.atomic():- locked = SignalTeamConfig.objects.select_for_update().get(pk=config.pk, team_id=self.team_id)- state = locked.onboarding or {}- if state.get("draft") is not None:- return False- if not state.get("completed_at"):- locked.onboarding = {**state, "completed_at": timezone.now().isoformat()}- locked.save(update_fields=["onboarding", "updated_at"])- transaction.on_commit(lambda: self._capture(locked), robust=True)- return False-def has_repository(self) -> bool:failure: Exception | None = None- retry_after = 0for integration in Integration.objects.filter(team_id=self.team_id, kind="github").order_by("id"):- github = GitHubIntegration(integration, source="signals_onboarding", priority=self.priority)+ github = GitHubIntegration(integration, source="signals_onboarding", priority=Priority.NORMAL)try:repositories, _ = github.list_repositories(per_page=1)except (GitHubIntegrationError, GitHubRateLimitError, EgressBudgetExhausted, RequestException) as error:failure = failure or error- if isinstance(error, GitHubRateLimitError):- retry_after = max(retry_after, error.retry_after or 0)continueif repositories:return Trueif failure is not None:- raise RepositoryCheckUnavailable(retry_after=retry_after) from failure+ raise RepositoryCheckUnavailable() from failurereturn False-- def _capture(self, config: SignalTeamConfig) -> None:- user = User.objects.filter(pk=(config.onboarding or {}).get("exposed_by")).first()- with ph_scoped_capture() as capture:- capture(- distinct_id=str(user.distinct_id if user else config.team.uuid),- event="self-driving onboarding completed",- groups=groups(team=config.team),- properties=InboxOnboardingAnalytics.completion_properties(config, user),- )diff --git a/products/signals/backend/onboarding_state.py b/products/signals/backend/onboarding_state.pynew file mode 100644index 000000000000..0929a68039d0--- /dev/null+++ b/products/signals/backend/onboarding_state.py@@ -0,0 +1,21 @@+from __future__ import annotations++from typing import Any++from products.signals.backend.github_optional import GITHUB_OPTIONAL_ACTIVATION+from products.signals.backend.models import InboxOnboardingSetupMode+++def setup_mode(state: dict[str, Any]) -> str | None:+ draft = state.get("draft") or {}+ if draft.get("activation_mode") == GITHUB_OPTIONAL_ACTIVATION:+ return InboxOnboardingSetupMode.QUICK+ if not draft:+ # Exposure is reported before a draft exists, so there is no mode to report yet.+ return None+ # Drafts saved before setup_mode existed came from the guided steps.+ return draft.get("setup_mode") or InboxOnboardingSetupMode.GUIDED+++def is_quick_setup(state: dict[str, Any]) -> bool:+ return setup_mode(state) == InboxOnboardingSetupMode.QUICKdiff --git a/products/signals/backend/presentation/onboarding.py b/products/signals/backend/presentation/onboarding.pyindex cb3c4f620829..1605f770c4ad 100644--- a/products/signals/backend/presentation/onboarding.py+++ b/products/signals/backend/presentation/onboarding.py@@ -27,6 +27,7 @@ from products.signals.backend.facade.onboarding import (can_create_onboarding_scout,onboarding_first_report_statuses,onboarding_priorities,+ onboarding_setup_modes,onboarding_source_products,onboarding_source_types,)@@ -40,24 +41,6 @@ class InboxOnboardingStep(models.TextChoices):GITHUB = "github", "GitHub"-class InboxOnboardingSetupMode(models.TextChoices):- QUICK = "quick", "Quick"- GUIDED = "guided", "Guided"---class InboxOnboardingVariant(models.TextChoices):- CONTROL = "control", "Control"- TEST_UI = "test-ui", "Focused steps"- TEST_GITHUB = "test-github", "Activate and explore"---class InboxOnboardingExposureSerializer(serializers.Serializer):- variant = serializers.ChoiceField(- choices=InboxOnboardingVariant.choices,- help_text="Assigned experiment variant at the eligible Inbox impression.",- )--class InboxOnboardingSourceSerializer(serializers.Serializer):source_product = serializers.ChoiceField(choices=onboarding_source_products(), help_text="Source product selected during setup."@@ -80,7 +63,7 @@ class InboxOnboardingDraftSerializer(serializers.Serializer):)step = serializers.ChoiceField(choices=InboxOnboardingStep.choices, help_text="Step to resume after returning.")setup_mode = serializers.ChoiceField(- choices=InboxOnboardingSetupMode.choices,+ choices=onboarding_setup_modes(),required=False,help_text="How setup was chosen: quick activation from the welcome screen, or the guided steps.",)@@ -171,11 +154,6 @@ class InboxOnboardingStateSerializer(serializers.Serializer):jobs = InboxOnboardingJobsSerializer(required=False, help_text="Background work started by quick activation.")draft = InboxOnboardingDraftSerializer(allow_null=True, help_text="Saved setup choices, without activating them.")completed_at = serializers.DateTimeField(allow_null=True, help_text="When verified setup completed.")- variant = serializers.ChoiceField(- choices=InboxOnboardingVariant.choices,- allow_null=True,- help_text="Variant recorded at the first eligible impression.",- )class InboxOnboardingPermission(BasePermission):@@ -226,20 +204,10 @@ class InboxOnboardingViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):lambda write: self._check_suggestion_access(self.request, write=write),)- @extend_schema(request=InboxOnboardingExposureSerializer, responses=InboxOnboardingStateSerializer)- @action(detail=False, methods=["POST"])- def expose(self, request: Request, *args: object, **kwargs: object) -> Response:- serializer = InboxOnboardingExposureSerializer(data=request.data)- serializer.is_valid(raise_exception=True)- if serializer.validated_data["variant"] == InboxOnboardingVariant.CONTROL:- self._check_scout_access(request)- return Response(self._service().expose(serializer.validated_data["variant"]))-@extend_schema(request=None, responses=InboxOnboardingStateSerializer)@action(detail=False, methods=["POST"])- def reconcile(self, request: Request, *args: object, **kwargs: object) -> Response:- self._check_scout_access(request)- return Response(self._service().reconcile())+ def expose(self, request: Request, *args: object, **kwargs: object) -> Response:+ return Response(self._service().expose())@extend_schema(responses=InboxOnboardingStateSerializer)def list(self, request: Request, *args: object, **kwargs: object) -> Response:diff --git a/products/signals/backend/tasks.py b/products/signals/backend/tasks.pyindex 7dd6bf86c9ed..1822bf429ed0 100644--- a/products/signals/backend/tasks.py+++ b/products/signals/backend/tasks.py@@ -141,27 +141,6 @@ def launch_inbox_onboarding_job(self: Task, team_id: int, job: str) -> None:InboxOnboardingActivation(team_id).run(job, final_attempt=self.request.retries >= self.max_retries)-@shared_task(ignore_result=True, autoretry_for=(Exception,), retry_backoff=True, max_retries=5)-@with_team_scope()-def reconcile_inbox_onboarding(team_id: int, failed_checks: int = 0) -> None:- from products.signals.backend.onboarding_completion import (- InboxOnboardingReconciler, # noqa: PLC0415 - keep onboarding dependencies off task discovery- RepositoryCheckUnavailable,- )-- try:- pending = InboxOnboardingReconciler(team_id, priority=Priority.BATCH).run()- except RepositoryCheckUnavailable as error:- reconcile_inbox_onboarding.apply_async(- args=[team_id],- kwargs={"failed_checks": failed_checks + 1},- countdown=max(min(60 * 2 ** min(failed_checks, 4), 900), error.retry_after),- )- return- if pending:- reconcile_inbox_onboarding.apply_async(args=[team_id], countdown=60)--@shared_task(ignore_result=True,queue=CeleryQueue.LONG_RUNNING.value,diff --git a/products/signals/backend/test/test_inbox_onboarding.py b/products/signals/backend/test/test_inbox_onboarding.pyindex dbb43d661a5f..f7fed36f4706 100644--- a/products/signals/backend/test/test_inbox_onboarding.py+++ b/products/signals/backend/test/test_inbox_onboarding.py@@ -34,7 +34,7 @@ from products.signals.backend.onboarding_activation import InboxOnboardingActivafrom products.signals.backend.onboarding_completion import InboxOnboardingReconcilerfrom products.signals.backend.scout_harness.config_registry import register_missing_configsfrom products.signals.backend.scout_harness.lazy_seed import seed_canonical_skills-from products.signals.backend.tasks import launch_inbox_onboarding_job, reconcile_inbox_onboarding+from products.signals.backend.tasks import launch_inbox_onboarding_jobclass TestInboxOnboarding(APIBaseTest):@@ -77,96 +77,30 @@ class TestInboxOnboarding(APIBaseTest):assert self.source.enabled is Falseassert SignalTeamConfig.objects.get(team=self.team).autostart_enabled is None- @parameterized.expand([("control",), ("test-ui",), ("test-github",)])- def test_exposure_is_sticky_and_queued_once(self, variant: str) -> None:+ def test_exposure_is_recorded_once(self) -> None:with (patch("posthog.event_usage.posthoganalytics.capture") as capture,patch("products.signals.backend.onboarding_analytics.posthoganalytics.feature_enabled", return_value=True) as flag,- patch("products.signals.backend.tasks.reconcile_inbox_onboarding.delay") as reconcile,self.captureOnCommitCallbacks(execute=True),):- first = self.client.post(f"{self.url}expose/", {"variant": variant}, format="json")- second = self.client.post(- f"{self.url}expose/", {"variant": "test-ui" if variant == "control" else "control"}, format="json"- )- assert first.status_code == 200- assert first.json()["variant"] == variant- assert second.json()["variant"] == variant+ first = self.client.post(f"{self.url}expose/")+ second = self.client.post(f"{self.url}expose/")+ assert first.status_code == 200, first.json()+ assert first.json() == second.json()assert capture.call_count == 1- assert capture.call_args.kwargs["properties"]["variant"] == variant- assert capture.call_args.kwargs["properties"]["$feature/inbox-ui-onboarding"] == variant+ assert capture.call_args.kwargs["properties"]["setup_mode"] is Noneassert capture.call_args.kwargs["properties"]["self_driving_ubp"] is True+ state = SignalTeamConfig.objects.get(team=self.team).onboarding+ assert state is not None+ assert state["exposed_by"] == self.user.pk+ assert "variant" not in stateassert capture.call_args.kwargs["properties"]["$set_once"] == {"email": self.user.email}assert capture.call_args.kwargs["groups"]["project"] == str(self.team.uuid)assert capture.call_args.kwargs["groups"]["organization"] == str(self.organization.id)assert flag.call_args.args == ("self-driving-ubp", str(self.user.distinct_id))assert flag.call_args.kwargs["groups"]["organization"] == str(self.organization.id)- if variant == "control":- reconcile.assert_called_once_with(self.team.id)- else:- reconcile.assert_not_called()-- def test_control_completion_is_verified_without_a_browser_and_only_once(self) -> None:- config = SignalTeamConfig.objects.get(team=self.team)- config.onboarding = {"variant": "control", "exposed_at": timezone.now().isoformat(), "exposed_by": self.user.pk}- config.save()- with (- patch.object(InboxOnboardingReconciler, "has_repository", return_value=False) as repository,- patch("products.signals.backend.onboarding_completion.ph_scoped_capture") as capture,- patch(- "products.signals.backend.onboarding_analytics.posthoganalytics.feature_enabled",- side_effect=RuntimeError("Unavailable"),- ),- self.captureOnCommitCallbacks(execute=True),- ):- assert InboxOnboardingReconciler(self.team.id).run() is True- config.refresh_from_db()- assert not config.onboarding.get("completed_at")- repository.return_value = True- assert InboxOnboardingReconciler(self.team.id).run() is False- assert InboxOnboardingReconciler(self.team.id).run() is False- config.refresh_from_db()- assert config.onboarding["completed_at"]- capture.assert_called_once()- assert capture.return_value.__enter__.return_value.call_args.kwargs["properties"]["variant"] == "control"- assert capture.return_value.__enter__.return_value.call_args.kwargs["properties"]["self_driving_ubp"] is None- assert capture.return_value.__enter__.return_value.call_args.kwargs["properties"]["setup_mode"] == "legacy"-- @parameterized.expand([(False,), (True,)])- def test_control_reconciliation_waits_for_manual_activation(self, draft_saved_during_check: bool) -> None:- config = SignalTeamConfig.objects.get(team=self.team)- config.onboarding = {"variant": "control", "exposed_at": timezone.now().isoformat()}- if not draft_saved_during_check:- config.onboarding["draft"] = self.draft- config.save()-- def save_draft_and_return_repository() -> bool:- config.onboarding = {**(config.onboarding or {}), "draft": self.draft}- config.save()- return True-- with (- patch.object(InboxOnboardingReconciler, "has_repository", side_effect=save_draft_and_return_repository),- patch("products.signals.backend.onboarding_completion.ph_scoped_capture") as capture,- self.captureOnCommitCallbacks(execute=True),- ):- assert InboxOnboardingReconciler(self.team.id).run() is False- config.refresh_from_db()- assert not config.onboarding.get("completed_at")- capture.assert_not_called()-- def test_control_without_a_source_never_converts(self) -> None:- config = SignalTeamConfig.objects.get(team=self.team)- config.onboarding = {"variant": "control", "exposed_at": timezone.now().isoformat()}- config.save()- self.source.enabled = False- self.source.save()- with patch.object(InboxOnboardingReconciler, "has_repository", return_value=True):- assert InboxOnboardingReconciler(self.team.id).run() is True- config.refresh_from_db()- assert not config.onboarding.get("completed_at")@parameterized.expand([@@ -199,30 +133,25 @@ class TestInboxOnboarding(APIBaseTest):@parameterized.expand([- (None, False, None, None),- ("control", False, None, None),- ("control", False, None, "quick"),- ("test-ui", False, None, None),- ("test-ui", False, "test-sol", None),- ("test-ui", False, "control", None),- ("test-github", False, None, None),- ("test-github", False, None, "guided"),- ("test-github", True, "test-sol", None),+ (None, False, None),+ ("guided", False, None),+ ("guided", False, "test-sol"),+ ("guided", False, "control"),+ ("quick", False, None),+ ("quick", True, "test-sol"),])def test_completion_is_durable_and_retry_safe(- self, variant: str | None, automatic_implementation: bool, arm: str | None, setup_mode: str | None+ self, setup_mode: str | None, automatic_implementation: bool, arm: str | None) -> None:self.draft["automatic_implementation"] = automatic_implementationif setup_mode:self.draft["setup_mode"] = setup_mode- has_scout = variant == "test-github" and automatic_implementation+ quick = setup_mode == "quick"+ has_scout = quick and automatic_implementationif has_scout:self.draft["suggestions"] = [self.suggestion]SignalScoutConfig.objects.create(team=self.team, skill_name=self.scout_skill_name, enabled=True, emit=True)- config = SignalTeamConfig.objects.get(team=self.team)- config.onboarding = {"variant": variant}- config.save()with (patch("products.signals.backend.onboarding_completion.InboxOnboardingReconciler.has_repository",@@ -246,19 +175,13 @@ class TestInboxOnboarding(APIBaseTest):assert first.json() == second.json()config = SignalTeamConfig.objects.get(team=self.team)assert config.onboarding is not None- if variant == "test-github":- assert config.onboarding["jobs"] == {"scout": "pending", "recommendations": "pending"}- assert {call.args for call in launch.call_args_list} == {- (self.team.id, "scout"),- (self.team.id, "recommendations"),- }- elif variant == "test-ui" and arm:- assert config.onboarding["jobs"] == {"scout": "pending", "recommendations": "skipped"}- assert {call.args for call in launch.call_args_list} == {(self.team.id, "scout")}- else:- launch.assert_not_called()- if variant in ("test-ui", "test-github"):- assert config.onboarding.get("first_report_variant") == arm+ assert config.onboarding["jobs"] == {+ "scout": "pending" if arm or quick else "skipped",+ "recommendations": "pending" if quick else "skipped",+ }+ pending_jobs = {job for job, status in config.onboarding["jobs"].items() if status == "pending"}+ assert {call.args for call in launch.call_args_list} == {(self.team.id, job) for job in pending_jobs}+ assert config.onboarding.get("first_report_variant") == armassert bool(first.json().get("first_report")) is (arm == "test-sol")assert config.autostart_enabled is automatic_implementationassert config.default_autostart_priority == "P1"@@ -266,15 +189,12 @@ class TestInboxOnboarding(APIBaseTest):notification = SignalFirstReportNotification.objects.for_team(self.team.id).get()assert notification.activated_by_id == self.user.idassert notification.queued_at is None- assert capture.call_args.kwargs["properties"]["variant"] == variantassert capture.call_args.kwargs["properties"] == {"$set_once": {"email": self.user.email},- "variant": variant,- "$feature/inbox-ui-onboarding": variant,"project_id": self.team.id,"flow_version": "ui-first-v1","inbox_client": "cloud",- "setup_mode": setup_mode or ("quick" if variant == "test-github" else "guided"),+ "setup_mode": setup_mode or "guided","self_driving_ubp": not automatic_implementation,"automatic_implementation": automatic_implementation,"implementation_priority": "P1",@@ -355,7 +275,6 @@ class TestInboxOnboarding(APIBaseTest):self.draft["suggestions"] = [self.suggestion]config = SignalTeamConfig.objects.get(team=self.team)config.onboarding = {- "variant": "test-github","completed_at": timezone.now().isoformat(),"draft": self.draft,"jobs": {"scout": "failed", "recommendations": "failed"},@@ -369,8 +288,8 @@ class TestInboxOnboarding(APIBaseTest):assert response.status_code == 403, response.json()launch.assert_not_called()- @parameterized.expand([(None, False), (True, False), (False, False), (None, True), (False, True)])- def test_scout_only_completion_respects_source_gate(self, enabled: bool | None, control: bool) -> None:+ @parameterized.expand([(None,), (True,), (False,)])+ def test_scout_only_completion_respects_source_gate(self, enabled: bool | None) -> None:self.source.enabled = Falseself.source.save()self.draft["sources"] = []@@ -380,20 +299,13 @@ class TestInboxOnboarding(APIBaseTest):SignalSourceConfig.objects.create(team=self.team, source_product="signals_scout", source_type="cross_source_issue", enabled=enabled)- config = SignalTeamConfig.objects.get(team=self.team)- if control:- config.onboarding = {"variant": "control", "exposed_at": timezone.now().isoformat()}- config.save()Integration.objects.create(team=self.team, kind="github")with patch.object(GitHubIntegration, "list_repositories", return_value=([{"full_name": "example/product"}], False)):- if control:- assert InboxOnboardingReconciler(self.team.id).run() is (enabled is False)- else:- response = self.client.post(f"{self.url}complete/", self.draft, format="json")- assert response.status_code == (400 if enabled is False else 200), response.json()- config.refresh_from_db()+ response = self.client.post(f"{self.url}complete/", self.draft, format="json")+ assert response.status_code == (400 if enabled is False else 200), response.json()+ config = SignalTeamConfig.objects.get(team=self.team)assert bool((config.onboarding or {}).get("completed_at")) is (enabled is not False)@parameterized.expand(@@ -410,7 +322,7 @@ class TestInboxOnboarding(APIBaseTest):self, parent_access: bool, selection: str, expected_status: int) -> None:child = Team.objects.create(organization=self.organization, parent_team=self.team, name="Child")- SignalTeamConfig.objects.create(team=child, onboarding={"variant": "test-ui"})+ SignalTeamConfig.objects.create(team=child)SignalSourceConfig.objects.create(team=child, source_product="error_tracking", source_type="issue_created", enabled=True)@@ -445,7 +357,7 @@ class TestInboxOnboarding(APIBaseTest):)assert response.status_code == expected_status, response.content- @parameterized.expand([("",), ("complete/",), ("expose/",), ("reconcile/",)])+ @parameterized.expand([("",), ("complete/",), ("expose/",)])def test_onboarding_writes_require_a_non_sandbox_credential(self, action: str) -> None:application = OAuthApplication.objects.create(client_id=sorted(SANDBOX_OAUTH_APP_CLIENT_IDS)[0],@@ -527,8 +439,8 @@ class TestInboxOnboarding(APIBaseTest):scout.refresh_from_db()assert scout.enabled- @parameterized.expand([("expose",), ("reconcile",), ("read",)])- def test_child_scoped_credential_cannot_start_parent_reconciliation(self, action: str) -> None:+ @parameterized.expand([("expose",), ("read",)])+ def test_child_scoped_credential_cannot_access_parent_onboarding(self, action: str) -> None:child = Team.objects.create(organization=self.organization, parent_team=self.team, name="Child")raw = generate_random_token_personal()PersonalAPIKey.objects.create(@@ -543,10 +455,7 @@ class TestInboxOnboarding(APIBaseTest):self.client.get(f"/api/projects/{child.id}/signals/onboarding/", HTTP_AUTHORIZATION=f"Bearer {raw}")if action == "read"else self.client.post(- f"/api/projects/{child.id}/signals/onboarding/{action}/",- {"variant": "control"},- format="json",- HTTP_AUTHORIZATION=f"Bearer {raw}",+ f"/api/projects/{child.id}/signals/onboarding/{action}/", HTTP_AUTHORIZATION=f"Bearer {raw}"))assert response.status_code == 403, response.content@@ -572,46 +481,6 @@ class TestInboxOnboarding(APIBaseTest):assert listing.call_count == 2assert all(call.kwargs == {"per_page": 1} for call in listing.call_args_list)- @parameterized.expand([("recovered",), ("expired",), ("manual",), ("completed",)])- def test_background_polling_survives_outage_and_stops(self, terminal_state: str) -> None:- config = SignalTeamConfig.objects.get(team=self.team)- config.onboarding = {"variant": "control", "exposed_at": timezone.now().isoformat()}- config.save()- Integration.objects.create(team=self.team, kind="github")- with (- patch.object(- GitHubIntegration, "list_repositories", side_effect=GitHubRateLimitError("limited")- ) as listing,- patch.object(reconcile_inbox_onboarding, "apply_async") as schedule,- ):- failed_checks = 0- for _ in range(7):- schedule.reset_mock()- reconcile_inbox_onboarding.run(self.team.id, failed_checks=failed_checks)- schedule.assert_called_once()- assert 60 <= schedule.call_args.kwargs["countdown"] <= 900- failed_checks = schedule.call_args.kwargs["kwargs"]["failed_checks"]- config.refresh_from_db()- assert not config.onboarding.get("completed_at")- if terminal_state == "expired":- config.onboarding["exposed_at"] = (timezone.now() - timedelta(days=8)).isoformat()- elif terminal_state == "manual":- config.onboarding["draft"] = self.draft- elif terminal_state == "completed":- config.onboarding["completed_at"] = timezone.now().isoformat()- config.save()- schedule.reset_mock()- listing.reset_mock()- listing.side_effect = None- listing.return_value = ([{"full_name": "example/product"}], False)- reconcile_inbox_onboarding.run(self.team.id, failed_checks=failed_checks)- schedule.assert_not_called()- if terminal_state == "recovered":- config.refresh_from_db()- assert config.onboarding["completed_at"]- else:- listing.assert_not_called()-@parameterized.expand([("get", ["task:read"], True, 403),@@ -673,7 +542,6 @@ class TestInboxOnboarding(APIBaseTest):activated_at = timezone.now()config, _ = SignalTeamConfig.objects.get_or_create(team=team)config.onboarding = {- "variant": "test-github","completed_at": activated_at.isoformat(),"jobs": {"scout": "started", "recommendations": "started"},}@@ -691,20 +559,6 @@ class TestInboxOnboarding(APIBaseTest):config.refresh_from_db()assert config.onboarding["jobs"]["recommendations"] == "started"- def test_background_polling_honors_github_retry_hint(self) -> None:- config = SignalTeamConfig.objects.get(team=self.team)- config.onboarding = {"variant": "control", "exposed_at": timezone.now().isoformat()}- config.save()- Integration.objects.create(team=self.team, kind="github")- with (- patch.object(- GitHubIntegration, "list_repositories", side_effect=GitHubRateLimitError("limited", retry_after=3600)- ),- patch.object(reconcile_inbox_onboarding, "apply_async") as schedule,- ):- reconcile_inbox_onboarding.run(self.team.id, failed_checks=6)- assert schedule.call_args.kwargs["countdown"] == 3600-class TestInboxOnboardingActivation(BaseTest):@parameterized.expand([(False, True), (True, True), (False, False), (False, True, False)])@@ -720,7 +574,6 @@ class TestInboxOnboardingActivation(BaseTest):config = SignalTeamConfig.objects.create(team=self.team,onboarding={- "variant": "test-ui","first_report_variant": "test-sol","completed_at": timezone.now().isoformat(),"activated_by": self.user.pk,@@ -801,8 +654,7 @@ class TestInboxOnboardingActivation(BaseTest):config = SignalTeamConfig.objects.create(team=self.team,onboarding={- "variant": "control" if pilot else "test-github",- "draft": {"activation_mode": "github_optional"} if pilot else {},+ "draft": {"activation_mode": "github_optional"} if pilot else {"setup_mode": "quick"},"first_report_variant": arm,"completed_at": timezone.now().isoformat(),"activated_by": self.user.pk,@@ -902,7 +754,6 @@ class TestInboxOnboardingActivation(BaseTest):config = SignalTeamConfig.objects.create(team=self.team,onboarding={- "variant": "test-github","completed_at": timezone.now().isoformat(),"jobs": {"scout": "pending", "recommendations": "pending"},},diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex 75641eab2ef7..5e71122bbdea 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -1426,20 +1426,6 @@ export interface InboxOnboardingDraftApi {implementation_priority: AutonomyPriorityEnumApi}-/**- * * `control` - Control- * * `test-ui` - Focused steps- * * `test-github` - Activate and explore- */-export type InboxOnboardingVariantEnumApi =- (typeof InboxOnboardingVariantEnumApi)[keyof typeof InboxOnboardingVariantEnumApi]--export const InboxOnboardingVariantEnumApi = {- Control: 'control',- TestUi: 'test-ui',- TestGithub: 'test-github',-} as const-export interface InboxOnboardingStateApi {/** Whether this project can activate Self-driving without connecting GitHub. */github_optional_available?: boolean@@ -1461,21 +1447,6 @@ export interface InboxOnboardingStateApi {* @nullable*/completed_at: string | null- /** Variant recorded at the first eligible impression.- *- * * `control` - Control- * * `test-ui` - Focused steps- * * `test-github` - Activate and explore */- variant: InboxOnboardingVariantEnumApi | null-}--export interface InboxOnboardingExposureApi {- /** Assigned experiment variant at the eligible Inbox impression.- *- * * `control` - Control- * * `test-ui` - Focused steps- * * `test-github` - Activate and explore */- variant: InboxOnboardingVariantEnumApi}export interface PauseStateResponseApi {diff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex add109e507a4..12063db4bf23 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -26,7 +26,6 @@ import type {ForgetRequestApi,ForgetResponseApi,InboxOnboardingDraftApi,- InboxOnboardingExposureApi,InboxOnboardingStateApi,InboxSummaryApi,LighthouseAuditRequestApi,@@ -423,28 +422,11 @@ export const getSignalsOnboardingExposeCreateUrl = (projectId: string) => {export const signalsOnboardingExposeCreate = async (projectId: string,- inboxOnboardingExposureApi: InboxOnboardingExposureApi,options?: RequestInit): Promise<InboxOnboardingStateApi> => {return apiMutator<InboxOnboardingStateApi>(getSignalsOnboardingExposeCreateUrl(projectId), {...options,method: 'POST',- headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(inboxOnboardingExposureApi),- })-}--export const getSignalsOnboardingReconcileCreateUrl = (projectId: string) => {- return `/api/projects/${projectId}/signals/onboarding/reconcile/`-}--export const signalsOnboardingReconcileCreate = async (- projectId: string,- options?: RequestInit-): Promise<InboxOnboardingStateApi> => {- return apiMutator<InboxOnboardingStateApi>(getSignalsOnboardingReconcileCreateUrl(projectId), {- ...options,- method: 'POST',})}diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 0d126de30cc5..822f3ffa67e6 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -627,15 +627,6 @@ export const SignalsOnboardingCompleteCreateBody = /* @__PURE__ */ zod.object({),})-export const SignalsOnboardingExposeCreateBody = /* @__PURE__ */ zod.object({- variant: zod- .enum(['control', 'test-ui', 'test-github'])- .describe('\* `control` - Control\n\* `test-ui` - Focused steps\n\* `test-github` - Activate and explore')- .describe(- 'Assigned experiment variant at the eligible Inbox impression.\n\n\* `control` - Control\n\* `test-ui` - Focused steps\n\* `test-github` - Activate and explore'- ),-})-/*** View and control signal processing pipeline state for a team.*/diff --git a/products/signals/frontend/inbox/InboxScene.stories.tsx b/products/signals/frontend/inbox/InboxScene.stories.tsxindex 81b101409e5d..06bd30200056 100644--- a/products/signals/frontend/inbox/InboxScene.stories.tsx+++ b/products/signals/frontend/inbox/InboxScene.stories.tsx@@ -228,45 +228,23 @@ 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' },- },+ name: 'Welcome page with GitHub and manual setup',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' },+ '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null },},post: {- '/api/projects/:id/signals/onboarding/expose/': { draft: null, completed_at: null, variant: 'control' },+ '/api/projects/:id/signals/onboarding/expose/': { draft: null, completed_at: null },},}),],}-export const FocusedOnboarding: Story = {- 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({- get: {- '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'test-ui' },- },- post: {- '/api/projects/:id/signals/onboarding/expose/': { draft: null, completed_at: null, variant: 'test-ui' },- },- }),- ],-}--export const FocusedOnboardingComplete: Story = {- parameters: { featureFlags: { [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-ui' } },+export const GuidedOnboardingComplete: Story = {decorators: [...(Array.isArray(Empty.decorators) ? Empty.decorators : []),mswDecorator({@@ -282,7 +260,6 @@ export const FocusedOnboardingComplete: Story = {implementation_priority: 'P1',},completed_at: '2026-06-11T10:00:00Z',- variant: 'test-ui',},},}),@@ -309,13 +286,11 @@ export const SelfDrivingVerdictPending: Story = {],}-// Had self-driving before (reports exist) but nothing is watching now → the sleek re-enable banner-// 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.+// Had self-driving before (reports exist) but nothing is watching now and the in-app setup never+// completed → the sleek re-enable banner 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()},@@ -328,11 +303,7 @@ 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',- },+ '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null },},}),],diff --git a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsx b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsxindex 58be581d3b25..dd829f0c3d78 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxOnboardingEntry.tsx@@ -3,30 +3,18 @@ import { useEffect } from 'react'import { LemonBanner, LemonButton, LemonSkeleton } from '@posthog/lemon-ui'-import { teamLogic } from 'scenes/teamLogic'-import { captureInboxWelcomeViewed } from '../../inboxAnalytics'import { inboxSetupLogic } from '../../logics/inboxSetupLogic'import { InboxSetupEmptyState } from './InboxSetupEmptyState'import { InboxSetupFlow } from './InboxSetupFlow'export function InboxOnboardingEntry(): JSX.Element {- const { currentTeamId } = useValues(teamLogic)const { expose, loadSetup } = useActions(inboxSetupLogic)- const {- experimentVariant: variant,- inProgress,- isQuickSetup,- savedState,- savedStateLoading,- error,- } = useValues(inboxSetupLogic)+ const { currentTeamId, inProgress, isQuickSetup, savedState, savedStateLoading, error } = useValues(inboxSetupLogic)useEffect(() => {- if (variant === 'control' || variant === 'test-ui' || variant === 'test-github') {- expose(variant)- }+ expose()captureInboxWelcomeViewed()- }, [variant, currentTeamId, expose])+ }, [currentTeamId, expose])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/InboxSetupFlow.stories.tsx b/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.stories.tsxindex bdb05fb31033..272ecf9c4f41 100644--- a/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.stories.tsx+++ b/products/signals/frontend/inbox/components/onboarding/InboxSetupFlow.stories.tsx@@ -72,10 +72,7 @@ const meta: Meta<typeof InboxSetupFlow> = {parameters: {layout: 'fullscreen',mockDate: '2026-10-14',- featureFlags: {- [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-ui',- [FEATURE_FLAGS.SELF_DRIVING_UBP]: true,- },+ featureFlags: { [FEATURE_FLAGS.SELF_DRIVING_UBP]: true },},decorators: [(Story) => (@@ -87,7 +84,7 @@ const meta: Meta<typeof InboxSetupFlow> = {mswDecorator({get: {'/api/projects/:id/signals/reports/available_reviewers/': {},- '/api/projects/:id/signals/onboarding/': { draft, completed_at: null, variant: 'test-ui' },+ '/api/projects/:id/signals/onboarding/': { draft, completed_at: null },'/api/projects/:id/signals/source_configs/': { results: [], next: null, count: 0 },'/api/projects/:id/event_definitions/': {results: [{ name: '$exception', last_seen_at: '2026-01-01T00:00:00Z' }],@@ -123,7 +120,7 @@ const meta: Meta<typeof InboxSetupFlow> = {'/api/projects/:id/signals/scout/configs/sync/': [],'/api/projects/:id/signals/onboarding/': async ({ request }) => [200,- { draft: await request.json(), completed_at: null, variant: 'test-ui' },+ { draft: await request.json(), completed_at: null },],},}),@@ -151,14 +148,12 @@ export const Scouts: Story = {'/api/projects/:id/signals/onboarding/': {draft: { ...draft, step: 'scouts' },completed_at: null,- variant: 'test-ui',},},post: {'/api/projects/:id/signals/onboarding/expose/': {draft: { ...draft, step: 'scouts' },completed_at: null,- variant: 'test-ui',},},}),@@ -171,7 +166,6 @@ export const Github: Story = {'/api/projects/:id/signals/onboarding/': {draft: { ...draft, step: 'github' },completed_at: null,- variant: 'test-ui',},},}),@@ -180,12 +174,7 @@ export const Github: Story = {export const GithubWithoutAutomaticImplementation: Story = {...Github,- parameters: {- featureFlags: {- [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-ui',- [FEATURE_FLAGS.SELF_DRIVING_UBP]: false,- },- },+ parameters: { featureFlags: { [FEATURE_FLAGS.SELF_DRIVING_UBP]: false } },}export const NoProductsEnabled: Story = {@@ -193,7 +182,7 @@ export const NoProductsEnabled: Story = {projectMocks(false),mswDecorator({get: {- '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'test-ui' },+ '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null },'/api/projects/:id/event_definitions/': { results: [], next: null, count: 0 },'/api/projects/:id/vision/scanners/': { results: [], next: null, count: 0 },'/api/projects/:id/signals/scout/configs/': [@@ -220,7 +209,6 @@ export const BuiltInScouts: Story = {'/api/projects/:id/signals/onboarding/': {draft: { ...draft, step: 'scouts' },completed_at: null,- variant: 'test-ui',},'/api/projects/:id/signals/scout/suggestions/': mockScoutSuggestionSet({status: 'low_activity',@@ -256,7 +244,6 @@ export const GithubAlreadyConnected: Story = {'/api/projects/:id/signals/onboarding/': {draft: { ...draft, step: 'github' },completed_at: null,- variant: 'test-ui',},'/api/projects/:id/integrations/': {results: [@@ -290,7 +277,6 @@ export const GithubAccessRequired: Story = {'/api/projects/:id/signals/onboarding/': {draft: { ...draft, step: 'github' },completed_at: null,- variant: 'test-ui',},},post: { '/api/projects/:id/integrations/request_access/': {} },@@ -298,86 +284,15 @@ export const GithubAccessRequired: Story = {],}-export const TreatmentEntry = {- name: 'Guided assignment with GitHub and manual setup',- render: () => <InboxOnboardingEntry />,- play: async ({ canvas }) => {- await canvas.findByText('Connect GitHub')- await expect(canvas.getByText('Start manually')).toBeVisible()- },- decorators: [- mswDecorator({- get: { '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'test-ui' } },- post: {- '/api/projects/:id/signals/onboarding/expose/': { draft: null, completed_at: null, variant: 'test-ui' },- },- }),- ],-} satisfies Story--export const NarrowTreatmentEntry: Story = {- ...TreatmentEntry,- name: 'Narrow guided intro',- decorators: [- ...(TreatmentEntry.decorators ?? []),- (Story) => (- <div className="h-full w-130">- <Story />- </div>- ),- ],-}--export const ManualEntry: Story = {- name: 'Control assignment with GitHub and manual setup',- parameters: {- featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'control' },- },- render: () => <InboxOnboardingEntry />,- play: async ({ canvas }) => {- await canvas.findByText('Start manually')- await expect(canvas.getByText('Connect GitHub')).toBeVisible()- },- decorators: [- mswDecorator({- get: { '/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' },- '/api/projects/:id/signals/onboarding/': async ({ request }) => [- 200,- { draft: await request.json(), completed_at: null, variant: 'control' },- ],- },- }),- ],-}--export const ExperimentDisabledEntry: Story = {- ...ManualEntry,- name: 'Experiment disabled with GitHub and manual setup',- 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 = {- name: 'Paused reminder without Wizard',- parameters: {- featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: false },- },+export const PausedReminder: Story = {+ name: 'Paused reminder',render: () => <InboxOnboardingBanner />,play: async ({ canvas }) => {await expect(canvas.findByText('Set up Self-Driving')).resolves.toBeVisible()- await expect(canvas.queryByLabelText('Copy self-driving setup command')).not.toBeInTheDocument()},decorators: [mswDecorator({- get: { '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'control' } },+ get: { '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null } },}),],}@@ -402,11 +317,8 @@ const quickGeneralScout = {scout_origin: 'canonical',}-export const QuickEntry: Story = {- name: 'Quick setup intro with GitHub and manual setup',- parameters: {- featureFlags: { ...meta.parameters?.featureFlags, [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-github' },- },+export const QuickEntry = {+ name: 'Welcome with GitHub and manual setup',render: () => <QuickActivationPreview />,play: async ({ canvas }) => {await canvas.findByText('Connect GitHub')@@ -415,7 +327,7 @@ export const QuickEntry: Story = {decorators: [mswDecorator({get: {- '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null, variant: 'test-github' },+ '/api/projects/:id/signals/onboarding/': { draft: null, completed_at: null },'/api/projects/:id/signals/scout/configs/': [quickGeneralScout],'/api/projects/:id/signals/scout/suggestions/': {status: 'empty',@@ -426,15 +338,24 @@ export const QuickEntry: Story = {},},post: {- '/api/projects/:id/signals/onboarding/expose/': {- draft: null,- completed_at: null,- variant: 'test-github',- },+ '/api/projects/:id/signals/onboarding/expose/': { draft: null, completed_at: null },'/api/projects/:id/signals/scout/configs/sync/': [quickGeneralScout],},}),],+} satisfies Story++export const NarrowWelcomeEntry: Story = {+ ...QuickEntry,+ name: 'Narrow welcome',+ decorators: [+ ...(QuickEntry.decorators ?? []),+ (Story) => (+ <div className="h-full w-130">+ <Story />+ </div>+ ),+ ],}export const GithubOptional: Story = {@@ -442,7 +363,6 @@ export const GithubOptional: Story = {name: 'GitHub-optional pilot',parameters: {featureFlags: {- [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'control',[FEATURE_FLAGS.SELF_DRIVING_GITHUB_OPTIONAL]: true,},},@@ -480,7 +400,6 @@ export const QuickConnected: Story = {'/api/projects/:id/signals/onboarding/': () => ({draft: null,completed_at: quickActivationCompleted ? '2026-10-14T00:00:00Z' : null,- variant: 'test-github',...(quickActivationCompleted ? { jobs: { scout: 'started', recommendations: 'started' } } : {}),}),'/api/projects/:id/signals/scout/configs/': () => [@@ -516,15 +435,11 @@ export const QuickConnected: Story = {},},post: {- '/api/projects/:id/signals/onboarding/expose/': {- draft: null,- completed_at: null,- variant: 'test-github',- },+ '/api/projects/:id/signals/onboarding/expose/': { draft: null, completed_at: null },'/api/projects/:id/signals/scout/configs/sync/': [quickGeneralScout],'/api/projects/:id/signals/onboarding/': async ({ request }) => [200,- { draft: await request.json(), completed_at: null, variant: 'test-github' },+ { draft: await request.json(), completed_at: null },],'/api/projects/:id/signals/config/': {},'/api/projects/:id/signals/source_configs/': async ({ request }) => [@@ -539,7 +454,6 @@ export const QuickConnected: Story = {{draft: await request.json(),completed_at: '2026-10-14T00:00:00Z',- variant: 'test-github',jobs: { scout: 'started', recommendations: 'started' },},]@@ -551,7 +465,6 @@ export const QuickConnected: Story = {}export const QuickActivated: Story = {- parameters: QuickEntry.parameters,render: () => (<div className="mx-auto max-w-4xl p-6"><InboxActivationPanel />@@ -566,7 +479,6 @@ export const QuickActivated: Story = {'/api/projects/:id/signals/onboarding/': {draft,completed_at: '2026-10-14T00:00:00Z',- variant: 'test-github',jobs: { scout: 'started', recommendations: 'started' },},'/api/projects/:id/signals/scout/configs/': [{ ...quickGeneralScout, enabled: true, emit: true }],diff --git a/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsx b/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsxindex daa152b938c5..6b2aad7a6204 100644--- a/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsx+++ b/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsx@@ -77,7 +77,6 @@ function mockOnboarding(firstReport: FirstReportStateApi, notify: boolean): voiduseMocks({get: {'/api/projects/:id/signals/onboarding/': {- variant: 'test-ui',completed_at: new Date().toISOString(),draft: null,jobs: { scout: 'started', recommendations: 'skipped' },diff --git a/products/signals/frontend/inbox/inboxAnalytics.ts b/products/signals/frontend/inbox/inboxAnalytics.tsindex 2dd06f7dbe9c..ca23c9f82d31 100644--- a/products/signals/frontend/inbox/inboxAnalytics.ts+++ b/products/signals/frontend/inbox/inboxAnalytics.ts@@ -30,7 +30,6 @@ export const INBOX_CLIENT = 'cloud' as constexport const INBOX_EVENTS = {VIEWED: 'Inbox viewed',WELCOME_VIEWED: 'Inbox welcome viewed',- WELCOME_COMMAND_COPIED: 'Inbox welcome command copied',WELCOME_MANUAL_SETUP_CLICKED: 'Inbox welcome manual setup clicked',INTRO_MODAL_VIEWED: 'Inbox intro modal viewed',PANEL_VIEWED: 'Inbox panel viewed',@@ -377,9 +376,6 @@ function actionabilityBreakdown(reports: SignalReport[]): Record<string, number>}}-/** Where a wizard-command copy happened: the full welcome takeover or the re-enable banner. */-export type InboxWelcomeCopySurface = 'takeover' | 'banner'-/*** The self-driving welcome takeover rendered. `Inbox viewed` never fires for un-set-up teams (the* takeover replaces the report list), so this is the top-of-funnel event for setup conversion.@@ -389,22 +385,9 @@ export function captureInboxWelcomeViewed(): void {}/**- * The wizard setup command was copied. Previously only recoverable from autocapture (and- * unreliably: `$el_text` is null on about half of clicks), so the setup funnel's first- * conversion step gets its own event.- */-export function captureInboxWelcomeCommandCopied(params: { surface: InboxWelcomeCopySurface }): void {- captureInboxEvent(INBOX_EVENTS.WELCOME_COMMAND_COPIED, {- surface: params.surface,- })-}--/**- * The takeover's "Set up manually" escape hatch was pressed. Sits next to- * {@link captureInboxWelcomeCommandCopied} as the other exit from the welcome page, so the two- * together say how a team chose to set self-driving up. Without it a manual setup is invisible:- * the wizard copy never fires, and the sources and scouts that follow look like they came from- * nowhere.+ * The welcome page's "Start manually" link was pressed, the exit from the welcome page that bypasses+ * quick activation. Without it a manual setup is invisible: the sources and scouts that follow look+ * like they came from nowhere.*/export function captureInboxWelcomeManualSetupClicked(): void {captureInboxEvent(INBOX_EVENTS.WELCOME_MANUAL_SETUP_CLICKED, {})diff --git a/products/signals/frontend/inbox/logics/inboxActivationLogic.test.ts b/products/signals/frontend/inbox/logics/inboxActivationLogic.test.tsindex c70b8e767c19..e8d7535315ba 100644--- a/products/signals/frontend/inbox/logics/inboxActivationLogic.test.ts+++ b/products/signals/frontend/inbox/logics/inboxActivationLogic.test.ts@@ -27,7 +27,6 @@ describe('Inbox activation progress', () => {jest.setSystemTime(ACTIVATED_AT)stateReads = 0state = {- variant: 'test-github',completed_at: new Date(ACTIVATED_AT).toISOString(),draft: null,jobs: { scout: 'pending', recommendations: 'started' },@@ -95,11 +94,11 @@ describe('Inbox activation progress', () => {})it.each([- ['a failed recommendation generation', 'test-github', { scout: 'started', recommendations: 'failed' }],- ['guided setup without background jobs', 'test-ui', undefined],- ] as const)('stops polling %s without showing the previous batch', async (_name, variant, jobs) => {+ ['a failed recommendation generation', { scout: 'started', recommendations: 'failed' }],+ ['a completed setup without a jobs record', undefined],+ ] as const)('stops polling %s without showing the previous batch', async (_name, jobs) => {await settle()- state = { ...state, variant, jobs }+ state = { ...state, jobs }await jest.advanceTimersByTimeAsync(10_000)await settle()expect(logic.values.savedState?.jobs?.recommendations).toBe(jobs?.recommendations)diff --git a/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.test.ts b/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.test.tsindex d1a452075a99..4ca7dab6c732 100644--- a/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.test.ts+++ b/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.test.ts@@ -20,7 +20,7 @@ describe('Inbox activation panel visibility', () => {beforeEach(() => {localStorage.clear()initKeaTests()- state = { variant: 'test-github', completed_at: new Date(ACTIVATED_AT).toISOString(), draft: null }+ state = { completed_at: new Date(ACTIVATED_AT).toISOString(), draft: null }reportCount = 0reportRequests = []unmount = undefined@@ -49,27 +49,24 @@ describe('Inbox activation panel visibility', () => {await expectLogic(logic, () => logic.actions.checkVisibility()).toFinishAllListeners()}- describe.each(['test-github', 'test-ui'] as const)('%s', (variant) => {- it.each<[string, number, number, boolean]>([- ['before seven days with reports', SEVEN_DAYS - 1, 1, true],- ['at seven days with reports', SEVEN_DAYS, 1, false],- ['after seven days without reports', SEVEN_DAYS + 60_000, 0, true],- ])('%s', async (_name, age, count, visible) => {- state = { ...state, variant }- reportCount = count- await checkVisibility(age)- expect(logic.values.showActivationPanel).toBe(visible)- if (age < SEVEN_DAYS) {- expect(reportRequests).toHaveLength(0)- } else {- expect(reportRequests.length).toBeGreaterThan(0)- expect(Object.fromEntries(reportRequests[0])).toEqual({- count_only: 'true',- scope: 'entire_project',- status: 'ready,resolved,pending_input,suppressed',- })- }- })+ it.each<[string, number, number, boolean]>([+ ['before seven days with reports', SEVEN_DAYS - 1, 1, true],+ ['at seven days with reports', SEVEN_DAYS, 1, false],+ ['after seven days without reports', SEVEN_DAYS + 60_000, 0, true],+ ])('%s', async (_name, age, count, visible) => {+ reportCount = count+ await checkVisibility(age)+ expect(logic.values.showActivationPanel).toBe(visible)+ if (age < SEVEN_DAYS) {+ expect(reportRequests).toHaveLength(0)+ } else {+ expect(reportRequests.length).toBeGreaterThan(0)+ expect(Object.fromEntries(reportRequests[0])).toEqual({+ count_only: 'true',+ scope: 'entire_project',+ status: 'ready,resolved,pending_input,suppressed',+ })+ }})it('hides when the first report arrives after seven days and stops requesting counts', async () => {@@ -82,11 +79,4 @@ describe('Inbox activation panel visibility', () => {await checkVisibility(SEVEN_DAYS + 120_000)expect(reportRequests).toHaveLength(requestsAfterHiding)})-- it.each(['control', null] as const)('does not show the panel or check reports for %s', async (variant) => {- state = { ...state, variant }- await checkVisibility(SEVEN_DAYS)- expect(logic.values.showActivationPanel).toBe(false)- expect(reportRequests).toHaveLength(0)- })})diff --git a/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.ts b/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.tsindex 11bff7813d19..bd918d8d5ce4 100644--- a/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxActivationVisibilityLogic.ts@@ -14,7 +14,6 @@ interface GeneratedReports {export interface inboxActivationVisibilityLogicValues {completed: boolean // inboxSetupLogiccurrentTeamId: number | null // inboxSetupLogic- isTreatment: boolean // inboxSetupLogicsavedState: InboxOnboardingStateApi | null // inboxSetupLogicactivationPeriodElapsed: booleangeneratedReports: GeneratedReports | null@@ -60,7 +59,6 @@ export interface inboxActivationVisibilityLogicMeta {__keaTypeGenInternalSelectorTypes: {activationPeriodElapsed: (savedState: InboxOnboardingStateApi | null, now: number) => booleanshowActivationPanel: (- isTreatment: boolean,completed: boolean,activationPeriodElapsed: boolean,currentTeamId: number | null,@@ -79,7 +77,7 @@ export type inboxActivationVisibilityLogicType = MakeLogicType<export const inboxActivationVisibilityLogic = kea<inboxActivationVisibilityLogicType>([path(['products', 'signals', 'inbox', 'inboxActivationVisibilityLogic']),connect({- values: [inboxSetupLogic, ['savedState', 'currentTeamId', 'isTreatment', 'completed']],+ values: [inboxSetupLogic, ['savedState', 'currentTeamId', 'completed']],actions: [inboxSetupLogic, ['setSavedState', 'loadSetupSuccess']],}),actions({ checkVisibility: (now: number = Date.now()) => ({ now }) }),@@ -110,14 +108,9 @@ export const inboxActivationVisibilityLogic = kea<inboxActivationVisibilityLogic!!state?.completed_at && now - Date.parse(state.completed_at) >= 7 * 24 * 60 * 60_000,],showActivationPanel: [- (s) => [s.isTreatment, s.completed, s.activationPeriodElapsed, s.currentTeamId, s.generatedReports],- (- treatment: boolean,- completed: boolean,- elapsed: boolean,- teamId: number | null,- reports: GeneratedReports | null- ): boolean => treatment && completed && !(elapsed && reports?.teamId === teamId && reports.count > 0),+ (s) => [s.completed, s.activationPeriodElapsed, s.currentTeamId, s.generatedReports],+ (completed: boolean, elapsed: boolean, teamId: number | null, reports: GeneratedReports | null): boolean =>+ completed && !(elapsed && reports?.teamId === teamId && reports.count > 0),],}),listeners(({ actions, values }) => ({diff --git a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.ts b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.tsindex 0efff715d724..ac519e21c824 100644--- a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.ts+++ b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.ts@@ -25,7 +25,6 @@ describe('inboxOnboardingLogic', () => {isWizardRunning: false,isWizardStateResolved: true,isRefetching: false,- manualSetupRequested: false,}it.each<[string, Partial<OnboardingModeInputs>, InboxOnboardingDecision]>([@@ -128,26 +127,6 @@ describe('inboxOnboardingLogic', () => {{ isRefetching: true, hasExistingWork: true },{ mode: 'banner', reason: null },],- // "Set up manually" opens the Configuration and Scouts tabs the takeover was covering,- // so the whole prompt stands down for the session.- [- 'manual setup requested, would otherwise take over',- { manualSetupRequested: true },- { mode: 'none', reason: 'manual_setup' },- ],- // Enabling a source or scout from there is the real end state, so `already_set_up` wins- // and the takeover can never come back, session flag or not.- [- 'manual setup requested, now set up',- { manualSetupRequested: true, isSelfDrivingSetUp: true },- { mode: 'none', reason: 'already_set_up' },- ],- // A run in flight still outranks it: the progress widget is the more accurate story.- [- 'manual setup requested, wizard running',- { manualSetupRequested: true, isWizardRunning: true },- { mode: 'none', reason: 'wizard_running' },- ],])('%s', (_label, overrides, expected) => {expect(computeOnboardingDecision({ ...base, ...overrides })).toEqual(expected)})diff --git a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.tsindex 3a6123937146..cbd782fa9bc5 100644--- a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts@@ -8,7 +8,7 @@ import { teamLogic } from 'scenes/teamLogic'import type { SignalScoutConfigApi as SignalScoutConfig } from 'products/signals/frontend/generated/api.schemas'-import { captureInboxOnboardingDecided, captureInboxWelcomeManualSetupClicked } from '../inboxAnalytics'+import { captureInboxOnboardingDecided } from '../inboxAnalytics'import { signalSourcesLogic } from '../signalSourcesLogic'import { type SignalSourceConfig } from '../types'import { inboxSetupLogic } from './inboxSetupLogic'@@ -42,48 +42,12 @@ export type InboxSettledUiState = 'takeover' | 'inbox'// forgets which UI it painted last visit and falls back to the skeleton on their next one.export const INBOX_LAST_UI_STATE_STORAGE_KEY = 'inbox-onboarding-last-ui-state'-/** sessionStorage key for the per-team "Set up manually" choice (see `manualSetupRequestedByTeam`). */-// pinned: browser storage key - a rename drops the choice mid-session, so the takeover returns-// for someone who already pressed "Set up manually".-export const INBOX_MANUAL_SETUP_STORAGE_KEY = 'inbox-onboarding-manual-setup'--/**- * Teams that asked to set self-driving up by hand, read back at mount.- *- * The store is sessionStorage, not localStorage, because the takeover is the only prompt to run- * the setup agent: a suppression that never expires costs a team who clicked once and enabled- * nothing every later chance to see it. It must still survive a reload, because the button's own- * copy sends the user off to connect GitHub, so leaving the inbox and coming back is part of the- * flow it starts. It is keyed by team because switching project reloads the app in the same tab- * and sessionStorage outlives that reload, so an unkeyed flag would carry one project's choice- * into every other project.- */-function readManualSetupTeams(): Record<string, boolean> {- try {- const raw = window.sessionStorage.getItem(INBOX_MANUAL_SETUP_STORAGE_KEY)- const parsed = raw ? JSON.parse(raw) : null- return typeof parsed === 'object' && parsed !== null ? parsed : {}- } catch {- // sessionStorage can be unavailable (privacy mode), and a hand-edited value can be- // unparseable. Either way the takeover shows, which is the safe direction to fail.- return {}- }-}--function writeManualSetupTeams(teams: Record<string, boolean>): void {- try {- window.sessionStorage.setItem(INBOX_MANUAL_SETUP_STORAGE_KEY, JSON.stringify(teams))- } catch {- // Unwritable storage costs the choice its reload survival, nothing else.- }-}-/*** Why the onboarding is not showing. `null` whenever it is.*- * `'wizard_running'` and `'manual_setup'` are the deliberate suppressions; every other value is an- * input the decision is still waiting on, or a user who does not need onboarding at all. Carried- * into telemetry so a withheld prompt is distinguishable from an absent one.+ * `'wizard_running'` is the deliberate suppression; every other value is an input the decision is+ * still waiting on, or a user who does not need onboarding at all. Carried into telemetry so a+ * withheld prompt is distinguishable from an absent one.*/export type InboxOnboardingSuppressionReason =| 'wizard_running'@@ -93,7 +57,6 @@ export type InboxOnboardingSuppressionReason =| 'counts_loading'| 'refetching'| 'banner_dismissed'- | 'manual_setup'| nullexport interface InboxOnboardingDecision {@@ -148,9 +111,6 @@ export interface OnboardingModeInputs {/** A config/count refetch is in flight, so the loaded values may be about to change (e.g. the* wizard just finished, or the user returned to the tab). */isRefetching: boolean- /** The user chose "Set up manually" on the takeover this session, so they are configuring the- * project by hand and the prompt to run the setup agent is not what they asked for. */- manualSetupRequested: boolean}/**@@ -176,7 +136,6 @@ export function computeOnboardingDecision({isWizardRunning,isWizardStateResolved,isRefetching,- manualSetupRequested,}: OnboardingModeInputs): InboxOnboardingDecision {// A run in flight is setup in progress: sources and scouts land as it goes, so telling the user// to go and run the wizard would contradict the progress widget already showing it running.@@ -188,13 +147,6 @@ export function computeOnboardingDecision({if (isSetupLoaded && isSelfDrivingSetUp) {return { mode: 'none', reason: 'already_set_up' }}- // The user asked for the Configuration and Scouts tabs instead of the setup agent, so hold the- // whole prompt back: the takeover covers those tabs, and the banner would nag about a decision- // they already made. It is checked after `already_set_up` so the reported reason stays the more- // specific one once a source or scout is actually enabled.- if (manualSetupRequested) {- return { mode: 'none', reason: 'manual_setup' }- }// Work already in the inbox rules the takeover out: the only remaining outcomes (banner /// none) both render the normal inbox, so show it now rather than holding a skeleton. The// non-blocking banner joins once the config and wizard checks settle.@@ -268,7 +220,6 @@ export function computeIsSelfDrivingSetUp(// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface inboxOnboardingLogicValues {- isUiSetup: boolean // inboxSetupLogicsetupCompleted: boolean // inboxSetupLogicsetupInProgress: boolean // inboxSetupLogicsetupStateLoading: boolean // inboxSetupLogic@@ -297,8 +248,6 @@ export interface inboxOnboardingLogicValues {isWizardStateResolved: booleanlastSettledUiState: InboxSettledUiState | nulllastSettledUiStateByTeam: Record<string, InboxSettledUiState>- manualSetupRequested: boolean- manualSetupRequestedByTeam: Record<string, boolean>onboardingDecision: InboxOnboardingDecisiononboardingMode: InboxOnboardingModeresolvedOnboardingMode: InboxOnboardingMode@@ -323,9 +272,6 @@ export interface inboxOnboardingLogicActions {refreshSetupState: () => {value: true}- requestManualSetup: () => {- value: true- }setLastSettledUiState: (teamId: number,uiState: InboxSettledUiState@@ -333,9 +279,6 @@ export interface inboxOnboardingLogicActions {teamId: numberuiState: InboxSettledUiState}- setManualSetupRequested: (teamId: number) => {- teamId: number- }}// Generated by kea-typegen. Update if you're an agent, ignore if you're human.@@ -366,10 +309,6 @@ export interface inboxOnboardingLogicMeta {pullsCountLoading: boolean,reportsCountLoading: boolean) => boolean- manualSetupRequested: (- manualSetupRequestedByTeam: Record<string, boolean>,- currentTeamId: number | null- ) => booleanonboardingDecision: (isSetupLoaded: boolean,isSelfDrivingSetUp: boolean,@@ -378,8 +317,7 @@ export interface inboxOnboardingLogicMeta {bannerDismissed: boolean,isWizardRunning: boolean,isWizardStateResolved: boolean,- isRefetching: boolean,- manualSetupRequested: boolean+ isRefetching: boolean) => InboxOnboardingDecisionresolvedOnboardingMode: (onboardingDecision: InboxOnboardingDecision) => InboxOnboardingModelastSettledUiState: (@@ -394,7 +332,6 @@ export interface inboxOnboardingLogicMeta {isWizardRunning: boolean,setupInProgress: boolean,setupCompleted: boolean,- isUiSetup: boolean,setupStateLoading: boolean) => InboxOnboardingMode}@@ -408,10 +345,11 @@ export type inboxOnboardingLogicType = MakeLogicType<>/**- * Decides how the single-command self-driving onboarding presents itself. The wizard is the main- * way in – one command in the user's repo, no in-app steps – so "set up" is read from what ends up- * watching: at least one signal source or scout. `enabledSourcesCount` counts Replay Vision too,- * which reaches the inbox on its own, without the wizard ever being run.+ * Decides how the self-driving onboarding presents itself. A project that completed the in-app+ * setup goes straight to its inbox, and one that is mid-setup keeps the takeover. For every other+ * project, "set up" is read from what ends up watching: at least one signal source or scout.+ * `enabledSourcesCount` counts Replay Vision too, which reaches the inbox on its own, and a setup+ * agent run detected in flight counts as setup under way.** When self-driving is NOT set up, the presentation depends on whether there's anything to show:* - nothing landed yet (no reports or PRs) → the inbox becomes a locked "Welcome" tab whose body is@@ -428,12 +366,7 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([connect(() => ({values: [inboxSetupLogic,- [- 'inProgress as setupInProgress',- 'completed as setupCompleted',- 'usesFocusedSetup as isUiSetup',- 'savedStateLoading as setupStateLoading',- ],+ ['inProgress as setupInProgress', 'completed as setupCompleted', 'savedStateLoading as setupStateLoading'],signalSourcesLogic,['sourceConfigs', 'sourceConfigsLoading', 'enabledSourcesCount', 'hasEmittingScanner'],scoutFleetLogic,@@ -478,12 +411,9 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([expireWizardVerdictWait: true,setLastSettledUiState: (teamId: number, uiState: InboxSettledUiState) => ({ teamId, uiState }),refreshSetupState: true,- /** "Set up manually" was pressed on the takeover. */- requestManualSetup: true,- setManualSetupRequested: (teamId: number) => ({ teamId }),}),- listeners(({ actions, values }) => ({+ listeners(({ actions }) => ({// Re-pull everything the verdict is computed from. Fired when the wizard run ends and when// the user returns to a tab whose verdict still says "not set up".refreshSetupState: () => {@@ -492,14 +422,6 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([actions.loadPullsCount()actions.loadReportsCount()},- requestManualSetup: () => {- captureInboxWelcomeManualSetupClicked()- inboxSetupLogic.actions.openSetup()- },- // Listeners run after the reducer, so this writes the map the choice is already in.- setManualSetupRequested: () => {- writeManualSetupTeams(values.manualSetupRequestedByTeam)- },})),reducers({@@ -525,14 +447,6 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([state[teamId] === uiState ? state : { ...state, [teamId]: uiState },},],- // Keyed by team for the same reason, and seeded from sessionStorage so the choice survives- // a reload of the inbox without outliving the tab (see `readManualSetupTeams`).- manualSetupRequestedByTeam: [- readManualSetupTeams(),- {- setManualSetupRequested: (state, { teamId }) => (state[teamId] ? state : { ...state, [teamId]: true }),- },- ],}),selectors({@@ -588,11 +502,6 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([reportsCountLoading: boolean): boolean => sourceConfigsLoading || scoutConfigsLoading || pullsCountLoading || reportsCountLoading,],- manualSetupRequested: [- (s) => [s.manualSetupRequestedByTeam, s.currentTeamId],- (manualSetupRequestedByTeam: Record<string, boolean>, currentTeamId: number | null): boolean =>- currentTeamId != null ? (manualSetupRequestedByTeam[currentTeamId] ?? false) : false,- ],// The verdict from live inputs alone, with the input it is still waiting on. Kept separate// from `onboardingMode` so neither the cache writer nor the telemetry below ever reports a// guess that itself came from the cache.@@ -606,7 +515,6 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([s.isWizardRunning,s.isWizardStateResolved,s.isRefetching,- s.manualSetupRequested,],(isSetupLoaded: boolean,@@ -616,8 +524,7 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([bannerDismissed: boolean,isWizardRunning: boolean,isWizardStateResolved: boolean,- isRefetching: boolean,- manualSetupRequested: boolean+ isRefetching: boolean): InboxOnboardingDecision =>computeOnboardingDecision({isSetupLoaded,@@ -628,7 +535,6 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([isWizardRunning,isWizardStateResolved,isRefetching,- manualSetupRequested,}),],resolvedOnboardingMode: [@@ -654,7 +560,6 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([s.isWizardRunning,s.setupInProgress,s.setupCompleted,- s.isUiSetup,s.setupStateLoading,],(@@ -665,25 +570,21 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([isWizardRunning: boolean,setupInProgress: boolean,setupCompleted: boolean,- isUiSetup: boolean,setupStateLoading: boolean): InboxOnboardingMode => {- if (isUiSetup) {- if (setupCompleted) {- return 'none'- }- if (setupInProgress) {- return 'takeover'- }- if (setupStateLoading) {- return 'pending'- }+ if (setupCompleted) {+ return 'none'+ }+ if (setupInProgress) {+ return 'takeover'+ }+ if (setupStateLoading) {+ return 'pending'}if (searchParams.setup === 'github-first' && !isSelfDrivingSetUp && !isWizardRunning) {return 'takeover'}- const mode = resolveDisplayMode(resolvedOnboardingMode, lastSettledUiState)- return mode === 'takeover' && setupStateLoading ? 'pending' : mode+ return resolveDisplayMode(resolvedOnboardingMode, lastSettledUiState)},],}),diff --git a/products/signals/frontend/inbox/logics/inboxSetupLogic.test.ts b/products/signals/frontend/inbox/logics/inboxSetupLogic.test.tsindex 995ceb26fc44..8eb73c1f68ce 100644--- a/products/signals/frontend/inbox/logics/inboxSetupLogic.test.ts+++ b/products/signals/frontend/inbox/logics/inboxSetupLogic.test.ts@@ -35,10 +35,9 @@ const draft: InboxOnboardingDraftApi = {implementation_priority: 'P1',}-describe('focused Inbox setup', () => {+describe('Inbox setup', () => {let logic: ReturnType<typeof inboxSetupLogic.build>let savedDraft: InboxOnboardingDraftApi | null- let variant: 'control' | 'test-ui' | 'test-github' | nulllet sources: SignalSourceConfigApi[]let failCompletion: booleanlet createdSources: number@@ -84,7 +83,6 @@ describe('focused Inbox setup', () => {window.sessionStorage.clear()initKeaTests()savedDraft = { ...draft }- variant = 'test-ui'sources = []createdSources = 0inventoryRequests = 0@@ -104,7 +102,6 @@ describe('focused Inbox setup', () => {'/api/projects/:id/signals/onboarding/': () => ({draft: savedDraft,completed_at: completedAt,- variant,github_optional_available: githubOptional,}),'/api/projects/:id/signals/source_configs/': () => {@@ -156,14 +153,10 @@ describe('focused Inbox setup', () => {}),},post: {- '/api/projects/:id/signals/onboarding/expose/': async ({ request }) => {- const assignment = (await request.json()) as { variant: typeof variant }- variant ??= assignment.variant- return [- 200,- { draft: savedDraft, completed_at: null, variant, github_optional_available: githubOptional },- ]- },+ '/api/projects/:id/signals/onboarding/expose/': () => [+ 200,+ { draft: savedDraft, completed_at: null, github_optional_available: githubOptional },+ ],'/api/projects/:id/signals/scout/configs/sync/': ({ request }) => {inventoryRequests++expect(new URL(request.url).searchParams.get('surface')).toBe('onboarding')@@ -184,7 +177,6 @@ describe('focused Inbox setup', () => {{draft: savedDraft,completed_at: completedAt,- variant,github_optional_available: githubOptional,},]@@ -207,7 +199,6 @@ describe('focused Inbox setup', () => {{draft: savedDraft,completed_at: '2026-10-14T12:00:00Z',- variant,github_optional_available: githubOptional,},],@@ -226,10 +217,7 @@ describe('focused Inbox setup', () => {'/api/projects/:id/signals/source_configs/:source/': () => [200, sources[0]],},})- featureFlagLogic.actions.setFeatureFlags([], {- [FEATURE_FLAGS.SELF_DRIVING_UBP]: true,- [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-ui',- })+ featureFlagLogic.actions.setFeatureFlags([], { [FEATURE_FLAGS.SELF_DRIVING_UBP]: true })logic = inboxSetupLogic()logic.mount()})@@ -254,10 +242,8 @@ describe('focused Inbox setup', () => {async (entry, usageBasedPricing, savedImplementation, pilot) => {githubOptional = pilotconst capture = jest.spyOn(posthog, 'capture')- variant = pilot ? 'control' : entry === 'github_return' ? 'test-github' : nullfeatureFlagLogic.actions.setFeatureFlags([], {[FEATURE_FLAGS.SELF_DRIVING_UBP]: usageBasedPricing,- [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-github',})savedDraft =savedImplementation === null ? null : { ...draft, automatic_implementation: savedImplementation }@@ -299,7 +285,6 @@ describe('focused Inbox setup', () => {['self-driving onboarding activation requested',expect.objectContaining({- variant: pilot ? 'control' : 'test-github',setup_mode: 'quick',flow_version: 'ui-first-v1',inbox_client: 'cloud',@@ -397,7 +382,7 @@ describe('focused Inbox setup', () => {'/api/projects/:id/signals/onboarding/': () =>onboardingUnavailable? [503, { detail: 'Unavailable' }]- : [200, { draft: savedDraft, completed_at: completedAt, variant }],+ : [200, { draft: savedDraft, completed_at: completedAt }],},})await expectLogic(logic).toFinishAllListeners()@@ -458,128 +443,103 @@ describe('focused Inbox setup', () => {])})- it.each(['control', null, 'test-ui', 'test-github'] as const)(- 'opens setup and preserves the %s assignment through resume and activation',- async (assignment) => {- variant = assignment- savedDraft = null- featureFlagLogic.actions.setFeatureFlags([], {- [FEATURE_FLAGS.SELF_DRIVING_UBP]: true,- ...(assignment ? { [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: assignment } : {}),- })- await expectLogic(logic, () => logic.actions.loadSetup()).toFinishAllListeners()- expect(logic.values.usesFocusedSetup).toBe(true)- expect(logic.values.inProgress).toBe(false)+ it('opens setup and preserves progress through resume and activation', async () => {+ savedDraft = null+ await expectLogic(logic, () => logic.actions.loadSetup()).toFinishAllListeners()+ expect(logic.values.inProgress).toBe(false)+ await expectLogic(logic, () => logic.actions.startSetup()).toFinishAllListeners()+ const capture = jest.spyOn(posthog, 'capture')+ const onboarding = inboxOnboardingLogic()+ onboarding.mount()+ try {+ await expectLogic(logic, () => logic.actions.continueFromWelcome()).toFinishAllListeners()+ await expectLogic(logic, () => logic.actions.continueFromWelcome()).toFinishAllListeners()+ expect(logic.values.inProgress).toBe(true)+ expect(onboarding.values.onboardingMode).toBe('takeover')+ expect(router.values.searchParams.onboarding_step).toBe('signals')await expectLogic(logic, () => logic.actions.startSetup()).toFinishAllListeners()- const capture = jest.spyOn(posthog, 'capture')- const onboarding = inboxOnboardingLogic()- onboarding.mount()- try {- 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')- expect(router.values.searchParams.onboarding_step).toBe('signals')- await expectLogic(logic, () => logic.actions.startSetup()).toFinishAllListeners()- logic.actions.reportStepViewed()- logic.actions.reportStepViewed()- expect(capture.mock.calls.filter(([event]) => event === 'self-driving onboarding step viewed')).toEqual(- [- [- 'self-driving onboarding step viewed',- expect.objectContaining({ step: 'signals', setup_mode: 'guided' }),- ],- ]- )- await expectLogic(logic, () =>- logic.actions.patchDraft({ sources: draft.sources })- ).toFinishAllListeners()- expect(savedDraft).toBeNull()- expect(- capture.mock.calls.filter(([event]) => event === 'self-driving onboarding started')- ).toHaveLength(0)- onboarding.unmount()- logic.unmount()- router.actions.replace('/inbox')- logic = inboxSetupLogic()- logic.mount()- await expectLogic(logic, () => logic.actions.loadSetup()).toFinishAllListeners()- expect(logic.values.inProgress).toBe(false)- expect(logic.values.draft.step).toBe('signals')- onboarding.mount()- await expectLogic(logic, () => logic.actions.openSetup()).toFinishAllListeners()- await expectLogic(logic, () => logic.actions.startSetup()).toFinishAllListeners()- await expectLogic(logic, () => logic.actions.goToStep('github')).toFinishAllListeners()- expect(savedDraft).toMatchObject({ step: 'github' })- logic.actions.reportStepViewed()- await expectLogic(logic, () => logic.actions.goToStep('signals')).toFinishAllListeners()- logic.actions.reportStepViewed()- expect(- capture.mock.calls.filter(([event]) => event === 'self-driving onboarding step completed')- ).toEqual([['self-driving onboarding step completed', expect.objectContaining({ step: 'signals' })]])- await expectLogic(logic, () => logic.actions.goToStep('github')).toFinishAllListeners()- await expectLogic(logic, () =>- logic.actions.patchDraft({ sources: draft.sources })- ).toFinishAllListeners()- expect(- capture.mock.calls.filter(([event]) => event === 'self-driving onboarding started')- ).toHaveLength(1)- expect(capture).toHaveBeenCalledWith(- 'self-driving onboarding started',- expect.objectContaining({ variant: assignment })- )- expect(- capture.mock.calls.filter(([event]) => event === 'self-driving onboarding welcome continued')- ).toHaveLength(1)- expect(- capture.mock.calls.filter(([event]) => event === 'Inbox welcome manual setup clicked')- ).toHaveLength(1)- } finally {- onboarding.unmount()- capture.mockRestore()- }+ logic.actions.reportStepViewed()+ logic.actions.reportStepViewed()+ expect(capture.mock.calls.filter(([event]) => event === 'self-driving onboarding step viewed')).toEqual([+ [+ 'self-driving onboarding step viewed',+ expect.objectContaining({ step: 'signals', setup_mode: 'guided' }),+ ],+ ])+ await expectLogic(logic, () => logic.actions.patchDraft({ sources: draft.sources })).toFinishAllListeners()+ expect(savedDraft).toBeNull()+ expect(capture.mock.calls.filter(([event]) => event === 'self-driving onboarding started')).toHaveLength(0)+ onboarding.unmount()logic.unmount()router.actions.replace('/inbox')logic = inboxSetupLogic()logic.mount()await expectLogic(logic, () => logic.actions.loadSetup()).toFinishAllListeners()- expect(logic.values.usesFocusedSetup).toBe(true)- expect(logic.values.inProgress).toBe(true)- expect(logic.values.draft.step).toBe('github')- expect(logic.values.experimentVariant).toBe(assignment)+ expect(logic.values.inProgress).toBe(false)+ expect(logic.values.draft.step).toBe('signals')+ onboarding.mount()+ await expectLogic(logic, () => logic.actions.openSetup()).toFinishAllListeners()await expectLogic(logic, () => logic.actions.startSetup()).toFinishAllListeners()- const resumedCapture = jest.spyOn(posthog, 'capture')+ await expectLogic(logic, () => logic.actions.goToStep('github')).toFinishAllListeners()+ expect(savedDraft).toMatchObject({ step: 'github' })logic.actions.reportStepViewed()- expect(resumedCapture).toHaveBeenCalledWith(- 'self-driving onboarding step viewed',- expect.objectContaining({- step: 'github',- implementation_toggle_shown: true,- })+ await expectLogic(logic, () => logic.actions.goToStep('signals')).toFinishAllListeners()+ logic.actions.reportStepViewed()+ expect(capture.mock.calls.filter(([event]) => event === 'self-driving onboarding step completed')).toEqual([+ ['self-driving onboarding step completed', expect.objectContaining({ step: 'signals' })],+ ])+ await expectLogic(logic, () => logic.actions.goToStep('github')).toFinishAllListeners()+ await expectLogic(logic, () => logic.actions.patchDraft({ sources: draft.sources })).toFinishAllListeners()+ expect(capture.mock.calls.filter(([event]) => event === 'self-driving onboarding started')).toHaveLength(1)+ expect(capture).toHaveBeenCalledWith(+ 'self-driving onboarding started',+ expect.objectContaining({ setup_mode: 'guided' }))- failCompletion = false- await expectLogic(logic, () => logic.actions.activate()).toFinishAllListeners()- expect(logic.values.completed).toBe(true)- expect(logic.values.inProgress).toBe(false)- expect(logic.values.experimentVariant).toBe(assignment)- expect(resumedCapture).toHaveBeenCalledWith(- 'self-driving onboarding step completed',- expect.objectContaining({ step: 'github' })+ expect(+ capture.mock.calls.filter(([event]) => event === 'self-driving onboarding welcome continued')+ ).toHaveLength(1)+ expect(capture.mock.calls.filter(([event]) => event === 'Inbox welcome manual setup clicked')).toHaveLength(+ 1)+ } finally {+ onboarding.unmount()+ capture.mockRestore()}- )+ logic.unmount()+ router.actions.replace('/inbox')+ logic = inboxSetupLogic()+ logic.mount()+ await expectLogic(logic, () => logic.actions.loadSetup()).toFinishAllListeners()+ expect(logic.values.inProgress).toBe(true)+ expect(logic.values.draft.step).toBe('github')+ await expectLogic(logic, () => logic.actions.startSetup()).toFinishAllListeners()+ const resumedCapture = jest.spyOn(posthog, 'capture')+ logic.actions.reportStepViewed()+ expect(resumedCapture).toHaveBeenCalledWith(+ 'self-driving onboarding step viewed',+ expect.objectContaining({+ step: 'github',+ implementation_toggle_shown: true,+ })+ )+ failCompletion = false+ await expectLogic(logic, () => logic.actions.activate()).toFinishAllListeners()+ expect(logic.values.completed).toBe(true)+ expect(logic.values.inProgress).toBe(false)+ expect(resumedCapture).toHaveBeenCalledWith(+ 'self-driving onboarding step completed',+ expect.objectContaining({ step: 'github' })+ )+ })- it('shows the paused reminder when a Wizard-completed control project disables its sources', async () => {- variant = 'control'+ it('shows the paused reminder when a project with reports stops watching anything', async () => {savedDraft = null- completedAt = '2026-10-14T12:00:00Z'sources = [{...draft.sources[0],id: 'source-one',- created_at: completedAt,- updated_at: completedAt,+ created_at: '2026-10-14T12:00:00Z',+ updated_at: '2026-10-14T12:00:00Z',status: null,},]@@ -602,7 +562,7 @@ describe('focused Inbox setup', () => {signalSourcesLogic.actions.loadVisionScanners()}).toFinishAllListeners()await waitFor(() => expect(onboarding.values.isSetupLoaded).toBe(true))- expect(logic.values.completed).toBe(true)+ expect(logic.values.completed).toBe(false)expect(onboarding.values.onboardingMode).toBe('none')sources[0].enabled = false@@ -610,17 +570,14 @@ describe('focused Inbox setup', () => {signalSourcesLogic.actions.loadSourceConfigs()).toFinishAllListeners()await waitFor(() => expect(onboarding.values.onboardingMode).toBe('banner'))- expect(logic.values.completed).toBe(true)+ expect(logic.values.completed).toBe(false)} 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,- [FEATURE_FLAGS.INBOX_UI_ONBOARDING]: 'test-ui',- })+ featureFlagLogic.actions.setFeatureFlags([], { [FEATURE_FLAGS.SELF_DRIVING_UBP]: usageBasedPricing })const capture = jest.spyOn(posthog, 'capture')await expectLogic(logic, () => logic.actions.startSetup()).toFinishAllListeners()expect(logic.values.activationDisabledReason).toBeUndefined()@@ -878,7 +835,6 @@ describe('focused Inbox setup', () => {const save = jest.spyOn(signalsApi, 'signalsOnboardingCreate').mockImplementation(async (_, draft) => ({draft,completed_at: null,- variant: 'test-ui',}))jest.useFakeTimers()logic.actions.patchDraft({ automatic_implementation: true })@@ -931,11 +887,11 @@ describe('focused Inbox setup', () => {logic.actions.goToStep('scouts')expect(save).toHaveBeenCalledTimes(1)expect(logic.values.saving).toBe(true)- finishFirst({ draft: save.mock.calls[0][1], completed_at: null, variant: 'test-ui' })+ finishFirst({ draft: save.mock.calls[0][1], completed_at: null })await waitFor(() => expect(save).toHaveBeenCalledTimes(2))expect(logic.values.draft).toMatchObject({ automatic_implementation: false, implementation_priority: 'P2' })expect(router.values.searchParams.onboarding_step).not.toBe('scouts')- finishSecond({ draft: save.mock.calls[1][1], completed_at: null, variant: 'test-ui' })+ finishSecond({ draft: save.mock.calls[1][1], completed_at: null })await expectLogic(logic).toFinishAllListeners()expect(save).toHaveBeenCalledTimes(2)expect(logic.values.saving).toBe(false)@@ -969,7 +925,7 @@ describe('focused Inbox setup', () => {logic.actions.connectGithub('/authorize-github')expect(assign).not.toHaveBeenCalled()expect(logic.values.saving).toBe(true)- finish({ draft: save.mock.calls[1][1], completed_at: null, variant: 'test-ui' })+ finish({ draft: save.mock.calls[1][1], completed_at: null })await expectLogic(logic).toFinishAllListeners()expect(logic.values.error).toBeNull()expect(assign).toHaveBeenCalledWith('/authorize-github')diff --git a/products/signals/frontend/inbox/logics/inboxSetupLogic.ts b/products/signals/frontend/inbox/logics/inboxSetupLogic.tsindex 5d45959677dc..05966ba3e1de 100644--- a/products/signals/frontend/inbox/logics/inboxSetupLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxSetupLogic.ts@@ -128,7 +128,6 @@ export interface inboxSetupLogicValues {draft: InboxOnboardingDraftApieditedDraft: InboxOnboardingDraftApi | nullerror: string | null- experimentVariant: 'control' | 'test-github' | 'test-ui' | nullfailedOperation: 'activation' | 'other' | 'scouts' | 'sources' | nullfirstReportProgress: FirstReportProgressState | nullhasGithubIntegration: boolean@@ -136,7 +135,6 @@ export interface inboxSetupLogicValues {isFinalStep: booleanisGithubOptionalSetup: booleanisQuickSetup: boolean- isTreatment: booleanpendingQuickActivation: 'button' | 'github_return' | 'retry' | nullquickActivationPending: booleanquickSetupDraft: InboxOnboardingDraftApi | null@@ -153,7 +151,6 @@ export interface inboxSetupLogicValues {sourceCount: numbersources: InboxSetupSource[]started: boolean- usesFocusedSetup: boolean}// Generated by kea-typegen. Update if you're an agent, ignore if you're human.@@ -181,8 +178,8 @@ export interface inboxSetupLogicActions {continueFromWelcome: () => {value: true}- expose: (variant: 'control' | 'test-github' | 'test-ui') => {- variant: 'control' | 'test-github' | 'test-ui'+ expose: () => {+ value: true}goToStep: (step: InboxOnboardingDraftApi['step']) => {step: InboxOnboardingStepEnumApi@@ -300,13 +297,7 @@ export interface inboxSetupLogicMeta {pendingQuickActivation: 'button' | 'github_return' | 'retry' | null,error: string | null) => boolean- experimentVariant: (- featureFlags: FeatureFlagsSet,- savedState: InboxOnboardingStateApi | null- ) => 'control' | 'test-github' | 'test-ui' | null- isTreatment: (experimentVariant: 'control' | 'test-github' | 'test-ui' | null) => booleanresumingSetup: (searchParams: Record<string, any>) => boolean- usesFocusedSetup: (isTreatment: boolean, savedState: InboxOnboardingStateApi | null) => booleansources: (sourceConfigs: SignalSourceConfig[] | null,productStatusBySource: Partial<Record<AgentRosterSource, SourceProductStatus>>,@@ -421,7 +412,7 @@ export const inboxSetupLogic = kea<inboxSetupLogicType>([refreshSources: true,reportInteraction: true,reportStepViewed: true,- expose: (variant: 'control' | 'test-ui' | 'test-github') => ({ variant }),+ expose: true,patchDraft: (patch: Partial<InboxOnboardingDraftApi>) => ({ patch }),setEditedDraft: (draft: InboxOnboardingDraftApi) => ({ draft }),connectGithub: (url: string) => ({ url }),@@ -554,31 +545,11 @@ export const inboxSetupLogic = kea<inboxSetupLogicType>([(pending: 'button' | 'github_return' | 'retry' | null, error: string | null): boolean =>pending !== null && !error,],- experimentVariant: [- (s) => [s.featureFlags, s.savedState],- (- flags: FeatureFlagsSet,- state: InboxOnboardingStateApi | null- ): 'control' | 'test-ui' | 'test-github' | null => {- const variant = state?.variant ?? flags[FEATURE_FLAGS.INBOX_UI_ONBOARDING]- return variant === 'control' || variant === 'test-ui' || variant === 'test-github' ? variant : null- },- ],- isTreatment: [- (s) => [s.experimentVariant],- (variant: 'control' | 'test-ui' | 'test-github' | null): boolean =>- variant === 'test-ui' || variant === 'test-github',- ],resumingSetup: [(s) => [s.searchParams],(params: Record<string, any>): boolean =>['signals', 'scouts', 'github', 'quick'].includes(String(params.onboarding_step)),],- usesFocusedSetup: [- (s) => [s.isTreatment, s.savedState],- (treatment: boolean, state: InboxOnboardingStateApi | null): boolean =>- treatment || !state?.completed_at || !!state.draft,- ],sources: [(s) => [s.sourceConfigs, s.productStatusBySource, s.visionScanners, s.currentTeam],(@@ -732,7 +703,6 @@ export const inboxSetupLogic = kea<inboxSetupLogicType>([const capture = (event: string, properties: Record<string, unknown> = {}): void => {posthog.capture(event, {- variant: values.experimentVariant,project_id: values.currentTeamId,flow_version: 'ui-first-v1',inbox_client: 'cloud',@@ -790,16 +760,16 @@ export const inboxSetupLogic = kea<inboxSetupLogicType>([capture('self-driving onboarding welcome continued')actions.openSetup()},- expose: async ({ variant }) => {+ expose: async () => {+ // The welcome entry remounts whenever the takeover verdict flips, and the server records one exposure anyway.+ if (cache.exposedTeamId === values.currentTeamId) {+ return+ }+ cache.exposedTeamId = values.currentTeamIdtry {- const state = await signalsOnboardingExposeCreate(String(values.currentTeamId), { variant })- if (state.variant !== values.savedState?.variant) {- actions.setSavedState({- ...(values.savedState ?? state),- variant: state.variant,- })- }+ await signalsOnboardingExposeCreate(String(values.currentTeamId))} catch (error) {+ cache.exposedTeamId = undefinedposthog.captureException(error)}},@@ -1237,18 +1207,6 @@ export const inboxSetupLogic = kea<inboxSetupLogicType>([actions.loadSetup()}},- [featureFlagLogic.actionTypes.setFeatureFlags]: () => {- if (- ['control', 'test-ui', 'test-github'].includes(- String(values.featureFlags[FEATURE_FLAGS.INBOX_UI_ONBOARDING])- ) &&- !values.savedState &&- !values.savedStateLoading &&- values.currentTeamId- ) {- actions.loadSetup()- }- },}}),afterMount(({ actions, values, cache }) => {diff --git a/products/signals/frontend/inbox/signalSourcesLogic.test.ts b/products/signals/frontend/inbox/signalSourcesLogic.test.tsindex 2cf47068e3f6..7ef4b2f30b6e 100644--- a/products/signals/frontend/inbox/signalSourcesLogic.test.ts+++ b/products/signals/frontend/inbox/signalSourcesLogic.test.ts@@ -99,7 +99,7 @@ describe('signalSourcesLogic', () => {beforeEach(() => {warehouseSources = []- onboardingState = { draft: null, completed_at: null, variant: null }+ onboardingState = { draft: null, completed_at: null }useMocks({get: {'/api/projects/:team_id/signals/onboarding/': () => [200, onboardingState],@@ -359,7 +359,6 @@ describe('signalSourcesLogic', () => {logic.actions.loadOnboardingStateSuccess({draft: declinedJiraDraft,completed_at: '2024-03-10T00:00:00Z',- variant: 'test-ui',})sourcesDataLogic.actions.loadSourcesSuccess({results: [@@ -417,17 +416,16 @@ describe('signalSourcesLogic', () => {})it.each([- { name: 'control completion', variant: 'control' as const, draft: null, expected: ['jira'] },+ { name: 'completion without a draft', draft: null, expected: ['jira'] },{name: 'completion without a source choice',- variant: 'test-ui' as const,draft: { ...declinedJiraDraft, sources: [] },expected: ['jira'],},- { name: 'an explicit source rejection', variant: 'test-ui' as const, draft: declinedJiraDraft, expected: [] },+ { name: 'an explicit source rejection', draft: declinedJiraDraft, expected: [] },])('refreshes recommendations after $name', async (state) => {warehouseSources = [{ ...githubSource, source_type: 'Jira', created_at: '2024-03-01T00:00:00Z' }]- onboardingState = { variant: state.variant, draft: state.draft, completed_at: null }+ onboardingState = { draft: state.draft, completed_at: null }sourcesDataLogic.actions.loadSourcesSuccess({ results: warehouseSources, next: null, previous: null })await expectLogic(logic, () => logic.actions.loadSourceConfigs()).toFinishAllListeners()expect(logic.values.visibleSourceRecommendations.map(({ agent }) => agent.source)).toEqual(['jira'])diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 99ff4e08f8c4..059d0b097d96 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -64769,29 +64769,6 @@ export namespace Schemas {implementation_priority: AutonomyPriorityEnum;}- /**- * * `control` - Control- * * `test-ui` - Focused steps- * * `test-github` - Activate and explore- */- export type InboxOnboardingVariantEnum = typeof InboxOnboardingVariantEnum[keyof typeof InboxOnboardingVariantEnum];--- export const InboxOnboardingVariantEnum = {- Control: 'control',- TestUi: 'test-ui',- TestGithub: 'test-github',- } as const;-- export interface InboxOnboardingExposure {- /** Assigned experiment variant at the eligible Inbox impression.- *- * * `control` - Control- * * `test-ui` - Focused steps- * * `test-github` - Activate and explore */- variant: InboxOnboardingVariantEnum;- }-/*** * `pending` - Pending* * `started` - Started@@ -64846,12 +64823,6 @@ export namespace Schemas {* @nullable*/completed_at: string | null;- /** Variant recorded at the first eligible impression.- *- * * `control` - Control- * * `test-ui` - Focused steps- * * `test-github` - Activate and explore */- variant: InboxOnboardingVariantEnum | null;}export interface InboxSummaryPullRequest {