: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(onboarding): wizard run confirmation + persistent FAB (#59304)
Fernando Gomes6285e474b3a6
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 2604f16bb5ff..132e6ed7ec6a 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -632,6 +632,22 @@ snapshots:hash: v1.k794b7964.4c03eb4162445e32a74dc1ff8083feed9788b930aea5a4ce49e15c5da22d1b0b.OgPSbq_YYg9wIYaUs5jvjS-8YAzzBf5RgZIjtgXuZp8components-hogcharts-linechart--with-zeros-and-negatives--light:hash: v1.k794b7964.5d0d5d5cf4963ac46b4ed2bfdcedf7b24a63a47b7d84e259882e0606cbf43ce1.UtJNbmKgq3ZFS9AdrrOLJzsEejeh19IDdI9aOwxy9Ps+ components-hogcharts-metric--default--dark:+ hash: v1.k794b7964.121acde0d2ffcbb2ea6657bdb2cd2666ba6d34528f3a0b6d61c517f3bfc0e690.G2RsZqN9I8j6BI-t453mJIL7Lld_JAhtO3FM5WSaV7A+ components-hogcharts-metric--default--light:+ hash: v1.k794b7964.8bd27e40dcb1bbbe2f2b4cb0f01fe04af3cf7b9816c7d735811db71e50c50824.xtUPK0ER9_UfV9lWaT3Y9hTzc97yLgrepJBIFffRQps+ components-hogcharts-metric--falling--dark:+ hash: v1.k794b7964.7a249706a02d3ecafb06f582dd4495c9c3f1a615debf421914f4cd6fd51b60ef.ZNY3dId9hCU0KmcNRCjEbey6sKytBJsRfv2u_30hJOU+ components-hogcharts-metric--falling--light:+ hash: v1.k794b7964.7223f07b305e81987250456c70b176fb0450056f87aa4b2e68aa2712ffbf3795.3aiuOFUzkCEZlYloBWWvbqGWLXasynQyeZ8M8ue-cVI+ components-hogcharts-metric--no-change--dark:+ hash: v1.k794b7964.7f692798e9fdec4e34d22d6237b910cf9d6d2c79bc8bfdd5f430ef4d6d159da9.92INHOJUd37OK1Mhaj-ZXrywofAqC27zHFETF_ZidJ8+ components-hogcharts-metric--no-change--light:+ hash: v1.k794b7964.a1029cc8a495d830890ee00d7ae7b9602e7c486695b5fe9dc49f1778cd3dcf37.wtoEorXIEYDVW-6Urx7d5IynJpP1mYb9ZDinvQr084M+ components-hogcharts-metric--number-only--dark:+ hash: v1.k794b7964.4360546d8053143c263d5315c0dd31ac95aa035467738b96fc24632e0b1fe1b2.p_5tW3kuA973BxYWWjwrQg2iwIyPbTYfbGaybWIwTZs+ components-hogcharts-metric--number-only--light:+ hash: v1.k794b7964.9e1fbd475ba802686d23440d747df99abc015757e7708d037f246464fd46a3f8.K1CGuG2R-VxLBu6HLU-jBXWJKH_49rGnbAUx1YnrTcQcomponents-hogcharts-piechart--donut--dark:hash: v1.k794b7964.53683ceb5ed88f7d3542094db1fb764fc6a2f8908036b3748ac4504695032427.qQAVMSvoraiafCrTL62wowzgaXHrdULwrGIb8d2VwBkcomponents-hogcharts-piechart--donut--light:@@ -660,22 +676,6 @@ snapshots:hash: v1.k794b7964.e8aaf3e63d88d917b6511232aff85b4bf54f4c3b71fc267fde59a1170ba056a9.EL-FQ7Hqbd4FOdgbpZv2ynzzwJt2j6OQZkymgQXMC4Ucomponents-hogcharts-piechart--with-breakdown-labels--light:hash: v1.k794b7964.811f8e01cbeeb97d8319a76668d33864b6be08a2b8f270e5980fe951fafbc1bb.UoRHUDWOOnMGSCQcBN8D5TwfE6LL3IG58n0wUC_WOwo- components-hogcharts-metric--default--dark:- hash: v1.k794b7964.121acde0d2ffcbb2ea6657bdb2cd2666ba6d34528f3a0b6d61c517f3bfc0e690.G2RsZqN9I8j6BI-t453mJIL7Lld_JAhtO3FM5WSaV7A- components-hogcharts-metric--default--light:- hash: v1.k794b7964.8bd27e40dcb1bbbe2f2b4cb0f01fe04af3cf7b9816c7d735811db71e50c50824.xtUPK0ER9_UfV9lWaT3Y9hTzc97yLgrepJBIFffRQps- components-hogcharts-metric--falling--dark:- hash: v1.k794b7964.7a249706a02d3ecafb06f582dd4495c9c3f1a615debf421914f4cd6fd51b60ef.ZNY3dId9hCU0KmcNRCjEbey6sKytBJsRfv2u_30hJOU- components-hogcharts-metric--falling--light:- hash: v1.k794b7964.7223f07b305e81987250456c70b176fb0450056f87aa4b2e68aa2712ffbf3795.3aiuOFUzkCEZlYloBWWvbqGWLXasynQyeZ8M8ue-cVI- components-hogcharts-metric--no-change--dark:- hash: v1.k794b7964.7f692798e9fdec4e34d22d6237b910cf9d6d2c79bc8bfdd5f430ef4d6d159da9.92INHOJUd37OK1Mhaj-ZXrywofAqC27zHFETF_ZidJ8- components-hogcharts-metric--no-change--light:- hash: v1.k794b7964.a1029cc8a495d830890ee00d7ae7b9602e7c486695b5fe9dc49f1778cd3dcf37.wtoEorXIEYDVW-6Urx7d5IynJpP1mYb9ZDinvQr084M- components-hogcharts-metric--number-only--dark:- hash: v1.k794b7964.4360546d8053143c263d5315c0dd31ac95aa035467738b96fc24632e0b1fe1b2.p_5tW3kuA973BxYWWjwrQg2iwIyPbTYfbGaybWIwTZs- components-hogcharts-metric--number-only--light:- hash: v1.k794b7964.9e1fbd475ba802686d23440d747df99abc015757e7708d037f246464fd46a3f8.K1CGuG2R-VxLBu6HLU-jBXWJKH_49rGnbAUx1YnrTcQcomponents-hogcharts-referenceline--fill-sides--dark:hash: v1.k794b7964.c6b9d78f0423edc9a0baccf3dd9e05139aecb9387e8e3e5c32bcaec28663f279.zDKfyNa2u4-LWW40uD0XPkXVGUCnAZkfvJZI2TS0adAcomponents-hogcharts-referenceline--fill-sides--light:@@ -4943,9 +4943,9 @@ snapshots:scenes-app-insights-funnels--funnel-left-to-right-breakdown-edit--light:hash: v1.k794b7964.414326f685dca45885b93d728ae8a75c7d8b600af35d76c9512a74a27e453006.IyZ8qHUwOv6qsBYvdUR1ZsK1Md_GNFCftDGvNZj78BQscenes-app-insights-funnels--funnel-left-to-right-edit--dark:- hash: v1.k794b7964.293297b83994468984576e5c15fa2cbbb2c4c0a7a8234959b9deba539efa383b.xupnP9sdcp25xPBOMzrhSHwtRpKPLKHaqLDBncapvQA+ hash: v1.k794b7964.c47bdb853ef9b6becfb675e2ca0bdbdb0c1b4385cf2442d50dd92752d90f7906.gaL7vRk-pWoOUkiPi-NGCd1W72x-M5l9jk5Qu-UcjwIscenes-app-insights-funnels--funnel-left-to-right-edit--light:- hash: v1.k794b7964.6c391cbc05b64230fbd8defdbb960b131fd433409817497873fb9ffc705cd360.dtIb8VK_HAoAvzi8YbVjGpt2Y8yONsVV7mEiD9DrclQ+ hash: v1.k794b7964.c63132bb5b13cbe97938ebdb2e59e320ebc338bd12b2d3bfd6af81e56270650a.3gc3UBg-8GVo4HkNBH7UrogK2q1uh9pXPDjTdYGT8ncscenes-app-insights-funnels--funnel-left-to-right-edit-viewports--medium--dark:hash: v1.k794b7964.dad9df902a133cafd6b3314a3800fcb45dabbbb59a0766c87c226549392104fc.u8mciTuIKrwI-d3yiUx6dVpr3oLoJJ7tgvRU7hutwhUscenes-app-insights-funnels--funnel-left-to-right-edit-viewports--medium--light:@@ -4955,7 +4955,7 @@ snapshots:scenes-app-insights-funnels--funnel-left-to-right-edit-viewports--superwide--light:hash: v1.k794b7964.c95c5a49f7a20b7fcb1041dd26c73ee87c9a906cb229247a44fd4633bbdc9173.StrJ2VBA5acLqvnsiO2CS_o6qadxeaeO6ST8lxf5UdIscenes-app-insights-funnels--funnel-left-to-right-edit-viewports--wide--dark:- hash: v1.k794b7964.293297b83994468984576e5c15fa2cbbb2c4c0a7a8234959b9deba539efa383b.O7SwG4Drfr3z02hcLNC1LsLsGWddouhybBp4xZaUE-A+ hash: v1.k794b7964.c47bdb853ef9b6becfb675e2ca0bdbdb0c1b4385cf2442d50dd92752d90f7906.URrKOLP9uUjbKWcui2yOA7hm_JsXsbkAlOcWJshoQrIscenes-app-insights-funnels--funnel-left-to-right-edit-viewports--wide--light:hash: v1.k794b7964.c63132bb5b13cbe97938ebdb2e59e320ebc338bd12b2d3bfd6af81e56270650a.KSiw8WpvjWXIDh87ExL4cPnopVJlTXvzU8N8ruh6Hi8scenes-app-insights-funnels--funnel-time-to-convert--dark:@@ -6251,9 +6251,9 @@ snapshots:scenes-other-login--sso-error--light:hash: v1.k794b7964.e3531f02585f69ca46e68222d24b33db7e853635b357d95b3c792b2b97f8a45b.P3WyrTpc-AkNiK9F-Tdx7dtDFZlRpeZi0q8ijJ2FuFIscenes-other-onboarding--ai-observability-sdk-install--dark:- hash: v1.k794b7964.292d2ee9e110862fbe1f2bc966c29b1266208b8269feb9aaaace7e78b085099e.yU6nnYUKuAW1id5P4LCEWrppb7vNoqxdAihFOAOyWi4+ hash: v1.k794b7964.4047bda2f11ee77266a5fe71ddd327f59693592d6f014ef7da83d624d446c990.6HFORXyzVSPnXIEmpUmqK9DOv0D6-Uux8j3FM_8OUG4scenes-other-onboarding--ai-observability-sdk-install--light:- hash: v1.k794b7964.4d5018b9c134616b097565ea5753c67cc9705bb6cd8ee98bdfab3d1d9a02eaba.5xmnyRqXlHkOx55iuXixkfYuCEwzOG_utTlW2V8nzDE+ hash: v1.k794b7964.97d5fc60513e7ec7b3c6513aa4be86fb87f690de2d68c2241350065a2ba4e7ca.ifnxRDTIh9YqXS0-f7CaFYl5wQA63wtsnGVaJY2x8kgscenes-other-onboarding--alerts--dark:hash: v1.k794b7964.d66fb935e8f6fcf6d71031d9a59bf76501c90d29e5e5bae324b2cb2bbcd15ed7.4Cvshejpp_prXnrtkj5xZMl08OoFB6I6RreTrsQ4Hnoscenes-other-onboarding--alerts--light:@@ -6279,9 +6279,9 @@ snapshots:scenes-other-onboarding--product-analytics-configuration--light:hash: v1.k794b7964.4a2bcedebc129a67058f79b95c15dda9797691ce565f44d529cbf83e6948d10e.w_sFYsVPreMbVJO-APEJlFdnbCBsuFN6pADVErDgyj8scenes-other-onboarding--sdk-install--dark:- hash: v1.k794b7964.b721119196c1a0a6768c8176d2a4a22d98156c94ed92a4c19fde3c982568a877.7mfES_SIDHt4psGoXb5WMPMyzKc2gTMfDzzos9dJXAM+ hash: v1.k794b7964.1e237dfe82c9f4c474bc411f210bc67c366b584148a5108c8794baf75b4c1905.iakzoR7JQm3g__jd3XMA8CHN5-GzViN9-esYU3tAi0gscenes-other-onboarding--sdk-install--light:- hash: v1.k794b7964.8f85ec0fa20dc302e96ceb85e7536eaa34f7d6dd21ba2e36f06a329e091ed587.h3wfZono6YX7SKRAlUgH0vBGw_cSseHRFfDTBdLfkYU+ hash: v1.k794b7964.a85b95099961a82f595fc2fc29f3c7c766ba0cde99726738641f06915b49f52f.Q7qga_mpVJGAPvPaKlWGd6SwrTfmDVHt-229EugKZGkscenes-other-onboarding--session-replay-configuration--dark:hash: v1.k794b7964.bc63efbf3a08ad3aec029038ea4c799935c382f9b7fc074abfe93bdec693bb24.wR9gk1_JZEFq5Zhlf78o3Y4pFA7itBHsHsy9lIm2HrIscenes-other-onboarding--session-replay-configuration--light:@@ -6295,9 +6295,9 @@ snapshots:scenes-other-onboarding--source-maps--light:hash: v1.k794b7964.93823f2125aa43c9d1a7ccd7af96c035fcaf5835e6954565fbc1eaa60ac0543d.6PrFyTJ9m1b8RmsbP52aQK7Ogh3pCUwtq5ZPwd9DZywscenes-other-onboarding--workflows-custom-installation-instructions--dark:- hash: v1.k794b7964.3ebbb833ccdf866a5ec4d46849d1a4b85b998247390537142e6c46f9e0e15268.7zNIgJVAQSjE81-nO8Fd5TWIDpjdcHk0BUqhxgVOv04+ hash: v1.k794b7964.fd6d46b0ab630dfc6408935c4bd66edab5cb95ca13c45978dc84bf39df616bdf.NnHImIQM5b2POWoGsKnCwuQg5zCPBEVkjydv9q38KKgscenes-other-onboarding--workflows-custom-installation-instructions--light:- hash: v1.k794b7964.6e5fbd3a6656ff7d711556a9c0a3aa727a2f3b04a2cd7035bd45347b67ad9293.XUTjpyN9wnkW56NfDf80u1UGXqryJyBYE1a373_alUk+ hash: v1.k794b7964.e7799afe615ebbfff73061d141e8637059f611320a23798c01b2f743aa0008e0.ziB-0hGPEiQ6LBefN31z80vD9pl-5kU_J-C15mMvjSMscenes-other-onboarding-post-onboarding-modal--ai-observability--dark:hash: v1.k794b7964.9c143ad56b4ef49573961c3a4c4d54c77e9f56c087805759ebad15d44380e844.X3A27rPDv6ANhma6iQYFE15_EST_3D7yrRiwE1PwqdIscenes-other-onboarding-post-onboarding-modal--ai-observability--light:@@ -6358,6 +6358,66 @@ snapshots:hash: v1.k794b7964.98c8c237be42cdff687a4d0e17288cf9b87c0ecfd0d45f6fb7038b1c08343afc._0bNgtLiKO3hf65SU97DiFQ1mjUjgeIIbWy7qQl3MwYscenes-other-onboarding-product-selection--base--light:hash: v1.k794b7964.b06b552dc3c53616de4d809c892e49843271347fcd2445900585a20a925b47b8.S8Ik2YI5dGrmmDbVIIZsLSquFs8o8GpM38j9XBe6vrM+ scenes-other-onboarding-wizard-progress-fab--analyzing--dark:+ hash: v1.k794b7964.99186df8a72f5dc2660088657c332894632d02fd156187b29053043b9aa7b775.BLS2Rc6SmF0YrQlefvzvgdJzZN0wji4M5NEarTRAMKY+ scenes-other-onboarding-wizard-progress-fab--analyzing--light:+ hash: v1.k794b7964.99186df8a72f5dc2660088657c332894632d02fd156187b29053043b9aa7b775.mE_5BywoVGrVXSY7lRIdWScgaDZEauSmIaKPb1vvqm8+ scenes-other-onboarding-wizard-progress-fab--completed--dark:+ hash: v1.k794b7964.24932e01a4f5163ee6d7ac692619013d37de7c15da8977f69677bab941d038c9.X6KVtR5r-wZmxuhwfa_Z9v5wr8__SEGevPlbVk76SYM+ scenes-other-onboarding-wizard-progress-fab--completed--light:+ hash: v1.k794b7964.8d480e0ed6fe7fcb9ca4c0caf120e6195d6c3cf26a2b66e7bfe1a68f01b1ab94.wJsrj9rnN-kIzROTvzHwgITzouvpbue-gF6IFI2nHQM+ scenes-other-onboarding-wizard-progress-fab--connecting--dark:+ hash: v1.k794b7964.f933484e1dbfa018c8f9bc89ebf638696993dbff85e03fd9781ce927dd0fbc8d.QrtVvnwZpqyZRXAZzqkXVYZxkV6P-Ary8squqzHrNv4+ scenes-other-onboarding-wizard-progress-fab--connecting--light:+ hash: v1.k794b7964.7b512e1fad20562c3be7fa4bc104961b8ee45d144232725ed45c2615a73ee745.uKVRWYVNjBggJthfBS9vUs1dI9hzK7-TD1Pj9dGCdxI+ scenes-other-onboarding-wizard-progress-fab--errored--dark:+ hash: v1.k794b7964.b3094fa6103e468c0b3ce439ac09c7b3a8164673f3c76ecf8ed71a6390664900.bLj8nW5YNvv-6qQ0G7cumiXgqVbX4H2d4cAS9p5c-9w+ scenes-other-onboarding-wizard-progress-fab--errored--light:+ hash: v1.k794b7964.8b696b3b54d920fef56be716a252bafee50e38258dfa1ef84cf65a0b30411256.oRkYtC0t82WqRBzi18OaMnjVeu5ZJwuPTrbS0qWPqxM+ scenes-other-onboarding-wizard-progress-fab--hidden--dark:+ hash: v1.k794b7964.7339164e447ee73f7c39364c66d001322a3aafca01f5ed556eab86469b075e18.E2FTiepk3gY5SfJVK8rIKQx0o6xRZh5OaJPvaTTD7ak+ scenes-other-onboarding-wizard-progress-fab--hidden--light:+ hash: v1.k794b7964.c06f06ae162e22a589f803b9d9a5baa371aeebafd575a9d69e011e6206500860.3rowYlzZnYCn9bzH6opctCBkugd16afRX5gcTh-YYE4+ scenes-other-onboarding-wizard-progress-fab--hidden-by-panel--dark:+ hash: v1.k794b7964.c2b73d1cab763183df5ae5ba2ea50a8865906d5f3c1e84c4d6e0f1c372ef1519.lg6D-_J1KfcKtfNuZL2OxbcIgYthCFTlzrjxrvlyMfU+ scenes-other-onboarding-wizard-progress-fab--hidden-by-panel--light:+ hash: v1.k794b7964.bce4ea4c026085a402c53ad582f4c29f640cf0472b011878a51261de2a247409.kyUehJPyu4sqg6_N0z_MTrusU9oaOpXDqtt4cIiBLso+ scenes-other-onboarding-wizard-progress-fab--running-early--dark:+ hash: v1.k794b7964.0296ec79ff6f4601d2ddea2dc27b0e252aab04eaceeeb2f4f788f48705a48cde.G7JNmzbqMeSmUW8LVokl2c53bpuLHLIxJpcy-FofPUM+ scenes-other-onboarding-wizard-progress-fab--running-early--light:+ hash: v1.k794b7964.d87b854cb7e6e73476ee3db5e8692ecd822328a1f12f86b810413a62da3c796e.IXegoJyclVdk2W8fpMcNy8ZYfkYoCFanj6tAwlgUXdg+ scenes-other-onboarding-wizard-progress-fab--running-late--dark:+ hash: v1.k794b7964.ee3678d9069f39bb8ced87d98ef2b2087bb7c384601b7b899bc5922a8cb97a81.g_FQ9jTaVBD6uc4WehaxF3OwYLuQdVsJf8ERPfzTfEg+ scenes-other-onboarding-wizard-progress-fab--running-late--light:+ hash: v1.k794b7964.19efdd2918ec498dd888007dbb0bfac27d518dfa8b91931319a300317fa110ab.GCfTwDcKp9gVFMFMZ-Smj0JC5h2XzqKTxHRIuCZXQi0+ scenes-other-onboarding-wizard-progress-fab--simulated-run--dark:+ hash: v1.k794b7964.99186df8a72f5dc2660088657c332894632d02fd156187b29053043b9aa7b775.boCJbCiaF96Ic84c_YNlLq5U-OaUsZwKPQyId_KAXHE+ scenes-other-onboarding-wizard-progress-fab--simulated-run--light:+ hash: v1.k794b7964.1ce470ec4c22c48650fcc2d5689067fc55698d12dae32b9f0334794a61020c31.P7nZl4PYbmBX__Pl0IANFmWrcjW9bImvowj_A2zbVEM+ scenes-other-onboarding-wizard-progress-tracker--completed--dark:+ hash: v1.k794b7964.eeb4245fab7cc4f2bb28fc13e2d51ea1d1eb08329bc89704fe83dd5528f57490.V8dWsfh2YTHfLO7ZY2tNWSj4CCzljRem7Yo5Nhi9qQg+ scenes-other-onboarding-wizard-progress-tracker--completed--light:+ hash: v1.k794b7964.988922675397412bc87e0483cd796eec152847f8a668443dc2500be63b4b0582.PFZEgkp9iqZuTxHU2RLPzKqNYF13SSaK-dgaWjQ3D7M+ scenes-other-onboarding-wizard-progress-tracker--errored--dark:+ hash: v1.k794b7964.e37ca2ed1ca27a7aacf7695bfb6085572f307034ea7aa285d96c94fb5f6fe14f.bmY8A-w8ey-Zoy-DrHaIhIvfAhJUvl1hajIE2IUY9C0+ scenes-other-onboarding-wizard-progress-tracker--errored--light:+ hash: v1.k794b7964.b4c1b9bb32c009a3b3b39d172b515948c49990754e3ecc7e121df6b034c5f386.pze77LZ-IKKa8b3Om2ub2iVb5tu8OP8bZTepuzIpJV8+ scenes-other-onboarding-wizard-progress-tracker--full-install-step-with-error--dark:+ hash: v1.k794b7964.35736f8960eeaa894ce63e478631b2609e428c634362750b1ea20fd9451d5864.xevOErXxyIDPaJUTABLXM5fy1SwtVnevQdnwyoCvkFI+ scenes-other-onboarding-wizard-progress-tracker--full-install-step-with-error--light:+ hash: v1.k794b7964.659f9c98e2d0af774eacc57cc799c3b67bc37e7572461f5f957caf17366fcc6a.njOOShdB_enYfO73WA1YwTqOt0sYEQ0OCXlRAwAC9dE+ scenes-other-onboarding-wizard-progress-tracker--pre-takeover--dark:+ hash: v1.k794b7964.ea104d42f720e32fdc11e61e0b752cb29a1754bde6cf49a826dcbe35efb588c8.bhE8vvdlGKi1Xpf_mufsHOZmPTG8VU-xWuXWsK_G3nU+ scenes-other-onboarding-wizard-progress-tracker--pre-takeover--light:+ hash: v1.k794b7964.75a3286adb26bc0a2f0f585190bde12d088e875bb35599d2ed109acfcb98bcdd.F2cyq0NqFH38JC_36MzTE28arXMyZnEyOxUGSFnWigg+ scenes-other-onboarding-wizard-progress-tracker--reconnecting--dark:+ hash: v1.k794b7964.eedac1ab151694071e494d21c37f6170d264bd64e1f765888dc3ed5ef1880849.lB1mPFJ8Pdp8a_9kKqT4uqMs1ieiCm-MURIqg0aSaLQ+ scenes-other-onboarding-wizard-progress-tracker--reconnecting--light:+ hash: v1.k794b7964.032f4bd4adb918f3ca558bbbbb1a34df6d0ba99c409c6c70d03fe18d9f3d440e.5mJ2iAEirOPlpUm2bHP-snk0FgN9dpFdeLoMJWjdwr0+ scenes-other-onboarding-wizard-progress-tracker--running--dark:+ hash: v1.k794b7964.9a5d994051b9ea9f88461560276fbca890a0641dcf08c5ac0ef9843a7bf9bd42.dmWArr_s3keboPNEcZCdjpbm0C8k64Mgw_B5ivT4iiQ+ scenes-other-onboarding-wizard-progress-tracker--running--light:+ hash: v1.k794b7964.02ab3e3d2d9d2df8766af871bdb5bf408c1ebf853e0799c87764ab9c9330d5a1._e05GNSCtrftHPlW6oFUVJ7sboGc2B2zgNVf39SEAJMscenes-other-org-member-invites--current-user-is-admin--dark:hash: v1.k794b7964.28aabe198d2b883e099ade4efac2bbc8407b0a45dfb59a3fd17d5ed836d791a9.Qx1pAHHMuJ5vizxDsCxx_-fW4XSBePsHOTgFly-ibGkscenes-other-org-member-invites--current-user-is-admin--light:diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex 73fd9d378acc..d7c94e3622c6 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -388,7 +388,7 @@ export const FEATURE_FLAGS = {ONBOARDING_SKIP_INSTALL_STEP: 'onboarding-skip-install-step', // owner: @rafaeelaudibert #team-growth multivariate=trueONBOARDING_SOCIAL_PROOF_INFO: 'onboarding-social-proof-info', // owner: @fercgomes #team-growth, payload overrides social proof strings per productONBOARDING_WIZARD_INSTALLATION_IMPROVED_COPY: 'onboarding-wizard-installation-improved-copy', // owner: @fercgomes #team-growth multivariate=control,test- ONBOARDING_WIZARD_PROMINENCE: 'onboarding-wizard-prominence', // owner: #team-growth multivariate=control,wizard-hero,wizard-tab,wizard-only+ ONBOARDING_WIZARD_SYNC: 'onboarding-wizard-sync', // owner: @fercgomes #team-growth multivariate=control,test — gates the live wizard sync progress panelOWNER_ONLY_BILLING: 'owner-only-billing', // owner: @pawelcebula #team-billingPAGE_REPORTS_AVERAGE_PAGE_VIEW: 'page-reports-average-page-view', // owner: @jordanm-posthog #team-web-analyticsPAGE_REPORTS_RANKED_URL_SEARCH: 'page-reports-ranked-url-search', // owner: @jordanm-posthog #team-web-analyticsdiff --git a/frontend/src/scenes/AuthenticatedShell.tsx b/frontend/src/scenes/AuthenticatedShell.tsxindex fe8d5a4be4c6..a0b1a8c86aac 100644--- a/frontend/src/scenes/AuthenticatedShell.tsx+++ b/frontend/src/scenes/AuthenticatedShell.tsx@@ -10,6 +10,7 @@ import { eventIngestionRestrictionLogic } from 'lib/logic/eventIngestionRestrictimport { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { PostOnboardingModal } from 'scenes/onboarding/PostOnboardingModal'import { postOnboardingModalLogic } from 'scenes/onboarding/postOnboardingModalLogic'+import { WizardProgressFab } from 'scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab'import { GlobalModals } from '~/layout/GlobalModals'import { GlobalShortcuts } from '~/layout/GlobalShortcuts'@@ -43,6 +44,7 @@ export default function AuthenticatedShell({ children }: { children: React.React<PostOnboardingModal /><ImpersonationNotice /><SelfReadOnlyNotice />+ <WizardProgressFab />{featureFlags[FEATURE_FLAGS.EXPERIMENTS_DW_AA_TEST] === 'test' && (<div data-attr="experiments-dw-aa-test-variant" className="hidden" />)}diff --git a/frontend/src/scenes/onboarding/Onboarding.tsx b/frontend/src/scenes/onboarding/Onboarding.tsxindex bd7905ea0c50..21491baa2179 100644--- a/frontend/src/scenes/onboarding/Onboarding.tsx+++ b/frontend/src/scenes/onboarding/Onboarding.tsx@@ -16,6 +16,9 @@ export const scene: SceneExport = {* Reads the `ONBOARDING_FLOW_VARIANT` multivariate flag and renders the matching onboarding* variant from {@link onboardingVariantRegistry}. `control` (the default, and the fallback for* any unknown value) renders the current product-selection + step-host flow.+ *+ * `WizardProgressFab` is mounted globally in `AuthenticatedShell` so it persists after the+ * user leaves onboarding — the wizard CLI may still be running on their machine.*/export function Onboarding(): JSX.Element | null {const { onboardingFlowVariant } = useValues(onboardingLogic)diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardCommandBlock.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardCommandBlock.tsxindex 5f8db4b107f4..34f28ddc8bef 100644--- a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardCommandBlock.tsx+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardCommandBlock.tsx@@ -42,7 +42,7 @@ const WIZARD_FRAMEWORKS: { name: string; icon: string | ComponentType }[] = [{ name: 'Python', icon: pythonImage },]-const WIZARD_HOG_URL = 'https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png'+export const WIZARD_HOG_URL = 'https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png'export function WizardCommandBlock(): JSX.Element {const { wizardCommand, isCloudOrDev } = useWizardCommand()diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardOnlyIntro.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallIntro.tsxsimilarity index 55%rename from frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardOnlyIntro.tsxrename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallIntro.tsxindex b079f2b44ec5..b38eb84ada15 100644--- a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardOnlyIntro.tsx+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallIntro.tsx@@ -1,23 +1,16 @@import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'/**- * Intro for the wizard-only install variant.+ * Intro copy above the wizard command block.*- * Experiment: onboarding-wizard-installation-improved-copy (#team-growth)- * control — original one-line tagline- * test — expanded copy that concretely enumerates what the wizard does,- * adds short "how it works" instructions (run from project root,- * follow prompts), and surfaces that PostHog covers LLM inference- * (no user API key required)+ * Experiment: ONBOARDING_WIZARD_INSTALLATION_IMPROVED_COPY (#team-growth)+ * control — original one-line tagline.+ * test — expanded copy: enumerates what the wizard does, where to run it,+ * and surfaces that PostHog covers LLM inference (no API key).*- * Hypothesis: users are more likely to try the wizard when they understand- * what it does, where to run it, and that it's free to run.- *- * Flag lookup is encapsulated here so WizardOnlyVariant stays agnostic of- * the experiment. When the experiment concludes, the winning variant- * replaces the dispatcher and this file collapses to a single component.+ * Flag lookup lives here so WizardInstallStep stays agnostic of the experiment.*/-export function WizardOnlyIntro(): JSX.Element {+export function WizardInstallIntro(): JSX.Element {const isImprovedCopy = useFeatureFlag('ONBOARDING_WIZARD_INSTALLATION_IMPROVED_COPY', 'test')return isImprovedCopy ? <ImprovedIntro /> : <ControlIntro />}@@ -37,7 +30,7 @@ function ControlIntro(): JSX.Element {function ImprovedIntro(): JSX.Element {return (<div className="text-center max-w-xl mx-auto space-y-3">- <h2 className="text-2xl font-bold">Let the AI wizard install PostHog for you</h2>+ <h2 className="text-2xl font-bold">Skip the install. Get 10–20 minutes back.</h2><p className="text-muted">Run this command from your project's root directory. The wizard detects your framework, installsthe right SDK, configures your environment variables, and wires up event capture automatically.diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/index.tsxnew file mode 100644index 000000000000..c37822f94c22--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx@@ -0,0 +1,167 @@+import { useActions, useValues } from 'kea'++import { LemonButton, LemonModal } from '@posthog/lemon-ui'++import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'++import { OnboardingStepKey, type SDK } from '~/types'++import { OnboardingStep } from '../../../OnboardingStep'+import { AdblockWarning, RealtimeCheckIndicator } from '../../RealtimeCheckIndicator'+import { SDKGrid } from '../SDKGrid'+import { SDKInstructionsModal } from '../SDKInstructionsModal'+import { VariantProps } from '../types'+import { WizardCommandBlock } from '../WizardCommandBlock'+import { wizardInstallStepLogic } from '../wizardInstallStepLogic'+import { WizardProgressTracker, useWizardTakeoverActive } from '../WizardProgressTracker'+import { WizardInstallIntro } from './WizardInstallIntro'++/**+ * Default install step for non-Logs onboarding flows. Wizard-centered: the SDK+ * grid lives behind a "Need to set up manually?" link.+ *+ * Owns its own SDKInstructionsModal because the manual-setup flow is nested —+ * picking an SDK in the manual modal closes it and opens the instructions+ * modal; closing the instructions modal reopens manual setup. The shared modal+ * in the parent OnboardingInstallStep is skipped here.+ *+ * Sync features (live wizard takeover banner, Continue-unblock on session) are+ * gated on `ONBOARDING_WIZARD_SYNC=test` so the kea logic and its SSE only+ * mount for the test arm.+ */+export function WizardInstallStep(props: VariantProps): JSX.Element {+ const isSyncEnabled = useFeatureFlag('ONBOARDING_WIZARD_SYNC', 'test')+ return isSyncEnabled ? <WizardInstallStepWithSync {...props} /> : <WizardInstallStepStatic {...props} />+}++function WizardInstallStepStatic(props: VariantProps): JSX.Element {+ const continueDisabledReason = props.installationComplete ? undefined : 'Installation is not complete'+ return (+ <WizardInstallShell+ continueDisabledReason={continueDisabledReason}+ showSkip={!props.installationComplete}+ props={props}+ >+ <WizardInstallIntro />+ <div className="max-w-xl mx-auto">+ <WizardCommandBlock />+ </div>+ </WizardInstallShell>+ )+}++function WizardInstallStepWithSync(props: VariantProps): JSX.Element {+ const isTakeoverActive = useWizardTakeoverActive()+ // Once the wizard is in flight, trust it — installation events aren't required+ // to unblock Continue.+ const continueDisabledReason =+ isTakeoverActive || props.installationComplete ? undefined : 'Installation is not complete'+ return (+ <WizardInstallShell+ continueDisabledReason={continueDisabledReason}+ showSkip={!props.installationComplete && !isTakeoverActive}+ props={props}+ >+ {isTakeoverActive ? (+ <WizardProgressTracker />+ ) : (+ <>+ <WizardInstallIntro />+ <div className="max-w-xl mx-auto">+ <WizardCommandBlock />+ </div>+ </>+ )}+ </WizardInstallShell>+ )+}++function WizardInstallShell({+ children,+ continueDisabledReason,+ showSkip,+ props,+}: {+ children: React.ReactNode+ continueDisabledReason: string | undefined+ showSkip: boolean+ props: VariantProps+}): JSX.Element {+ const { manualModalOpen, sdkInstructionsOpen } = useValues(wizardInstallStepLogic)+ const { setManualModalOpen, setSdkInstructionsOpen } = useActions(wizardInstallStepLogic)+ const {+ sdkGridProps,+ sdkInstructionMap,+ adblockResult,+ installationComplete,+ listeningForName,+ teamPropertyToVerify,+ selectedSDK,+ header,+ } = props++ const handleManualSDKClick = (sdk: SDK): void => {+ sdkGridProps.onSDKClick(sdk)+ setManualModalOpen(false)+ setSdkInstructionsOpen(true)+ }++ return (+ <OnboardingStep+ title="Install"+ stepKey={OnboardingStepKey.INSTALL}+ continueDisabledReason={continueDisabledReason}+ showSkip={showSkip}+ actions={+ <div className="pr-2">+ <RealtimeCheckIndicator+ teamPropertyToVerify={teamPropertyToVerify}+ listeningForName={listeningForName}+ />+ </div>+ }+ >+ {header}+ {!installationComplete && <AdblockWarning adblockResult={adblockResult} />}+ <div className="mt-6 space-y-8">+ {children}+ <div className="text-center">+ <LemonButton+ type="tertiary"+ size="small"+ data-attr="sdk-continue"+ onClick={() => setManualModalOpen(true)}+ >+ Need to set up manually?+ </LemonButton>+ </div>+ </div>++ <LemonModal+ isOpen={manualModalOpen}+ onClose={() => setManualModalOpen(false)}+ title="Manual SDK setup"+ width="80vw"+ >+ <div className="p-4">+ <SDKGrid {...{ ...sdkGridProps, onSDKClick: handleManualSDKClick }} showTopControls />+ </div>+ </LemonModal>++ {selectedSDK && (+ <SDKInstructionsModal+ isOpen={sdkInstructionsOpen && !manualModalOpen}+ onClose={() => {+ setSdkInstructionsOpen(false)+ setManualModalOpen(true)+ }}+ sdk={selectedSDK}+ sdkInstructionMap={sdkInstructionMap}+ adblockResult={adblockResult}+ verifyingProperty={teamPropertyToVerify}+ verifyingName={listeningForName}+ />+ )}+ </OnboardingStep>+ )+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/ExpandedDetails.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/ExpandedDetails.tsxnew file mode 100644index 000000000000..2fc47ca848bb--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/ExpandedDetails.tsx@@ -0,0 +1,39 @@+import { Spinner } from 'lib/lemon-ui/Spinner'++import { TaskRow } from './TaskRow'++/**+ * Drops below the FAB header when the user expands the card. Surfaces a short+ * explainer plus the live task list with per-task elapsed time and simulated+ * progress bars.+ */+export function ExpandedDetails({+ tasks,+ taskStartedAt,+ now,+}: {+ tasks: Array<{ id: string; title: string; status: string }>+ taskStartedAt: Record<string, number>+ now: number+}): JSX.Element {+ return (+ <div className="border-t border-border px-3 py-3 space-y-3">+ <div className="text-xs text-muted">+ Close the tab or keep exploring — the wizard runs in the background and leaves a report when it's+ done.+ </div>+ {tasks.length === 0 ? (+ <div className="text-xs text-muted flex items-center gap-2">+ <Spinner textColored speed="0.9s" />+ <span>Analyzing your project…</span>+ </div>+ ) : (+ <ul className="m-0 p-0 list-none space-y-1.5">+ {tasks.map((task) => (+ <TaskRow key={task.id} task={task} startedAtMs={taskStartedAt[task.id]} nowMs={now} />+ ))}+ </ul>+ )}+ </div>+ )+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/ProgressRing.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/ProgressRing.tsxnew file mode 100644index 000000000000..766d1ebdba36--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/ProgressRing.tsx@@ -0,0 +1,111 @@+import { type DisplayState } from '../wizardProgressTrackerLogic'+import { ringToneClass } from './helpers'++const RING_SIZE = 44+const RING_STROKE = 4+const RING_RADIUS = (RING_SIZE - RING_STROKE) / 2+const RING_CIRCUMFERENCE = 2 * Math.PI * RING_RADIUS++/**+ * Circular progress dial for the FAB header. Renders an indeterminate spin+ * while connecting or before any tasks arrive, otherwise fills clockwise from+ * 12 o'clock. The center glyph (`%`, `✓`, `✗`, blank) is delegated to+ * {@link RingCenter}.+ */+export function ProgressRing({+ progress,+ state,+ hasTasks,+}: {+ progress: number+ state: DisplayState+ hasTasks: boolean+}): JSX.Element {+ const isIndeterminate = state === 'connecting' || (state === 'running' && !hasTasks)+ const dashOffset = RING_CIRCUMFERENCE * (1 - progress / 100)+ const toneClass = ringToneClass(state)++ return (+ <div className="wizard-fab-ring relative shrink-0 flex items-center justify-center">+ <svg width={RING_SIZE} height={RING_SIZE} viewBox={`0 0 ${RING_SIZE} ${RING_SIZE}`}>+ <circle+ cx={RING_SIZE / 2}+ cy={RING_SIZE / 2}+ r={RING_RADIUS}+ fill="none"+ stroke="currentColor"+ className="text-border"+ strokeWidth={RING_STROKE}+ />+ {isIndeterminate ? (+ <g className="wizard-fab-ring-spin">+ <circle+ cx={RING_SIZE / 2}+ cy={RING_SIZE / 2}+ r={RING_RADIUS}+ fill="none"+ stroke="currentColor"+ className={toneClass}+ strokeWidth={RING_STROKE}+ strokeLinecap="round"+ strokeDasharray={`${RING_CIRCUMFERENCE * 0.25} ${RING_CIRCUMFERENCE}`}+ transform={`rotate(-90 ${RING_SIZE / 2} ${RING_SIZE / 2})`}+ />+ </g>+ ) : (+ <circle+ cx={RING_SIZE / 2}+ cy={RING_SIZE / 2}+ r={RING_RADIUS}+ fill="none"+ stroke="currentColor"+ className={`wizard-fab-ring-progress ${toneClass}`}+ strokeWidth={RING_STROKE}+ strokeLinecap="round"+ strokeDasharray={RING_CIRCUMFERENCE}+ strokeDashoffset={dashOffset}+ transform={`rotate(-90 ${RING_SIZE / 2} ${RING_SIZE / 2})`}+ />+ )}+ </svg>+ <span className="absolute inset-0 flex items-center justify-center text-[11px] font-semibold tabular-nums">+ <RingCenter state={state} progress={progress} hasTasks={hasTasks} toneClass={toneClass} />+ </span>+ </div>+ )+}++/**+ * Center glyph for the {@link ProgressRing}. Private to this file because it+ * only makes sense in conjunction with the ring's color + state semantics.+ */+function RingCenter({+ state,+ progress,+ hasTasks,+ toneClass,+}: {+ state: DisplayState+ progress: number+ hasTasks: boolean+ toneClass: string+}): JSX.Element {+ if (state === 'completed') {+ return (+ <span className={toneClass} aria-hidden>+ ✓+ </span>+ )+ }+ if (state === 'error') {+ return (+ <span className={toneClass} aria-hidden>+ ✗+ </span>+ )+ }+ if (state === 'connecting' || !hasTasks) {+ return <span aria-hidden />+ }+ return <span className={toneClass}>{`${progress}%`}</span>+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/TaskRow.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/TaskRow.tsxnew file mode 100644index 000000000000..055a5dfdecbc--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/TaskRow.tsx@@ -0,0 +1,54 @@+import { simulatedTaskFraction } from './helpers'+import { TaskStatusIcon } from './TaskStatusIcon'++/**+ * Single row in the FAB's expanded task list — status icon + title + per-task+ * elapsed seconds and a simulated progress bar for `in_progress` rows.+ *+ * The progress bar uses {@link simulatedTaskFraction} so it's always moving+ * between backend updates without ever claiming "done" on its own.+ */+export function TaskRow({+ task,+ startedAtMs,+ nowMs,+}: {+ task: { id: string; title: string; status: string }+ startedAtMs: number | undefined+ nowMs: number+}): JSX.Element {+ const isActive = task.status === 'in_progress'+ const elapsedS = isActive && startedAtMs ? Math.max(0, Math.floor((nowMs - startedAtMs) / 1000)) : null+ const titleClass =+ task.status === 'completed' || task.status === 'canceled'+ ? 'line-through text-muted'+ : task.status === 'failed'+ ? 'text-brand-red'+ : 'text-default'++ const simPct = isActive ? Math.round(simulatedTaskFraction(startedAtMs, nowMs) * 100) : 0++ return (+ <li className="flex items-start gap-2 text-xs">+ <span className="mt-0.5">+ <TaskStatusIcon status={task.status} />+ </span>+ <div className="flex-1 min-w-0">+ <div className="flex items-center gap-2">+ <span className={`flex-1 min-w-0 truncate ${titleClass}`}>{task.title}</span>+ {elapsedS !== null ? (+ <span className="text-[10px] text-muted tabular-nums shrink-0">{elapsedS}s</span>+ ) : null}+ </div>+ {isActive ? (+ <div className="h-0.5 bg-bg-3000 mt-1 relative overflow-hidden rounded-full">+ <div+ className="absolute inset-y-0 left-0 bg-brand-red transition-[width] duration-1000 ease-out"+ style={{ width: `${simPct}%` }}+ />+ </div>+ ) : null}+ </div>+ </li>+ )+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/TaskStatusIcon.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/TaskStatusIcon.tsxnew file mode 100644index 000000000000..ec64a6a6eccf--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/TaskStatusIcon.tsx@@ -0,0 +1,19 @@+import { Spinner } from 'lib/lemon-ui/Spinner'++/**+ * Tiny status glyph used in the FAB's expanded task list. The in-progress case+ * gets the live Lemon Spinner; terminal statuses use Unicode symbols sized to+ * the same 14px column.+ */+export function TaskStatusIcon({ status }: { status: string }): JSX.Element {+ if (status === 'in_progress') {+ return (+ <span className="inline-flex items-center justify-center w-3.5 shrink-0 text-brand-red">+ <Spinner textColored speed="0.9s" />+ </span>+ )+ }+ const symbol = status === 'completed' ? '✓' : status === 'failed' ? '✗' : status === 'canceled' ? '⊘' : '☐'+ const color = status === 'completed' ? 'text-success' : status === 'failed' ? 'text-brand-red' : 'text-muted'+ return <span className={`inline-block w-3.5 text-center shrink-0 ${color}`}>{symbol}</span>+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/WizardProgressFab.scss b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/WizardProgressFab.scssnew file mode 100644index 000000000000..804c5d1f34e0--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/WizardProgressFab.scss@@ -0,0 +1,61 @@+.wizard-fab-ring {+ width: 44px;+ height: 44px;+}++.wizard-fab-ring-progress {+ transition: stroke-dashoffset 600ms ease-out;+}++@keyframes WizardFab__slideIn {+ from {+ opacity: 0;+ transform: translateY(12px);+ }++ to {+ opacity: 1;+ transform: translateY(0);+ }+}++.wizard-fab-slide-in {+ animation: WizardFab__slideIn 320ms ease-out both;+}++@keyframes WizardFab__ringSpin {+ to {+ transform: rotate(360deg);+ }+}++.wizard-fab-ring-spin {+ transform-box: fill-box;+ transform-origin: 50%;+ animation: WizardFab__ringSpin 1.2s linear infinite;+}++@keyframes WizardFab__sparkle {+ 0%,+ 60%,+ 100% {+ opacity: 1;+ transform: scale(1) rotate(0deg);+ }++ 70% {+ opacity: 0.4;+ transform: scale(0.85) rotate(-8deg);+ }++ 85% {+ opacity: 1;+ transform: scale(1.1) rotate(8deg);+ }+}++.wizard-fab-sparkle {+ color: #b285ff;+ transform-origin: center;+ animation: WizardFab__sparkle 3.4s ease-in-out infinite;+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/WizardProgressFab.stories.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/WizardProgressFab.stories.tsxnew file mode 100644index 000000000000..e67bfd31e3ba--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/WizardProgressFab.stories.tsx@@ -0,0 +1,339 @@+import { Meta, StoryFn } from '@storybook/react'+import { useMountedLogic } from 'kea'+import { useEffect, useRef } from 'react'++import { FEATURE_FLAGS } from 'lib/constants'++import { wizardSessionStreamLogic } from 'products/wizard/frontend/wizardSessionStreamLogic'++import { WizardProgressFab } from '.'+import { WIZARD_SKILL_IDS } from '../../skillBadge'+import { wizardProgressTrackerLogic } from '../wizardProgressTrackerLogic'++const WORKFLOW_ID = 'posthog-integration'+const DEFAULT_SKILL_ID = 'laravel'++const SKILL_OPTIONS: string[] = [...WIZARD_SKILL_IDS, 'unknown-skill']++interface StoryArgs {+ skillId: string+}++if (typeof window !== 'undefined' && !(window as any).__wizardEventSourceStubbed) {+ class StubEventSource {+ readyState = 0+ url = ''+ withCredentials = false+ onopen: ((ev: Event) => void) | null = null+ onmessage: ((ev: MessageEvent) => void) | null = null+ onerror: ((ev: Event) => void) | null = null+ addEventListener(): void {}+ removeEventListener(): void {}+ dispatchEvent(): boolean {+ return false+ }+ close(): void {}+ static readonly CONNECTING = 0+ static readonly OPEN = 1+ static readonly CLOSED = 2+ }+ ;(window as any).EventSource = StubEventSource+ ;(window as any).__wizardEventSourceStubbed = true+}++type TaskStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'canceled'++type WizardSessionFixture = {+ session_id: string+ team_id: number+ workflow_id: string+ skill_id: string+ started_at: string+ run_phase: 'idle' | 'running' | 'completed' | 'error'+ tasks: Array<{+ id: string+ title: string+ status: TaskStatus+ }>+ event_plan: unknown | null+ error: { type: string; message: string } | null+ created_at: string+ updated_at: string+}++const SAMPLE_TASKS = [+ { id: '1', title: 'Install posthog-node package' },+ { id: '2', title: 'Set up PostHog environment variables' },+ { id: '3', title: 'Create PostHog client module' },+ { id: '4', title: 'Insert event tracking in API handlers' },+ { id: '5', title: 'Wrapping up' },+] as const++function buildTasks(statuses: TaskStatus[]): WizardSessionFixture['tasks'] {+ return SAMPLE_TASKS.map((t, i) => ({ ...t, status: statuses[i] ?? 'pending' }))+}++function makeSession(overrides: Partial<WizardSessionFixture> = {}): WizardSessionFixture {+ const skill_id = overrides.skill_id ?? DEFAULT_SKILL_ID+ const startedAt = new Date(Date.now() - 74_000).toISOString()+ return {+ session_id: `${WORKFLOW_ID}-${skill_id}-${startedAt}`,+ team_id: 1,+ workflow_id: WORKFLOW_ID,+ skill_id,+ started_at: startedAt,+ run_phase: 'running',+ tasks: [],+ event_plan: null,+ error: null,+ created_at: startedAt,+ updated_at: new Date().toISOString(),+ ...overrides,+ }+}++function withSession(buildSession: (skillId: string) => WizardSessionFixture | null): StoryFn<StoryArgs> {+ return function StoryRender({ skillId }) {+ useMountedLogic(wizardProgressTrackerLogic)+ const streamLogic = wizardSessionStreamLogic({ workflowId: WORKFLOW_ID })+ useMountedLogic(streamLogic)++ useEffect(() => {+ streamLogic.actions.connectionOpened()+ const session = buildSession(skillId)+ if (session) {+ streamLogic.actions.sessionUpdated(session as any)+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [skillId])++ return (+ <SceneFrame>+ <WizardProgressFab />+ </SceneFrame>+ )+ }+}++const meta: Meta<StoryArgs> = {+ title: 'Scenes-Other/Onboarding/Wizard Progress FAB',+ parameters: {+ layout: 'fullscreen',+ viewMode: 'story',+ // FAB is flag-gated; storybook's useFeatureFlag treats any truthy value as "on".+ featureFlags: [FEATURE_FLAGS.ONBOARDING_WIZARD_SYNC],+ },+ args: { skillId: DEFAULT_SKILL_ID },+ argTypes: {+ skillId: {+ control: { type: 'select' },+ options: SKILL_OPTIONS,+ description: 'Wizard skill_id — drives the session_id and any badge surface.',+ },+ },+}+export default meta++function SceneFrame({ children }: { children: React.ReactNode }): JSX.Element {+ return (+ <div className="min-h-screen bg-bg-light text-default px-6 py-10 relative">+ <div className="max-w-4xl mx-auto">+ <h1 className="text-2xl font-bold mb-1">Onboarding (some later step)</h1>+ <p className="text-muted mb-8">+ The user has navigated away from the wizard install step. The FAB persists across the rest of the+ onboarding flow until the run finishes — click it to jump back to the install step.+ </p>+ </div>+ {children}+ </div>+ )+}++/** No session — FAB renders nothing. */+export const Hidden: StoryFn<StoryArgs> = withSession(() => null)++/**+ * Live session in flight, but the user is on the install step — the inline confirmation+ * card has set `panelMounted: true`, so the FAB suppresses itself. Documents the+ * "card and FAB never overlap" contract.+ */+export const HiddenByPanel: StoryFn<StoryArgs> = function HiddenByPanelStory({ skillId }) {+ useMountedLogic(wizardProgressTrackerLogic)+ const streamLogic = wizardSessionStreamLogic({ workflowId: WORKFLOW_ID })+ useMountedLogic(streamLogic)++ useEffect(() => {+ streamLogic.actions.connectionOpened()+ streamLogic.actions.sessionUpdated(+ makeSession({+ skill_id: skillId,+ run_phase: 'running',+ tasks: buildTasks(['completed', 'in_progress', 'pending', 'pending', 'pending']),+ }) as any+ )+ wizardProgressTrackerLogic.actions.setPanelMounted(true)+ return () => wizardProgressTrackerLogic.actions.setPanelMounted(false)+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [skillId])++ return (+ <SceneFrame>+ <p className="max-w-4xl mx-auto text-sm text-muted italic">+ Imagine the install step is rendered here — the confirmation card has flagged itself mounted, so the FAB+ stays out of the way. You should see nothing in the corner below.+ </p>+ </SceneFrame>+ )+}++/** Wizard just kicked off, no tasks yet — ring spins (indeterminate). */+export const Analyzing: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({+ skill_id: skillId,+ run_phase: 'running',+ tasks: [],+ })+)++/** Mid-run, ~40% done with a task currently running. */+export const RunningEarly: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({+ skill_id: skillId,+ run_phase: 'running',+ tasks: buildTasks(['completed', 'completed', 'in_progress', 'pending', 'pending']),+ })+)++/** Late mid-run, ~80% done. Demonstrates the ring filling. */+export const RunningLate: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({+ skill_id: skillId,+ run_phase: 'running',+ tasks: buildTasks(['completed', 'completed', 'completed', 'completed', 'in_progress']),+ })+)++/** Reconnecting state: live session mid-run, but the SSE transport just errored. */+export const Connecting: StoryFn<StoryArgs> = function ConnectingStory({ skillId }) {+ useMountedLogic(wizardProgressTrackerLogic)+ const streamLogic = wizardSessionStreamLogic({ workflowId: WORKFLOW_ID })+ useMountedLogic(streamLogic)++ useEffect(() => {+ streamLogic.actions.connectionOpened()+ streamLogic.actions.sessionUpdated(+ makeSession({+ skill_id: skillId,+ run_phase: 'running',+ tasks: buildTasks(['completed', 'in_progress', 'pending', 'pending', 'pending']),+ }) as any+ )+ const id = window.setTimeout(() => {+ streamLogic.actions.connectionErrored('EventSource transport error — reconnecting')+ }, 50)+ return () => window.clearTimeout(id)+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [skillId])++ return (+ <SceneFrame>+ <WizardProgressFab />+ </SceneFrame>+ )+}++/** Wizard finished cleanly; green ring + ✓ + dismiss available. */+export const Completed: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({+ skill_id: skillId,+ run_phase: 'completed',+ tasks: buildTasks(['completed', 'completed', 'completed', 'completed', 'completed']),+ })+)++/** Wizard errored; red ring + ✗ + dismiss available. */+export const Errored: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({+ skill_id: skillId,+ run_phase: 'error',+ tasks: buildTasks(['completed', 'completed', 'failed', 'canceled', 'canceled']),+ error: { type: 'TimeoutError', message: 'Anthropic API timed out' },+ })+)++/**+ * Auto-playing run that mirrors the real-world timeline. Watch the ring fill, the+ * shimmer rainbow underneath, and the sub-line update with each task transition.+ *+ * t=0s session opens (Analyzing — indeterminate ring spin)+ * t=4s task 1 in_progress+ * t=8s task 1 ✓, task 2 in_progress+ * t=12s task 2 ✓, task 3 in_progress+ * t=16s task 3 ✓, task 4 in_progress+ * t=20s task 4 ✓, task 5 in_progress+ * t=24s task 5 ✓, run_phase = completed (green ring + dismiss visible)+ */+export const SimulatedRun: StoryFn<StoryArgs> = function SimulatedRunStory({ skillId }) {+ useMountedLogic(wizardProgressTrackerLogic)+ const streamLogic = wizardSessionStreamLogic({ workflowId: WORKFLOW_ID })+ useMountedLogic(streamLogic)++ const timersRef = useRef<number[]>([])++ useEffect(() => {+ const { actions } = streamLogic+ const startedAt = new Date().toISOString()+ const base: WizardSessionFixture = {+ session_id: `${WORKFLOW_ID}-${skillId}-${startedAt}`,+ team_id: 1,+ workflow_id: WORKFLOW_ID,+ skill_id: skillId,+ started_at: startedAt,+ run_phase: 'running',+ tasks: [],+ event_plan: null,+ error: null,+ created_at: startedAt,+ updated_at: startedAt,+ }++ actions.connectionOpened()+ actions.sessionUpdated(base as any)++ const schedule: Array<{ atMs: number; tasks: TaskStatus[]; phase?: 'running' | 'completed' }> = [+ { atMs: 4_000, tasks: ['in_progress', 'pending', 'pending', 'pending', 'pending'] },+ { atMs: 8_000, tasks: ['completed', 'in_progress', 'pending', 'pending', 'pending'] },+ { atMs: 12_000, tasks: ['completed', 'completed', 'in_progress', 'pending', 'pending'] },+ { atMs: 16_000, tasks: ['completed', 'completed', 'completed', 'in_progress', 'pending'] },+ { atMs: 20_000, tasks: ['completed', 'completed', 'completed', 'completed', 'in_progress'] },+ {+ atMs: 24_000,+ tasks: ['completed', 'completed', 'completed', 'completed', 'completed'],+ phase: 'completed',+ },+ ]++ timersRef.current = schedule.map(({ atMs, tasks, phase }) =>+ window.setTimeout(() => {+ actions.sessionUpdated({+ ...base,+ run_phase: phase ?? 'running',+ tasks: buildTasks(tasks),+ updated_at: new Date().toISOString(),+ } as any)+ }, atMs)+ )++ return () => {+ timersRef.current.forEach((id) => window.clearTimeout(id))+ timersRef.current = []+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [skillId])++ return (+ <SceneFrame>+ <WizardProgressFab />+ </SceneFrame>+ )+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/helpers.ts b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/helpers.tsnew file mode 100644index 000000000000..6645a65b94ae--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/helpers.ts@@ -0,0 +1,70 @@+import { type DisplayState } from '../wizardProgressTrackerLogic'++// Characteristic time for the simulated per-task progress curve. The fraction+// asymptotically approaches 0.95 — fast initial fill, then slowing down so it+// never claims "done" until the backend confirms. 45s is close to a typical+// wizard task duration while still moving visibly on short tasks.+export const SIMULATED_TASK_DECAY_SECONDS = 45+export const SIMULATED_TASK_CAP = 0.95++/**+ * 0 → 0.95 asymptotic curve from a task's observed start time. Used to keep the+ * ring and per-task bars moving while a task is in flight, without any backend+ * micro-progress signal. The call site upgrades to 1.0 only once the task+ * transitions to `completed`.+ */+export function simulatedTaskFraction(startedAtMs: number | undefined, nowMs: number): number {+ if (!startedAtMs) {+ return 0+ }+ const elapsedSeconds = Math.max(0, (nowMs - startedAtMs) / 1000)+ return Math.min(SIMULATED_TASK_CAP, 1 - Math.exp(-elapsedSeconds / SIMULATED_TASK_DECAY_SECONDS))+}++export function headlineFor(state: DisplayState): string {+ switch (state) {+ case 'completed':+ return 'PostHog is set up'+ case 'error':+ return 'Wizard hit a snag'+ case 'connecting':+ return 'Reconnecting…'+ default:+ return 'PostHog is being installed'+ }+}++export function subLineFor(state: DisplayState, currentTask: string | undefined, elapsedSeconds: number): string {+ if (state === 'completed') {+ return 'tap to see what was set up'+ }+ if (state === 'error') {+ return ''+ }+ if (state === 'connecting') {+ return 'restoring connection to the wizard'+ }+ const elapsed = formatElapsed(elapsedSeconds)+ if (currentTask) {+ return `${currentTask} · ${elapsed}`+ }+ return 'analyzing your project...'+}++/**+ * Tailwind text-color class for the ring's accent. The ring uses+ * `stroke="currentColor"` on its SVG circles + the center glyph, so the whole+ * widget picks up its tone from a single class on the wrapping element.+ */+export function ringToneClass(state: DisplayState): string {+ if (state === 'completed') {+ return 'text-success'+ }+ return 'text-brand-red'+}++export function formatElapsed(seconds: number): string {+ const m = Math.floor(seconds / 60)+ const s = seconds % 60+ return `${m}:${s.toString().padStart(2, '0')}`+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/index.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/index.tsxnew file mode 100644index 000000000000..a062057641e3--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressFab/index.tsx@@ -0,0 +1,113 @@+import './WizardProgressFab.scss'++import { useActions, useValues } from 'kea'+import { useState } from 'react'++import { IconChevronDown, IconX } from '@posthog/icons'++import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'++import { wizardProgressTrackerLogic } from '../wizardProgressTrackerLogic'+import { ExpandedDetails } from './ExpandedDetails'+import { headlineFor, simulatedTaskFraction, subLineFor } from './helpers'+import { ProgressRing } from './ProgressRing'++export function WizardProgressFab(): JSX.Element | null {+ const isSyncEnabled = useFeatureFlag('ONBOARDING_WIZARD_SYNC', 'test')+ if (!isSyncEnabled) {+ return null+ }+ return <WizardProgressFabInner />+}++function WizardProgressFabInner(): JSX.Element | null {+ const {+ displayState,+ latestSession,+ elapsedSeconds,+ dismissed,+ panelMounted,+ sessionIsCurrent,+ taskStartedAt,+ now,+ } = useValues(wizardProgressTrackerLogic)+ const { dismiss } = useActions(wizardProgressTrackerLogic)++ const [expanded, setExpanded] = useState(false)++ if (dismissed || panelMounted || displayState === 'preTakeover' || !sessionIsCurrent) {+ return null+ }+ const tasks = latestSession?.tasks ?? []+ const totalCount = tasks.length+ const completedCount = tasks.filter((t) => t.status === 'completed').length+ const inProgressTask = tasks.find((t) => t.status === 'in_progress')+ const currentTask = inProgressTask?.title+ // Ring fill = real completed count plus a simulated fraction of the in-progress+ // task, so the ring keeps moving between backend updates.+ const inProgressFraction = inProgressTask ? simulatedTaskFraction(taskStartedAt[inProgressTask.id], now) : 0+ const progressPct = totalCount > 0 ? Math.round(((completedCount + inProgressFraction) / totalCount) * 100) : 0++ const isTerminal = displayState === 'completed' || displayState === 'error'++ return (+ <div className="fixed bottom-5 right-5 z-[60] wizard-fab-slide-in">+ <div+ role="status"+ aria-live="polite"+ className="relative w-[300px] bg-bg-light rounded-xl shadow-xl shadow-black/15 border border-border overflow-hidden"+ >+ <button+ type="button"+ onClick={() => setExpanded((v) => !v)}+ className="w-full text-left flex items-center gap-3 px-3 py-3 hover:bg-bg-3000 transition-colors cursor-pointer"+ aria-label={expanded ? 'Collapse wizard details' : 'Expand wizard details'}+ aria-expanded={expanded}+ >+ <ProgressRing+ progress={displayState === 'completed' ? 100 : progressPct}+ state={displayState}+ hasTasks={totalCount > 0}+ />+ <div className="flex-1 min-w-0 leading-tight">+ <div className="flex items-center gap-1.5 text-xs uppercase tracking-wider text-muted font-semibold">+ <span>Setup wizard</span>+ </div>+ <div className="text-sm font-semibold text-default truncate mt-0.5">+ {headlineFor(displayState)}+ </div>+ <div className="text-xs text-muted truncate mt-0.5 tabular-nums">+ {subLineFor(displayState, currentTask, elapsedSeconds)}+ </div>+ </div>+ <IconChevronDown+ className={`text-base text-muted shrink-0 transition-transform duration-200 ${+ expanded ? 'rotate-180' : ''+ }`}+ aria-hidden+ />+ </button>+ {isTerminal ? (+ <button+ type="button"+ onClick={(e) => {+ e.stopPropagation()+ dismiss()+ }}+ aria-label="Dismiss"+ className="absolute top-1.5 right-1.5 p-1 rounded-md text-muted hover:text-default hover:bg-bg-3000 transition-colors z-10"+ >+ <IconX className="text-base" />+ </button>+ ) : null}+ {expanded && (+ <div className="grid grid-rows-[1fr]">+ <div className="overflow-hidden">+ <ExpandedDetails tasks={tasks} taskStartedAt={taskStartedAt} now={now} />+ </div>+ </div>+ )}+ </div>+ </div>+ )+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/WizardProgressTracker.stories.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/WizardProgressTracker.stories.tsxnew file mode 100644index 000000000000..77cd13e5e755--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/WizardProgressTracker.stories.tsx@@ -0,0 +1,337 @@+import { Meta, StoryFn } from '@storybook/react'+import { useMountedLogic } from 'kea'+import { useEffect } from 'react'++import { IconArrowRight, IconCheckCircle } from '@posthog/icons'+import { LemonButton } from '@posthog/lemon-ui'++import { Logomark } from 'lib/brand/Logomark'++import { wizardSessionStreamLogic } from 'products/wizard/frontend/wizardSessionStreamLogic'++import { WizardProgressTracker } from '.'+import { WIZARD_SKILL_IDS } from '../../skillBadge'+import { wizardProgressTrackerLogic } from '../wizardProgressTrackerLogic'++const WORKFLOW_ID = 'posthog-integration'+const DEFAULT_SKILL_ID = 'laravel'++/** Every framework the wizard CLI ships, plus a sentinel for the unknown-skill fallback. */+const SKILL_OPTIONS: string[] = [...WIZARD_SKILL_IDS, 'unknown-skill']++interface StoryArgs {+ skillId: string+}++/**+ * Run phase override for the full-scene story. `connecting` is a derived UI+ * state (session is `running` + transport errored) — the rest map 1:1 to the+ * session's `run_phase` field.+ */+type RunPhaseArg = 'running' | 'connecting' | 'completed' | 'error'+const RUN_PHASE_OPTIONS: RunPhaseArg[] = ['running', 'connecting', 'completed', 'error']++interface FullSceneArgs extends StoryArgs {+ runPhase: RunPhaseArg+}++if (typeof window !== 'undefined' && !(window as any).__wizardEventSourceStubbed) {+ class StubEventSource {+ readyState = 0+ url = ''+ withCredentials = false+ onopen: ((ev: Event) => void) | null = null+ onmessage: ((ev: MessageEvent) => void) | null = null+ onerror: ((ev: Event) => void) | null = null+ addEventListener(): void {}+ removeEventListener(): void {}+ dispatchEvent(): boolean {+ return false+ }+ close(): void {}+ static readonly CONNECTING = 0+ static readonly OPEN = 1+ static readonly CLOSED = 2+ }+ ;(window as any).EventSource = StubEventSource+ ;(window as any).__wizardEventSourceStubbed = true+}++type WizardSessionFixture = {+ session_id: string+ team_id: number+ workflow_id: string+ skill_id: string+ started_at: string+ run_phase: 'idle' | 'running' | 'completed' | 'error'+ tasks: Array<{+ id: string+ title: string+ status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'canceled'+ }>+ event_plan: unknown | null+ error: { type: string; message: string } | null+ created_at: string+ updated_at: string+}++function makeSession(overrides: Partial<WizardSessionFixture> = {}): WizardSessionFixture {+ const skill_id = overrides.skill_id ?? DEFAULT_SKILL_ID+ const startedAt = new Date(Date.now() - 30_000).toISOString()+ return {+ session_id: `${WORKFLOW_ID}-${skill_id}-${startedAt}`,+ team_id: 1,+ workflow_id: WORKFLOW_ID,+ skill_id,+ started_at: startedAt,+ run_phase: 'running',+ tasks: [],+ event_plan: null,+ error: null,+ created_at: startedAt,+ updated_at: new Date().toISOString(),+ ...overrides,+ }+}++function withSession(buildSession: (skillId: string) => WizardSessionFixture | null): StoryFn<StoryArgs> {+ return function StoryRender({ skillId }) {+ useMountedLogic(wizardProgressTrackerLogic)+ const streamLogic = wizardSessionStreamLogic({ workflowId: WORKFLOW_ID })+ useMountedLogic(streamLogic)++ useEffect(() => {+ streamLogic.actions.connectionOpened()+ const session = buildSession(skillId)+ if (session) {+ streamLogic.actions.sessionUpdated(session as any)+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [skillId])++ return (+ <SceneFrame>+ <WizardProgressTracker />+ </SceneFrame>+ )+ }+}++const meta: Meta<StoryArgs> = {+ title: 'Scenes-Other/Onboarding/Wizard Progress Tracker',+ parameters: {+ layout: 'fullscreen',+ viewMode: 'story',+ },+ args: { skillId: DEFAULT_SKILL_ID },+ argTypes: {+ skillId: {+ control: { type: 'select' },+ options: SKILL_OPTIONS,+ description: 'Wizard skill_id — drives the badge logo + display name.',+ },+ },+}+export default meta++function SceneFrame({ children }: { children: React.ReactNode }): JSX.Element {+ return (+ <div className="min-h-screen bg-bg-light text-default px-6 py-10">+ <div className="max-w-4xl mx-auto">+ <h1 className="text-2xl font-bold mb-1">Install</h1>+ <p className="text-muted mb-8">+ Once the wizard session is observed, this confirmation card replaces the install command block. The+ live progress lives in the floating FAB.+ </p>+ <div className="max-w-2xl mx-auto">{children}</div>+ </div>+ </div>+ )+}++/** No session yet — tracker renders nothing (parent shows the command block). */+export const PreTakeover: StoryFn<StoryArgs> = withSession(() => null)++/** Live session in flight — AI-toned confirmation with the skill badge. */+export const Running: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({ skill_id: skillId, run_phase: 'running' })+)++/** Connection blip while running — same card, sub-line shifts to "restoring connection". */+export const Reconnecting: StoryFn<StoryArgs> = function ReconnectingStory({ skillId }) {+ useMountedLogic(wizardProgressTrackerLogic)+ const streamLogic = wizardSessionStreamLogic({ workflowId: WORKFLOW_ID })+ useMountedLogic(streamLogic)++ useEffect(() => {+ streamLogic.actions.connectionOpened()+ streamLogic.actions.sessionUpdated(+ makeSession({+ skill_id: skillId,+ run_phase: 'running',+ }) as any+ )+ const id = window.setTimeout(() => {+ streamLogic.actions.connectionErrored('EventSource transport error')+ }, 50)+ return () => window.clearTimeout(id)+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [skillId])++ return (+ <SceneFrame>+ <WizardProgressTracker />+ </SceneFrame>+ )+}++/** Run finished cleanly — success card pointing the user at the Continue button. */+export const Completed: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({ skill_id: skillId, run_phase: 'completed' })+)++/** Run hit an error — error card with type + message + manual-setup fallback. */+export const Errored: StoryFn<StoryArgs> = withSession((skillId) =>+ makeSession({+ skill_id: skillId,+ run_phase: 'error',+ error: {+ type: 'CompositionError',+ message: 'Could not detect a writable .env file. Re-run from the project root and try again.',+ },+ })+)++/**+ * Full install-step scene with the wizard in error state. Mirrors what the user+ * actually sees in production: PostHog nav at the top, "Install" page title with+ * installation-complete + feature-flag indicators in the actions slot, the error+ * confirmation card, the manual-setup escape hatch, and the Next CTA.+ *+ * Useful for design review — shows the card sized and balanced inside the real+ * install-step chrome rather than floating on a bare page.+ */+export const FullInstallStepWithError: StoryFn<FullSceneArgs> = function FullInstallStepWithErrorStory({+ skillId,+ runPhase,+}) {+ useMountedLogic(wizardProgressTrackerLogic)+ const streamLogic = wizardSessionStreamLogic({ workflowId: WORKFLOW_ID })+ useMountedLogic(streamLogic)++ useEffect(() => {+ streamLogic.actions.connectionOpened()+ // `connecting` is a derived state — the session stays `running` and we drop the+ // transport on the floor to flip the displayState selector.+ const sessionRunPhase = runPhase === 'connecting' ? 'running' : runPhase+ streamLogic.actions.sessionUpdated(+ makeSession({+ skill_id: skillId,+ run_phase: sessionRunPhase,+ error:+ runPhase === 'error'+ ? {+ type: 'wizard_error',+ message:+ 'Could not access the setup resource. This may indicate a version mismatch or a temporary service issue. Please try again, or check the documentation: https://posthog.com/docs/libraries/node',+ }+ : null,+ }) as any+ )+ if (runPhase === 'connecting') {+ const id = window.setTimeout(() => {+ streamLogic.actions.connectionErrored('EventSource transport error — reconnecting')+ }, 50)+ return () => window.clearTimeout(id)+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [skillId, runPhase])++ return (+ <FullInstallSceneFrame+ stepIndicator={+ <span className="inline-flex items-center gap-1.5 text-success font-semibold">+ <IconCheckCircle className="text-lg" />+ <span>Installation complete</span>+ </span>+ }+ secondaryIndicator={+ <div className="px-3 py-1.5 rounded border border-border inline-flex items-center gap-2 text-xs">+ <span className="w-2 h-2 rounded-full bg-success" aria-hidden />+ <span className="font-semibold">Feature flag called</span>+ <span className="text-muted">a few seconds ago</span>+ </div>+ }+ >+ <WizardProgressTracker />+ <div className="mt-6 text-sm">Need to set up manually?</div>+ <div className="mt-12 flex justify-end">+ <LemonButton+ type="primary"+ size="medium"+ sideIcon={<IconArrowRight />}+ onClick={() => alert('Advance to the next onboarding step')}+ >+ Next+ </LemonButton>+ </div>+ </FullInstallSceneFrame>+ )+}+FullInstallStepWithError.args = { skillId: 'javascript-node', runPhase: 'error' }+FullInstallStepWithError.argTypes = {+ runPhase: {+ control: { type: 'select' },+ options: RUN_PHASE_OPTIONS,+ description: 'Wizard phase — drives the banner type (ai / success / error) and copy.',+ },+}++/**+ * Faux install-step chrome — nav bar, page title, status indicators, content slot.+ * Not pixel-perfect; just enough scaffolding to evaluate the card's position and+ * rhythm against the rest of the page.+ */+function FullInstallSceneFrame({+ children,+ stepIndicator,+ secondaryIndicator,+}: {+ children: React.ReactNode+ stepIndicator?: React.ReactNode+ secondaryIndicator?: React.ReactNode+}): JSX.Element {+ return (+ <div className="min-h-screen bg-bg-light text-default flex flex-col">+ <div className="border-b border-border bg-bg-light px-6 py-3 flex items-center justify-between">+ <div className="flex items-center gap-2">+ <span className="inline-flex w-8 h-8 items-center justify-center">+ <Logomark />+ </span>+ </div>+ <div className="flex items-center gap-4 text-sm">+ <span className="inline-flex items-center gap-1">+ <span>Hedgebox</span>+ <span className="text-muted">▾</span>+ </span>+ <span className="inline-flex items-center gap-2">+ <span className="w-7 h-7 rounded-full bg-purple-300 inline-flex items-center justify-center text-xs font-semibold text-purple-900">+ J+ </span>+ <span>Josh</span>+ </span>+ </div>+ </div>+ <div className="flex-1 w-full max-w-4xl mx-auto px-6 py-10">+ <div className="flex items-center justify-between gap-4 flex-wrap mb-8">+ <h1 className="text-3xl font-bold m-0">Install</h1>+ <div className="flex items-center gap-4 text-sm">+ {stepIndicator}+ {secondaryIndicator}+ </div>+ </div>+ {children}+ </div>+ </div>+ )+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/helpers.ts b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/helpers.tsnew file mode 100644index 000000000000..e4e7efb1abb2--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/helpers.ts@@ -0,0 +1,35 @@+import { type DisplayState } from '../wizardProgressTrackerLogic'++export function bannerTypeFor(state: DisplayState): 'ai' | 'success' | 'error' {+ if (state === 'completed') {+ return 'success'+ }+ if (state === 'error') {+ return 'error'+ }+ return 'ai'+}++export function headlineFor(state: DisplayState): string {+ switch (state) {+ case 'completed':+ return 'PostHog is set up.'+ case 'error':+ return 'The wizard hit a snag.'+ case 'connecting':+ return 'Reconnecting to the wizard…'+ default:+ return "You've got ~10 minutes back. Go explore."+ }+}++export function subLineFor(state: DisplayState): string {+ switch (state) {+ case 'completed':+ return 'Check your terminal — the wizard left a report of what it changed. Then hit Next.'+ case 'connecting':+ return 'restoring connection — your run is still going'+ default:+ return "Close the tab, poke around the product, grab some water — the wizard keeps going and leaves a report when it's done."+ }+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/index.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/index.tsxnew file mode 100644index 000000000000..13388d2eb4c4--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardProgressTracker/index.tsx@@ -0,0 +1,59 @@+import { useActions, useValues } from 'kea'+import { useEffect } from 'react'++import { LemonBanner } from '@posthog/lemon-ui'++import { wizardProgressTrackerLogic } from '../wizardProgressTrackerLogic'+import { bannerTypeFor, headlineFor, subLineFor } from './helpers'++/**+ * Inline confirmation card shown on the install step once a wizard session+ * exists. The FAB carries the live progress everywhere else — this card just+ * acknowledges the run so the user knows they can keep moving in onboarding.+ */+export function WizardProgressTracker(): JSX.Element | null {+ const { displayState, latestSession } = useValues(wizardProgressTrackerLogic)+ const { setPanelMounted } = useActions(wizardProgressTrackerLogic)++ useEffect(() => {+ setPanelMounted(true)+ return () => setPanelMounted(false)+ }, [setPanelMounted])++ if (displayState === 'preTakeover' || !latestSession) {+ return null+ }++ const errorPayload =+ displayState === 'error' && latestSession.error && typeof latestSession.error === 'object'+ ? (latestSession.error as { type?: string; message?: string })+ : null++ return (+ <LemonBanner type={bannerTypeFor(displayState)}>+ <div className="min-w-0 space-y-1">+ <div className="font-semibold">{headlineFor(displayState)}</div>+ {displayState === 'error' && errorPayload ? (+ <div className="text-xs">+ <span className="font-semibold">{errorPayload.type}: </span>+ <span className="text-muted">{errorPayload.message}</span>+ </div>+ ) : (+ <div className="text-xs text-muted flex items-center flex-wrap gap-x-2 gap-y-1">+ <span>{subLineFor(displayState)}</span>+ </div>+ )}+ </div>+ </LemonBanner>+ )+}++/**+ * Used by the parent variant to decide whether to render the takeover at all.+ * Mounts the logic on first call. Returns `true` once we have observed a+ * recent session — stale terminal sessions sitting in the DB don't trigger it.+ */+export function useWizardTakeoverActive(): boolean {+ const { displayState, sessionIsCurrent } = useValues(wizardProgressTrackerLogic)+ return displayState !== 'preTakeover' && sessionIsCurrent+}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/index.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/index.tsxindex 484f3d83d9e0..738d8b7ea6b6 100644--- a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/index.tsx+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/index.tsx@@ -21,9 +21,7 @@ import { MobileInstallHandoff } from './MobileInstallHandoff'import { SDKGrid } from './SDKGrid'import { SDKInstructionsModal } from './SDKInstructionsModal'import { SDKGridProps, VariantProps } from './types'-import { WizardHeroVariant } from './variants/WizardHeroVariant'-import { WizardOnlyVariant } from './variants/WizardOnlyVariant'-import { WizardTabVariant } from './variants/WizardTabVariant'+import { WizardInstallStep } from './WizardInstallStep'interface OnboardingInstallStepProps {sdkInstructionMap: SDKInstructionsMap@@ -36,32 +34,15 @@ interface OnboardingInstallStepProps {}/**- * Onboarding install step — renders the "Install" screen during onboarding.+ * Onboarding install step — wizard-centered layout for non-Logs products, bare+ * SDK grid for Logs (which uses OpenTelemetry, not the PostHog JS wizard).*- * Layout is driven by three growth experiments:- *- * ONBOARDING_WIZARD_PROMINENCE (#team-growth)- * control — SDK grid only (legacy baseline)- * wizard-hero — wizard banner prominently above the SDK grid- * wizard-tab — wizard and SDK grid split across two tabs- * wizard-only — wizard centered; SDK grid hidden behind a "manual setup" link- *- * ONBOARDING_SKIP_INSTALL_STEP (#team-growth)- * Moves the "Skip installation" button to the bottom of the step. Ignored by- * wizard variants — those manage their own skip UI via OnboardingStep.showSkip.- *- * ONBOARDING_MOBILE_INSTALL_HELPER (#team-growth)- * When the user is on a mobile device (navigator.userAgent check) AND in the- * `test` arm, replaces the entire variant dispatch with MobileInstallHandoff,- * a screen that offers to share the install URL to the user's computer via- * the Web Share API. Users can dismiss it with "continue here anyway" which- * falls through to the regular variant dispatch. See the data-driven rationale- * in that component's JSDoc.- *- * Per-variant implementations live in ./variants. WizardOnlyVariant renders its own- * SDKInstructionsModal (it needs a nested modal flow: manual-setup → SDK instructions- * → back to manual-setup), so the shared `instructionsModal` below is not rendered- * for it.+ * Two growth experiments overlay this:+ * - `ONBOARDING_SKIP_INSTALL_STEP`: moves "Skip installation" to the bottom.+ * The wizard variant manages its own skip UI via OnboardingStep.showSkip.+ * - `ONBOARDING_MOBILE_INSTALL_HELPER`: on mobile + `test`, swaps the dispatch+ * for `MobileInstallHandoff` (Web Share API). Excluded for Logs because the+ * handoff's RealtimeCheckIndicator never resolves without an `ingested_event`.*/export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstallStepProps> = ({sdkInstructionMap,@@ -82,12 +63,8 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstalconst productName = currentStepProductKey? availableOnboardingProducts[currentStepProductKey as keyof typeof availableOnboardingProducts]?.name: undefined- // The posthog-js install step is shared across many products via dedup, so it- // gets a generic "Install" title rather than tying it to whichever product- // happens to be the dedup survivor (which would mislead users picking PA + WA +- // SR into thinking the step only installs Product Analytics, etc.).- // Product-specific install steps (AI observability, Workflows, Logs) keep their- // product-titled label since they really are product-specific.+ // The shared posthog-js step gets a generic "Install" title — naming it after+ // the dedup-survivor product would mislead users installing several at once.const isSdkInstallStep = currentFlowStep?.dedupKey === INSTALL_DEDUP_KEYS.POSTHOG_JSconst installTitle = isSdkInstallStep ? 'Install' : productName ? `Install ${productName}` : 'Install your SDK'@@ -96,20 +73,10 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstalconst adblockResult = useAdblockDetection()const isSkipButtonExperiment = useFeatureFlag('ONBOARDING_SKIP_INSTALL_STEP', 'test')- const isWizardHero = useFeatureFlag('ONBOARDING_WIZARD_PROMINENCE', 'wizard-hero')- const isWizardTab = useFeatureFlag('ONBOARDING_WIZARD_PROMINENCE', 'wizard-tab')- const isWizardOnly = useFeatureFlag('ONBOARDING_WIZARD_PROMINENCE', 'wizard-only')-- // Logs uses OpenTelemetry, not the PostHog JS wizard. When the Logs install step is- // shown (either directly or as a secondary product within another flow), skip all- // wizard variants and fall through to the control SDK-grid layout.const isLogsProduct = currentStepProductKey === ProductKey.LOGS- // Double-gated: both the feature flag AND the client-side mobile check must- // be true. The flag controls experiment enrollment (targeted to mobile- // devices at the flag definition level in PostHog); isMobile() is the hard- // guarantee that the mobile-specific UI NEVER appears on desktop, even if- // a desktop user somehow ends up in the `test` arm.+ // Both gates required: the flag controls enrollment (targeted in PostHog),+ // isMobile() is the hard guarantee the mobile UI never appears on desktop.const isMobileHandoffTest = useFeatureFlag('ONBOARDING_MOBILE_INSTALL_HELPER', 'test')const showMobileHandoff = isMobileHandoffTest && isMobile() && !mobileHandoffDismissed@@ -118,11 +85,9 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstalsetAvailableSDKInstructionsMap(sdkInstructionMap)}, [sdkInstructionMap, sdkTagOverrides, setAvailableSDKInstructionsMap, setSDKTagOverrides])- // Closes the experiment funnel: desktop lands here from a shared link- // carrying `?handoff=mobile`. Fires exactly once per mount via a ref- // guard (useEffect deps are empty so it would re-run on StrictMode- // double-invoke otherwise), then strips the query param from the URL- // so refreshes / back-and-forth navigation don't re-capture.+ // Captures the funnel-close event when desktop arrives via a `?handoff=mobile`+ // share link, then strips the param so refreshes / back-nav don't re-capture.+ // The ref guard is required because StrictMode double-invokes effects in dev.useEffect(() => {if (linkOpenedCapturedRef.current) {return@@ -148,8 +113,6 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstalsetInstructionsModalOpen(true)}- const isWizardVariant = (isWizardHero || isWizardTab || isWizardOnly) && !isLogsProduct-const sdkGridProps: SDKGridProps = {filteredSDKs: filteredSDKs ?? [],searchTerm,@@ -161,9 +124,10 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstalcurrentTeam,showTopControls: true,installationComplete,- // Wizard variants rely on OnboardingStep.showSkip for the skip/continue button,- // so we suppress SDKGrid's duplicate top-right NextButton to avoid rendering two.- showTopSkipButton: isWizardVariant ? false : showTopSkipButton,+ // The wizard variant uses OnboardingStep.showSkip; suppress SDKGrid's+ // duplicate top-right button to avoid two next-buttons. Only Logs renders+ // the bare grid as a primary surface, so it keeps the top button.+ showTopSkipButton: isLogsProduct ? showTopSkipButton : false,}const variantProps: VariantProps = {@@ -190,11 +154,6 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstal/>)- // Mobile users in the test arm get the handoff screen instead of the regular- // variant dispatch. "Continue on this device" dismisses and falls through below.- // Logs onboarding uses OpenTelemetry, which has no `ingested_event` signal — the- // mobile handoff would render a RealtimeCheckIndicator that never resolves and- // leave Continue disabled forever, so we skip the handoff for Logs entirely.if (showMobileHandoff && !isLogsProduct) {return (<MobileInstallHandoff@@ -207,30 +166,12 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstal)}- // Route to the appropriate experiment variant. WizardOnlyVariant renders its own SDKInstructionsModal.- if (isWizardHero && !isLogsProduct) {- return (- <>- <WizardHeroVariant {...variantProps} />- {instructionsModal}- </>- )- }-- if (isWizardTab && !isLogsProduct) {- return (- <>- <WizardTabVariant {...variantProps} />- {instructionsModal}- </>- )- }-- if (isWizardOnly && !isLogsProduct) {- return <WizardOnlyVariant {...variantProps} />+ // Non-Logs products get the wizard-centered layout, which owns its own SDKInstructionsModal.+ if (!isLogsProduct) {+ return <WizardInstallStep {...variantProps} />}- // Control: existing behavior — SDK grid without the wizard hero+ // Logs: bare SDK grid — OpenTelemetry, not the PostHog JS wizard.return (<OnboardingSteptitle={installTitle}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardHeroVariant.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardHeroVariant.tsxdeleted file mode 100644index 46e86f6ed873..000000000000--- a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardHeroVariant.tsx+++ /dev/null@@ -1,63 +0,0 @@-import { LemonBanner } from '@posthog/lemon-ui'--import { OnboardingStepKey } from '~/types'--import { OnboardingStep } from '../../../OnboardingStep'-import { AdblockWarning, RealtimeCheckIndicator } from '../../RealtimeCheckIndicator'-import { SDKGrid } from '../SDKGrid'-import { VariantProps } from '../types'-import { WizardCommandBlock } from '../WizardCommandBlock'--/**- * ONBOARDING_WIZARD_PROMINENCE = "wizard-hero"- * Wizard banner prominently above the SDK grid — both visible at once, wizard given- * visual primacy via a LemonBanner + divider ("Or, set up manually").- */-export function WizardHeroVariant({- sdkGridProps,- adblockResult,- installationComplete,- listeningForName,- teamPropertyToVerify,- header,-}: VariantProps): JSX.Element {- return (- <OnboardingStep- title="Install"- stepKey={OnboardingStepKey.INSTALL}- continueDisabledReason={!installationComplete ? 'Installation is not complete' : undefined}- showSkip={!installationComplete}- actions={- <div className="pr-2">- <RealtimeCheckIndicator- teamPropertyToVerify={teamPropertyToVerify}- listeningForName={listeningForName}- />- </div>- }- >- {header}- {!installationComplete && <AdblockWarning adblockResult={adblockResult} />}- <div className="mt-6 space-y-6">- <LemonBanner type="info" hideIcon>- <div className="p-2">- <h3 className="text-lg font-bold mb-1">Install PostHog with one command</h3>- <p className="text-sm mb-4">- The AI wizard auto-detects your framework and sets everything up. Just paste this into your- terminal.- </p>- <WizardCommandBlock />- </div>- </LemonBanner>-- <div className="flex items-center gap-3">- <div className="flex-1 border-t border-border" />- <span className="text-muted font-semibold text-xs uppercase">Or, set up manually</span>- <div className="flex-1 border-t border-border" />- </div>-- <SDKGrid {...sdkGridProps} />- </div>- </OnboardingStep>- )-}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardOnlyVariant.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardOnlyVariant.tsxdeleted file mode 100644index d2d0dfdccd64..000000000000--- a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardOnlyVariant.tsx+++ /dev/null@@ -1,108 +0,0 @@-import { useState } from 'react'--import { LemonButton, LemonModal } from '@posthog/lemon-ui'--import { OnboardingStepKey, type SDK } from '~/types'--import { OnboardingStep } from '../../../OnboardingStep'-import { AdblockWarning, RealtimeCheckIndicator } from '../../RealtimeCheckIndicator'-import { SDKGrid } from '../SDKGrid'-import { SDKInstructionsModal } from '../SDKInstructionsModal'-import { VariantProps } from '../types'-import { WizardCommandBlock } from '../WizardCommandBlock'-import { WizardOnlyIntro } from './WizardOnlyIntro'--/**- * ONBOARDING_WIZARD_PROMINENCE = "wizard-only"- * Wizard is the centered focus; the SDK grid is hidden behind a "Need to set up- * manually?" link that opens it in a modal.- *- * Unlike the other variants, this one owns its own SDKInstructionsModal because it- * needs a nested modal flow: picking an SDK in the manual-setup modal closes that- * modal and opens the instructions modal; closing the instructions modal re-opens the- * manual-setup modal (back-button behavior). That coordination can't live in the- * parent, so the shared modal in index.tsx is skipped for this variant.- *- * Nested experiment (ONBOARDING_WIZARD_INSTALLATION_IMPROVED_COPY, #team-growth):- * WizardOnlyIntro dispatches between control and test copy internally. The- * variant stays agnostic — it just renders the intro and the shared- * WizardCommandBlock; the intro file handles the copy swap.- */-export function WizardOnlyVariant({- sdkGridProps,- sdkInstructionMap,- adblockResult,- installationComplete,- listeningForName,- teamPropertyToVerify,- selectedSDK,- header,-}: VariantProps): JSX.Element {- const [manualModalOpen, setManualModalOpen] = useState(false)- const [sdkInstructionsOpen, setSdkInstructionsOpen] = useState(false)-- const handleWizardOnlySDKClick = (sdk: SDK): void => {- sdkGridProps.onSDKClick(sdk)- setManualModalOpen(false)- setSdkInstructionsOpen(true)- }-- return (- <OnboardingStep- title="Install"- stepKey={OnboardingStepKey.INSTALL}- continueDisabledReason={!installationComplete ? 'Installation is not complete' : undefined}- showSkip={!installationComplete}- actions={- <div className="pr-2">- <RealtimeCheckIndicator- teamPropertyToVerify={teamPropertyToVerify}- listeningForName={listeningForName}- />- </div>- }- >- {header}- {!installationComplete && <AdblockWarning adblockResult={adblockResult} />}- <div className="mt-6 space-y-8">- <WizardOnlyIntro />-- <div className="max-w-xl mx-auto">- <WizardCommandBlock />- </div>-- <div className="text-center">- <LemonButton type="tertiary" size="small" onClick={() => setManualModalOpen(true)}>- Need to set up manually?- </LemonButton>- </div>- </div>-- <LemonModal- isOpen={manualModalOpen}- onClose={() => setManualModalOpen(false)}- title="Manual SDK setup"- width="80vw"- >- <div className="p-4">- <SDKGrid {...{ ...sdkGridProps, onSDKClick: handleWizardOnlySDKClick }} showTopControls />- </div>- </LemonModal>-- {selectedSDK && (- <SDKInstructionsModal- isOpen={sdkInstructionsOpen && !manualModalOpen}- onClose={() => {- setSdkInstructionsOpen(false)- setManualModalOpen(true)- }}- sdk={selectedSDK}- sdkInstructionMap={sdkInstructionMap}- adblockResult={adblockResult}- verifyingProperty={teamPropertyToVerify}- verifyingName={listeningForName}- />- )}- </OnboardingStep>- )-}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardTabVariant.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardTabVariant.tsxdeleted file mode 100644index 3b94ec2af266..000000000000--- a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/variants/WizardTabVariant.tsx+++ /dev/null@@ -1,87 +0,0 @@-import { useState } from 'react'--import { LemonTabs } from '@posthog/lemon-ui'--import { OnboardingStepKey } from '~/types'--import { OnboardingStep } from '../../../OnboardingStep'-import { AdblockWarning, RealtimeCheckIndicator } from '../../RealtimeCheckIndicator'-import { SDKGrid } from '../SDKGrid'-import { VariantProps } from '../types'-import { WizardCommandBlock } from '../WizardCommandBlock'--/**- * ONBOARDING_WIZARD_PROMINENCE = "wizard-tab"- * Wizard and SDK grid split across two top-level tabs ("AI wizard" / "Manual setup"),- * wizard tab selected by default and tagged "Recommended".- */-export function WizardTabVariant({- sdkGridProps,- adblockResult,- installationComplete,- listeningForName,- teamPropertyToVerify,- header,-}: VariantProps): JSX.Element {- const [activeTab, setActiveTab] = useState<string>('wizard')-- return (- <OnboardingStep- title="Install"- stepKey={OnboardingStepKey.INSTALL}- continueDisabledReason={!installationComplete ? 'Installation is not complete' : undefined}- showSkip={!installationComplete}- actions={- <div className="pr-2">- <RealtimeCheckIndicator- teamPropertyToVerify={teamPropertyToVerify}- listeningForName={listeningForName}- />- </div>- }- >- {header}- {!installationComplete && <AdblockWarning adblockResult={adblockResult} />}- <div className="mt-6">- <LemonTabs- activeKey={activeTab}- onChange={setActiveTab}- tabs={[- {- key: 'wizard',- label: (- <span className="flex items-center gap-1.5">- AI wizard- <span className="bg-success-highlight text-success text-[10px] font-bold px-1.5 py-0.5 rounded-sm uppercase">- Recommended- </span>- </span>- ),- },- {- key: 'manual',- label: 'Manual setup',- },- ]}- />-- {activeTab === 'wizard' ? (- <div className="mt-4 space-y-6">- <div>- <h3 className="text-base font-semibold mb-2">Install PostHog automatically</h3>- <p className="text-sm text-muted mb-4">- Run this command in your project directory. The wizard will detect your framework,- install the SDK, and configure event capture.- </p>- </div>- <WizardCommandBlock />- </div>- ) : (- <div className="mt-4">- <SDKGrid {...sdkGridProps} />- </div>- )}- </div>- </OnboardingStep>- )-}diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardInstallStepLogic.ts b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardInstallStepLogic.tsnew file mode 100644index 000000000000..1ba7379a59fa--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardInstallStepLogic.ts@@ -0,0 +1,25 @@+import { actions, kea, path, reducers } from 'kea'++import type { wizardInstallStepLogicType } from './wizardInstallStepLogicType'++export const wizardInstallStepLogic = kea<wizardInstallStepLogicType>([+ path(['scenes', 'onboarding', 'wizardInstallStepLogic']),+ actions({+ setManualModalOpen: (open: boolean) => ({ open }),+ setSdkInstructionsOpen: (open: boolean) => ({ open }),+ }),+ reducers({+ manualModalOpen: [+ false,+ {+ setManualModalOpen: (_, { open }) => open,+ },+ ],+ sdkInstructionsOpen: [+ false,+ {+ setSdkInstructionsOpen: (_, { open }) => open,+ },+ ],+ }),+])diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardProgressTrackerLogic.ts b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardProgressTrackerLogic.tsnew file mode 100644index 000000000000..4651ff6eba21--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardProgressTrackerLogic.ts@@ -0,0 +1,257 @@+import { actions, afterMount, beforeUnmount, connect, kea, path, reducers, selectors } from 'kea'+import { subscriptions } from 'kea-subscriptions'++import type { WizardSessionDTOApi } from 'products/wizard/frontend/generated/api.schemas'+import { wizardSessionStreamLogic } from 'products/wizard/frontend/wizardSessionStreamLogic'++import type { wizardProgressTrackerLogicType } from './wizardProgressTrackerLogicType'++export type DisplayState =+ | 'preTakeover' // No session yet — keep the command card visible.+ | 'connecting' // Session exists but transport is reconnecting.+ | 'running' // run_phase === 'running'+ | 'completed' // run_phase === 'completed'+ | 'error' // run_phase === 'error'++export interface ActivityEntry {+ /** Wall-clock timestamp (ms epoch) used for the visible HH:MM:SS prefix. */+ at: number+ /** Pre-formatted line: terse, lowercase, terminal-tail style. */+ text: string+}++const MAX_ACTIVITY_ENTRIES = 50+const TICK_INTERVAL_MS = 1_000+const HEARTBEAT_INTERVAL_MS = 30_000+const HEARTBEAT_QUIET_THRESHOLD_MS = 25_000++// A session counts as "current" if it was updated within the last 10 minutes.+// Lets the FAB ignore stale terminal sessions left over from previous runs / test+// data when a user lands on the app, while still re-surfacing recently-completed+// runs after a quick navigation away and back.+const SESSION_CURRENT_THRESHOLD_MS = 10 * 60 * 1000++const WORKFLOW_ID = 'posthog-integration'++function runPhaseMessage(phase: string): string {+ if (phase === 'completed') {+ return 'wizard finished'+ }+ if (phase === 'error') {+ return 'wizard hit an error'+ }+ if (phase === 'running') {+ return 'wizard started running'+ }+ return `wizard phase: ${phase}`+}++function taskStatusVerb(status: string): string {+ switch (status) {+ case 'in_progress':+ return 'started:'+ case 'completed':+ return 'done:'+ case 'failed':+ return 'failed:'+ case 'canceled':+ return 'skipped:'+ case 'pending':+ return 'queued:'+ default:+ return `${status}:`+ }+}++/**+ * Drives the wizard takeover panel:+ * - subscribes to wizardSessionStreamLogic for live session state+ * - keeps a synthetic activity log (tail -f vibe) so the panel never goes silent+ * - ticks a 1Hz running-time counter+ * - emits a "still working…" heartbeat when the log goes quiet during a run+ * - exposes a derived DisplayState that the panel switches on+ */+export const wizardProgressTrackerLogic = kea<wizardProgressTrackerLogicType>([+ path(['scenes', 'onboarding', 'wizardProgressTrackerLogic']),+ connect(() => ({+ values: [+ wizardSessionStreamLogic({ workflowId: WORKFLOW_ID }),+ ['latestSession', 'connectionStatus', 'lastError'],+ ],+ actions: [wizardSessionStreamLogic({ workflowId: WORKFLOW_ID }), ['connect', 'disconnect']],+ })),+ actions({+ appendActivity: (text: string) => ({ text, at: Date.now() }),+ tick: (now: number) => ({ now }),+ taskStarted: (taskId: string, at: number) => ({ taskId, at }),+ // User-initiated dismiss of the floating FAB once a run has reached a terminal phase.+ dismiss: true,+ // Set by the install-step confirmation card on mount/unmount. While true, the FAB+ // hides — so the inline acknowledgement and the floating widget never overlap.+ setPanelMounted: (mounted: boolean) => ({ mounted }),+ // Sticky flag — set the first time we observe a session that's recent enough to+ // count as live. Old terminal sessions sitting in the DB stay invisible.+ markSessionCurrent: true,+ }),+ reducers({+ activityLog: [+ [] as ActivityEntry[],+ {+ appendActivity: (state, { text, at }) => {+ const next = [...state, { text, at }]+ return next.length > MAX_ACTIVITY_ENTRIES ? next.slice(next.length - MAX_ACTIVITY_ENTRIES) : next+ },+ },+ ],+ now: [+ Date.now(),+ {+ tick: (_, { now }) => now,+ },+ ],+ // Wall-clock timestamp (ms) of the moment each task was observed entering `in_progress`.+ // Used to render a per-task running timer. Last write wins so retries restart the clock.+ taskStartedAt: [+ {} as Record<string, number>,+ {+ taskStarted: (state, { taskId, at }) => ({ ...state, [taskId]: at }),+ },+ ],+ dismissed: [+ false,+ {+ dismiss: () => true,+ },+ ],+ panelMounted: [+ false,+ {+ setPanelMounted: (_, { mounted }) => mounted,+ },+ ],+ sessionIsCurrent: [+ false,+ {+ markSessionCurrent: () => true,+ },+ ],+ }),+ selectors({+ displayState: [+ (s) => [s.latestSession, s.connectionStatus],+ (latestSession, connectionStatus): DisplayState => {+ if (!latestSession) {+ return 'preTakeover'+ }+ // Terminal run_phase states are sticky — the wizard CLI closes the SSE+ // connection cleanly after `completed`/`error`, which would otherwise+ // flip the panel back to a transient "reconnecting…" state right when+ // the user is supposed to see the completion screen.+ const phase = latestSession.run_phase+ if (phase === 'completed') {+ return 'completed'+ }+ if (phase === 'error') {+ return 'error'+ }+ if (connectionStatus === 'connecting' || connectionStatus === 'error') {+ return 'connecting'+ }+ return 'running'+ },+ ],+ elapsedSeconds: [+ (s) => [s.latestSession, s.now],+ (latestSession, now): number => {+ if (!latestSession) {+ return 0+ }+ const startedAt = new Date(latestSession.started_at).getTime()+ if (Number.isNaN(startedAt)) {+ return 0+ }+ return Math.max(0, Math.floor((now - startedAt) / 1000))+ },+ ],+ }),+ subscriptions(({ actions }) => ({+ connectionStatus: (status, prev) => {+ if (status === prev) {+ return+ }+ const messages: Record<string, string> = {+ connecting: 'connecting…',+ open: 'connected, waiting for wizard',+ closed: 'stream closed',+ error: 'transport error — reconnecting…',+ idle: '',+ }+ const text = messages[status as string]+ if (text) {+ actions.appendActivity(text)+ }+ },+ latestSession: (session: WizardSessionDTOApi | null, prev: WizardSessionDTOApi | null) => {+ if (!session) {+ return+ }+ const now = Date.now()+ const updatedAt = new Date(session.updated_at).getTime()+ if (!Number.isNaN(updatedAt) && now - updatedAt < SESSION_CURRENT_THRESHOLD_MS) {+ actions.markSessionCurrent()+ }+ if (!prev) {+ actions.appendActivity(`session started for ${session.skill_id}`)+ // Tasks we joined mid-run: best-effort, start the per-task clock now.+ for (const task of session.tasks) {+ if (task.status === 'in_progress') {+ actions.taskStarted(task.id, now)+ }+ }+ return+ }+ if (session.run_phase !== prev.run_phase) {+ actions.appendActivity(runPhaseMessage(session.run_phase))+ }+ const prevTaskKeys = new Set(prev.tasks.map((t) => `${t.id}::${t.status}`))+ for (const task of session.tasks) {+ const key = `${task.id}::${task.status}`+ if (!prevTaskKeys.has(key)) {+ actions.appendActivity(`${taskStatusVerb(task.status)} ${task.title}`)+ if (task.status === 'in_progress') {+ actions.taskStarted(task.id, now)+ }+ }+ }+ },+ })),+ afterMount(({ actions, cache, values }) => {+ actions.connect()+ actions.appendActivity('opening wizard session stream…')+ cache.disposables.add(() => {+ const id = window.setInterval(() => actions.tick(Date.now()), TICK_INTERVAL_MS)+ return () => window.clearInterval(id)+ }, 'tick')+ cache.disposables.add(() => {+ const id = window.setInterval(() => {+ // Heartbeat: if the log has gone quiet for HEARTBEAT_QUIET_THRESHOLD_MS+ // while the wizard is still running, append a "still working" line so+ // the panel never looks frozen.+ const session = values.latestSession+ if (!session || session.run_phase !== 'running') {+ return+ }+ const log = values.activityLog+ const latest = log.length > 0 ? log[log.length - 1] : null+ const quietFor = latest ? Date.now() - latest.at : Infinity+ if (quietFor >= HEARTBEAT_QUIET_THRESHOLD_MS) {+ actions.appendActivity('still working…')+ }+ }, HEARTBEAT_INTERVAL_MS)+ return () => window.clearInterval(id)+ }, 'heartbeat')+ }),+ beforeUnmount(({ actions }) => {+ actions.disconnect()+ }),+])diff --git a/frontend/src/scenes/onboarding/sdks/skillBadge.tsx b/frontend/src/scenes/onboarding/sdks/skillBadge.tsxnew file mode 100644index 000000000000..85324c62687e--- /dev/null+++ b/frontend/src/scenes/onboarding/sdks/skillBadge.tsx@@ -0,0 +1,191 @@+import { IconCode } from '@posthog/icons'++import { SDKKey, type SDK } from '~/types'++import { ALL_SDKS } from './allSDKs'++/**+ * Every framework the wizard CLI ships under `src/frameworks/`. The CLI sends+ * one of these strings as `skill_id` on the wizard session. Kept here (not on+ * the CLI side) so we can drive the storybook picker and the alias map below+ * from a single source of truth — keep this in sync with the CLI repo.+ */+export const WIZARD_SKILL_IDS = [+ 'android',+ 'angular',+ 'astro',+ 'django',+ 'fastapi',+ 'flask',+ 'javascript-node',+ 'javascript-web',+ 'laravel',+ 'nextjs',+ 'nuxt',+ 'python',+ 'rails',+ 'react-native',+ 'react-router',+ 'ruby',+ 'svelte',+ 'swift',+ 'tanstack-router',+ 'tanstack-start',+ 'vue',+] as const++/**+ * Wizard `skill_id` → PostHog SDKKey. The CLI uses hyphenated framework names+ * (`react-native`) while PostHog's SDK catalogue uses underscored enum keys+ * (`react_native`), and a handful of frameworks don't map 1:1 — this table+ * resolves both kinds of divergence.+ */+const WIZARD_SKILL_TO_SDK_KEY: Record<string, SDKKey> = {+ android: SDKKey.ANDROID,+ angular: SDKKey.ANGULAR,+ astro: SDKKey.ASTRO,+ django: SDKKey.DJANGO,+ 'javascript-node': SDKKey.NODE_JS,+ 'javascript-web': SDKKey.JS_WEB,+ laravel: SDKKey.LARAVEL,+ nextjs: SDKKey.NEXT_JS,+ nuxt: SDKKey.NUXT_JS,+ python: SDKKey.PYTHON,+ rails: SDKKey.RUBY_ON_RAILS,+ 'react-native': SDKKey.REACT_NATIVE,+ 'react-router': SDKKey.REACT_ROUTER,+ ruby: SDKKey.RUBY,+ svelte: SDKKey.SVELTE,+ swift: SDKKey.IOS,+ 'tanstack-start': SDKKey.TANSTACK_START,+ vue: SDKKey.VUE_JS,+ // No PostHog SDK match yet — fastapi, flask, tanstack-router fall through to+ // the IconCode placeholder + tidied display name.+}++/**+ * Look up an SDK entry by a wizard `skill_id`. Tries the alias map first, then+ * a direct match on SDKKey value, then a normalized underscore form. Returns+ * `null` for unknown ids; callers should fall back gracefully.+ */+export function findSdkByKey(skillId: string): SDK | null {+ const mappedKey = WIZARD_SKILL_TO_SDK_KEY[skillId]+ if (mappedKey) {+ const sdk = ALL_SDKS.find((s) => s.key === mappedKey)+ if (sdk) {+ return sdk+ }+ }+ const direct = ALL_SDKS.find((s) => s.key === skillId)+ if (direct) {+ return direct+ }+ const normalized = skillId.replace(/-/g, '_')+ if (normalized !== skillId) {+ return ALL_SDKS.find((s) => s.key === normalized) ?? null+ }+ return null+}++/**+ * Human-readable name for a skill_id. Uses the canonical SDK name when known+ * (`laravel → Laravel`, `react-native → React Native`) and falls back to a+ * tidied-up version of the raw id (`fastapi → Fastapi`).+ */+export function getSkillDisplayName(skillId: string): string {+ const sdk = findSdkByKey(skillId)+ if (sdk) {+ return sdk.name+ }+ return skillId.charAt(0).toUpperCase() + skillId.slice(1).replace(/[_-]/g, ' ')+}++/**+ * Inline logo + display name for a wizard skill_id. Use anywhere a wizard+ * session needs to be visually identified (progress panel, FAB, logs, etc.).+ *+ * Unknown skills fall back to a generic code icon plus a tidied display name.+ */+export function SkillBadge({+ skillId,+ size = 16,+ className,+}: {+ skillId: string+ /** Logo edge length in px (also used for the fallback icon). Defaults to 16. */+ size?: number+ /** Extra classes for the wrapper. */+ className?: string+}): JSX.Element {+ const sdk = findSdkByKey(skillId)+ const displayName = sdk?.name ?? getSkillDisplayName(skillId)+ return (+ <span className={`inline-flex items-center gap-1.5 ${className ?? ''}`.trim()}>+ <SkillLogoImage sdk={sdk} alt={`${displayName} logo`} size={size} />+ <span>{displayName}</span>+ </span>+ )+}++/**+ * Just the logo — useful when the framework name is in the surrounding copy and+ * the inline `SkillBadge` wrapper would be redundant.+ */+export function SkillLogo({+ skillId,+ size = 16,+ className,+}: {+ skillId: string+ size?: number+ className?: string+}): JSX.Element {+ const sdk = findSdkByKey(skillId)+ const displayName = sdk?.name ?? getSkillDisplayName(skillId)+ return <SkillLogoImage sdk={sdk} alt={`${displayName} logo`} size={size} className={className} />+}++function SkillLogoImage({+ sdk,+ alt,+ size,+ className,+}: {+ sdk: SDK | null+ alt: string+ size: number+ className?: string+}): JSX.Element {+ const sizeStyle = { width: size, height: size }+ const extra = className ?? ''+ if (!sdk) {+ return (+ <span+ style={sizeStyle}+ className={`inline-flex items-center justify-center text-muted shrink-0 ${extra}`.trim()}+ >+ <IconCode style={sizeStyle} aria-hidden />+ </span>+ )+ }+ const image = sdk.image+ if (typeof image === 'string') {+ return <img src={image} alt={alt} style={sizeStyle} className={`object-contain shrink-0 ${extra}`.trim()} />+ }+ if (typeof image === 'object' && image !== null && 'default' in image) {+ return (+ <img+ src={image.default}+ alt={alt}+ style={sizeStyle}+ className={`object-contain shrink-0 ${extra}`.trim()}+ />+ )+ }+ // React element (custom logo component). It draws into its own container; constrain via CSS.+ return (+ <span style={sizeStyle} className={`inline-flex items-center justify-center shrink-0 ${extra}`.trim()}>+ {image}+ </span>+ )+}