Skip to content

: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.

chore(onboarding): remove the self-driving flow and resolved onboarding flags (#118199)

Rafael Audibert49fd2a789a43
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index a64da8efdde1..89b2669bfe9b 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -4260,38 +4260,6 @@ snapshots:
hash: v1.k794b7964.16ee39068a77c973daf16724ce36c74f1be0bd8e68b61602b22f1874d7827164.JRpzUuVTa5o_ZeK9qmeBWV99VhYjYe79fM4ro-feV18
layout-internal-feedback-widget--with-open-menu--light:
hash: v1.k794b7964.2b9a643a79c1fa1bfa3871d5cc5fcd9e57bac37283c82f952c726bac5540c9cd.mMaGVxLUAD9FGQ6M7LxNWTZAqsSst51srsdlK9IZtAQ
- layout-nav-bar-installation-status--all-states--dark:
- hash: v1.k794b7964.d4cd8a0e68eb7a8934c190510512afd4f4c30fa99335f40e78f9585fb181a549.sSPU_PnpVJHx1X6u1B05Wv7C7r42QYnZpJ9AeIjY35c
- layout-nav-bar-installation-status--all-states--light:
- hash: v1.k794b7964.a48dd0f6bb481b853619c3b011719f7a88c4929677914cbcbbec8a20a981c7eb.Tz0Ty5PdGCrcg2ercNyuwvhz1KnH2oBDXTh8T9yRArQ
- layout-nav-bar-installation-status--cloud-run-in-progress--dark:
- hash: v1.k794b7964.8147d6d169af167868bdf292f919e40073423ae49dffcc468831f34eef2fd020.JGXjIq1zcXXtDrXXhqK-MrVHSgspJxcobbsVfI6TA14
- layout-nav-bar-installation-status--cloud-run-in-progress--light:
- hash: v1.k794b7964.3862c2f44a83857e0b8723b7239b046f57fdfd567c0077480f353c351c9b321a.pq8p4hFmVvRPa5b9mEsr421MZGFYBFcuPQSJjJuye0M
- layout-nav-bar-installation-status--collapsed-nav--dark:
- hash: v1.k794b7964.8147d6d169af167868bdf292f919e40073423ae49dffcc468831f34eef2fd020.AE6FHv2bcfCc5R5eO3UxDBttSK55F-c8vfohsRHUOeg
- layout-nav-bar-installation-status--collapsed-nav--light:
- hash: v1.k794b7964.3862c2f44a83857e0b8723b7239b046f57fdfd567c0077480f353c351c9b321a.kyOMo0shHGy_HR-ISgzgiE5Mwiu7GnmAka8yzvbWw5M
- layout-nav-bar-installation-status--collapsed-nav-cloud-run--dark:
- hash: v1.k794b7964.8147d6d169af167868bdf292f919e40073423ae49dffcc468831f34eef2fd020._AurWZkRM2I6--pXr4-o19-SgfHBQ0voYtXHvQN987w
- layout-nav-bar-installation-status--collapsed-nav-cloud-run--light:
- hash: v1.k794b7964.3862c2f44a83857e0b8723b7239b046f57fdfd567c0077480f353c351c9b321a.Yj2q4Nj8TLeq-ylQXhtkA_ZYUsqexoyB0hzCGOC7Avg
- layout-nav-bar-installation-status--flag-off--dark:
- hash: v1.k794b7964.8147d6d169af167868bdf292f919e40073423ae49dffcc468831f34eef2fd020.5LPSVec2cVBz9VWNzTdfhXhSUH8PUzVmT-T2EsZkW4c
- layout-nav-bar-installation-status--flag-off--light:
- hash: v1.k794b7964.3862c2f44a83857e0b8723b7239b046f57fdfd567c0077480f353c351c9b321a.3XSyIHdJVnmDPzpJiqlVA73hHFQsK4dxkS-xptIds1U
- layout-nav-bar-installation-status--hidden--dark:
- hash: v1.k794b7964.8147d6d169af167868bdf292f919e40073423ae49dffcc468831f34eef2fd020.xRI5X4JcR10iS7GS-7Ssixj7LhyphiMkNzcTeZ0zuNE
- layout-nav-bar-installation-status--hidden--light:
- hash: v1.k794b7964.3862c2f44a83857e0b8723b7239b046f57fdfd567c0077480f353c351c9b321a.XsrC8c6rGSLUxUJ1V5tTVjaMwz0tpRDphUyC4Hl_qzk
- layout-nav-bar-installation-status--incomplete-onboarding--dark:
- hash: v1.k794b7964.8147d6d169af167868bdf292f919e40073423ae49dffcc468831f34eef2fd020.g0tr50lQLGphRfxfrAvJ3kgxmNd9LcGLyf8I_iL6Czo
- layout-nav-bar-installation-status--incomplete-onboarding--light:
- hash: v1.k794b7964.3862c2f44a83857e0b8723b7239b046f57fdfd567c0077480f353c351c9b321a.FBlp1Bm8TdONwRgxK08W8cteSh6RhHNiVUB2BpLyWQo
- layout-nav-bar-installation-status--local-session-active--dark:
- hash: v1.k794b7964.8147d6d169af167868bdf292f919e40073423ae49dffcc468831f34eef2fd020.EITCH6oreQApfcBumW0XPJ2jZ_mGiajcs4QgpusFQ0A
- layout-nav-bar-installation-status--local-session-active--light:
- hash: v1.k794b7964.3862c2f44a83857e0b8723b7239b046f57fdfd567c0077480f353c351c9b321a.dlSfwZqhbIYc_dvTH75ZoyYJMihnh_iAkr8hcOw1t14
layout-navigation-eventingestionrestrictiondetails--many-distinct-ids--dark:
hash: v1.k794b7964.64258ae40e87b4714ca4f8163d4cd1394e5912dcda695ee9b71328d5761795dc.cbMF-F4sSUCnWr_xL0FmJ0Zex8wuDgdVSgavOhsqFaM
layout-navigation-eventingestionrestrictiondetails--many-distinct-ids--light:
@@ -15334,78 +15302,74 @@ snapshots:
hash: v1.k794b7964.b8d633acb0b72d217732bfb6a85a0af99e3a8fd8be153158c311b59aa5be3fe1.UfxaT3QO-ESJ6CdUyAROsUAELLhYZ4tnnCIJDOK7Q4s
scenes-other-integration-landing-page--slack-not-configured--light:
hash: v1.k794b7964.a12f1b2e9bcce6e07f5dc5b8e07821599e77d131e6431727dd04da5f6613ec1c.LZ2zwIHu0AhggyqW-hnQaE1EO6dAgmDI9Xlu2eWTYKM
- scenes-other-onboarding-legacy--ai-observability-sdk-install--dark:
- hash: v1.k794b7964.56c19b089f713fccf0a782c058f0a66f4f28cbe3649e21503e18e3a40312cf7c.231989uTJqPY8KuCy-dIo8h1CshP2_ZXmdtWhFyaLT8
- scenes-other-onboarding-legacy--ai-observability-sdk-install--light:
- hash: v1.k794b7964.5e8614256624b6d04983856d304aabb44d56521a12c0bf77ec1156341d7ce4cc.uA7wEmLtLr5Dbc1HAcR5qlBxJezuPG5dUSQYoASOFwM
- scenes-other-onboarding-legacy--ai-observability-sdk-install-with-cloud-run-flag--dark:
- hash: v1.k794b7964.56c19b089f713fccf0a782c058f0a66f4f28cbe3649e21503e18e3a40312cf7c.dCNEsnikl4Sg6FFYat0_nji6C2smjkFrM-xLOIvt_h8
- scenes-other-onboarding-legacy--ai-observability-sdk-install-with-cloud-run-flag--light:
- hash: v1.k794b7964.2eed3a5f4cc1e01ff7fd03cbe34a7c6659a693b9a03db2454dca839c0af4fc15.WevSNEudIkhaV0E5tcA4FjkV3uSLVBEvBWG-zhwPKbQ
- scenes-other-onboarding-legacy--alerts--dark:
- hash: v1.k794b7964.abf4f9f444ce84f5713aa603edf5914c75dad9d12d6f2a6a713752215fbf1c1b.AFiqQ0yntkeTOtaDVaCoij06VeVPE8G0N2L7yVkQVWU
- scenes-other-onboarding-legacy--alerts--light:
- hash: v1.k794b7964.e0c81f82dffd751c76e2c123d698511ae6380cd0e3109f67a2ee45bfaf9b53f8.UswFwf14EvpCblp1OR0Gbfraxs4vkiPMN8EcPEBGqnI
- scenes-other-onboarding-legacy--authorized-domains--dark:
- hash: v1.k794b7964.d201cb33eb38f9d4d7f8d2896cad797825d7883721fdc19115b56378da760256.f9KFuO5kdMIk0tDEEEvMNQQPr_KcxGl8VMDndKUpRCs
- scenes-other-onboarding-legacy--authorized-domains--light:
- hash: v1.k794b7964.7ea4084e16a0f4c101c46b3e860a02a54e82a0fc595831b6effabafb7cabc1ce.Rl-3JoicUHxvTusXURds5_EbecwVmYdLW03bNKNxncY
- scenes-other-onboarding-legacy--billing-plans--dark:
- hash: v1.k794b7964.710145c1344d340ffbede5de2133111c79c9551849b8f9011947e2dcb0746768.7Ts5JCJDRrBE9eNWN_ceasqFy7qDbthDD0tva1CnD84
- scenes-other-onboarding-legacy--billing-plans--light:
- hash: v1.k794b7964.c2dfa413fb822de5c35125b7ae14e76f7d4047609178c207c791f145dd8e7618.Sf748Saz2643-mHX-Cs64KTk4XC8vpz5puSfJDcEBZg
- scenes-other-onboarding-legacy--invite-teammates--dark:
- hash: v1.k794b7964.06f106f54f505b53cb74320e2d90203575eac0824eb923eb25d9d35299e91270.VjZgGdmSE2ykeS2Mle23V4ZAwrMzzWXD_yUlnnuJU2I
- scenes-other-onboarding-legacy--invite-teammates--light:
- hash: v1.k794b7964.b321009692c9076993abf3293f39b444b5a0de60e9f33ad9514c61268c67b0f9.Sff4OWdDsvZhrrynvyIBSLot7C4WDKGgJj9lUE5G6xw
- scenes-other-onboarding-legacy--link-data--dark:
- hash: v1.k794b7964.828df4ef7165ed3f499cd537a0736ca466ade56ce1240eca8cd2c53e4d61a0c3.tdcAQqeTtI2AAdbqVAZ7BuN6t7M3kddOD9RscrVFSHs
- scenes-other-onboarding-legacy--link-data--light:
- hash: v1.k794b7964.a1764d104f9bee8fc24b2d82dc48af09c05601ccd3dc5702a548695e317e44ad.vXnSXeasRm0c5H4PqpVw60q028hKBIG8iTje8ybRl1A
- scenes-other-onboarding-legacy--product-analytics-configuration--dark:
- hash: v1.k794b7964.6f834052c8a378b2333a0e29af48690cd5af020996e37a2f17db93ad6ce633d8.jHLRS7XA-Fxo-nSdd5EWxESsdDyvn1_xQJN_-PCmOoU
- scenes-other-onboarding-legacy--product-analytics-configuration--light:
- hash: v1.k794b7964.b72bbd8a480c7e258bdb54df1135288175406039d38a4abd2dacb9c9ff8680e9.2za2VYP-QBPMoGPs_qsPqQfhv9relZpsqeuLGRUFRRI
- scenes-other-onboarding-legacy--sdk-install--dark:
- hash: v1.k794b7964.7330c83edfd2941c6e8bafd370833f78811d64c24eb0651b5fed1aa65a1ae92c.mcIkO6HoTGE8f1_ZVoe2sAUEl9_ra4AXQXzuk4A-qC4
- scenes-other-onboarding-legacy--sdk-install--light:
- hash: v1.k794b7964.0ba723ee2a80877e1932c7d2acf020e6609b48c135dadd1b373d543a16b9c9fd.JuGVHLraoVHfkzhmxJ4DhZmTF8E9vNSDEsjwIHm2dag
- scenes-other-onboarding-legacy--session-replay-configuration--dark:
- hash: v1.k794b7964.5188f1f4d29f588e4748cce42eb73551fdca103cf689d6db48e5a6697c3607b6.CbZS7atuGZ4cCc-nycTUGZlAXFX4B40Ig4-lKJnxde8
- scenes-other-onboarding-legacy--session-replay-configuration--light:
- hash: v1.k794b7964.d9a2fbc77602732abc2b695d54067fc2dbd35f21d6bf2feb7450e9e2075268e4.mIrjS0SJRC-RMYlMy9hIPgWZLD5DFkhj9tr-oBg4Cog
- scenes-other-onboarding-legacy--session-replay-opt-in--dark:
- hash: v1.k794b7964.b975a0956a96c853a10e1465e241a5da17270a0623eaf91f33ee3d7316919af9.EQxuftED8UoDZzWyu6g7Au3omMN3SlSlF37cybaGBm0
- scenes-other-onboarding-legacy--session-replay-opt-in--light:
- hash: v1.k794b7964.54bf20c2e3688be5ba5e72e312fd99a526b15c390a9a09078656fc1bce795321.ymDWEcjMHxlRpv0YHtb3j6pzbjpHrOTd2_ptDWZ64ak
- scenes-other-onboarding-legacy--source-maps--dark:
- hash: v1.k794b7964.69c11a4c17733b1eb50034eaf9f2f3159e0ba6fb309561c71af22871113f6395.LhjcKnbRqvM4pXSRi0kNqzGuKngLonR9qZ7H_c9G62M
- scenes-other-onboarding-legacy--source-maps--light:
- hash: v1.k794b7964.7e73a74eb1712ee7060b5f3936aad25964735df481592df24599492f47dfad0f.9x9w_l51wrOrCX8u3ske1ii2xb_p1ll5YxgQXF4AaQ0
- scenes-other-onboarding-legacy--workflows-custom-installation-instructions--dark:
- hash: v1.k794b7964.58d884a875b31838dae008fee1296e31ff14431660e80a784183180908e6bd00.6cqKl0DrfDQdYA7Fmj7nfnXVkc-gHEx4g1Ic2cdHqrE
- scenes-other-onboarding-legacy--workflows-custom-installation-instructions--light:
- hash: v1.k794b7964.17092eca0ff9136a1d63d8429f8f6a05cae68bdd049641feafe485344eb0b13f.f6mpDKkYwjsA7aJRnwphvzeCdtHlC5sK6xR2C86ZPew
- scenes-other-onboarding-legacy-install-step--cloud-run-in-progress--dark:
- hash: v1.k794b7964.e4bed66f82482546428488ad1c90c7fcb04c34773b6fd76cf23056a3499829e2.o3TSTMqEWj8MZnSsAx_A3FOeYc93PD7eFooCjuFTLc8
- scenes-other-onboarding-legacy-install-step--cloud-run-in-progress--light:
- hash: v1.k794b7964.45b7838d843cb2240e0aebf4ccc3d9b890242f27154b516551adc847ecb8a4c2.DjSFIWqchzdUtGR5NIjpqCAMGHME7ktiYP23E6Niwx8
- scenes-other-onboarding-legacy-install-step--control-arm--dark:
- hash: v1.k794b7964.7330c83edfd2941c6e8bafd370833f78811d64c24eb0651b5fed1aa65a1ae92c.QD_SWmICIWaQbDGySOXp27FESsmHsZJjF9f7OhMqwhI
- scenes-other-onboarding-legacy-install-step--control-arm--light:
- hash: v1.k794b7964.3b52f763a5afc6f02a87e25fa496e50e339aa94bd7d6164ab196423936d2bd26.suDjyGu71gHsy0ARNmBOkNiP5514VJ8XABwWGJOZMWQ
- scenes-other-onboarding-legacy-install-step--test-arm--dark:
- hash: v1.k794b7964.b40bac6b5824d88e285994412642719fea7db9011f01045b77eb2e424ee6c2b4.8HQN2j82VxNv6UZIaguRAYgJoACc94HjaXzY0cLmYXY
- scenes-other-onboarding-legacy-install-step--test-arm--light:
- hash: v1.k794b7964.2cc126454c17b051a8811d7bc1416625f2199764b6eebc043f264700027a5827.CbAvjk_Mec0_1mqBIrljCsRF4EYuDXWr5ZD_tZjgJ1U
- scenes-other-onboarding-legacy-product-selection--base--dark:
- hash: v1.k794b7964.b60ec49c9c54425935da72dee08b9af582389d080594a5ab04047940ea3d2ca0.5slgGa-IfOpuzeaG9ZhdnxIzZsVmazqvHffcaAuJdF8
- scenes-other-onboarding-legacy-product-selection--base--light:
- hash: v1.k794b7964.e5c1b8b7d8fee3b4c6a4cc3703ee0e1b2f7b00a89209abe8f6ce3a24e4fa8c39.hb-GH8yGKVGBsp8eHzSgd9Q1VnKVRqFRnPCgqc7bxTY
- scenes-other-onboarding-self-driving--use-cases-dark--dark:
- hash: v1.k794b7964.13ed270c2382666d6706206318fe89909f9e4fa55e4d078ac6533d9de1d9cc4d.-Px7mb7nBZKF4CgZh6LeUu2HigFFY9Ekz7q058_eAoI
- scenes-other-onboarding-self-driving--use-cases-light--light:
- hash: v1.k794b7964.86dea779bf351956c16111d82adbf36ba97e2f6b15c1d9085f805cf0da9708dc._E1OxAZBAIR5kz_QXW1PGHM6zMQqUsihMxcCnkp9AqI
+ scenes-other-onboarding--ai-observability-sdk-install--dark:
+ hash: v1.k794b7964.99b591d1a81bf5348da5564b8380b3a0f5d2ee720d624fc198a0db099da8605b.Dss3uZ6TjFEIb8TX_b0lrLjmh87ZvqO96RU5LcfAld4
+ scenes-other-onboarding--ai-observability-sdk-install--light:
+ hash: v1.k794b7964.32d9b7b59052431c97def2934189b7c082f55963f2eb90dfe604c29db584ea5b.jWPBTuIG-_5DDjN24_KA1xuwUJnsQnCVYbUMUo_7AzI
+ scenes-other-onboarding--ai-observability-sdk-install-with-cloud-run-flag--dark:
+ hash: v1.k794b7964.99b591d1a81bf5348da5564b8380b3a0f5d2ee720d624fc198a0db099da8605b.wX4MHhE7fbYCXaOlsmTg5XXuPiRX_vby-IJTJkzT70g
+ scenes-other-onboarding--ai-observability-sdk-install-with-cloud-run-flag--light:
+ hash: v1.k794b7964.32d9b7b59052431c97def2934189b7c082f55963f2eb90dfe604c29db584ea5b.l6brHKy8JSO8-nkw-zvd9_wlhxxvAzp4AOSxLNDnnko
+ scenes-other-onboarding--alerts--dark:
+ hash: v1.k794b7964.bb15a17dab8c6d94d7fce821c4eb5530e6c5e353a6f158134443b2e77e344b11.uRoH5DqZUWqQzdv8c5pM__vNu1MjSvicrhSdKKREUnw
+ scenes-other-onboarding--alerts--light:
+ hash: v1.k794b7964.21e6ef1f8c2c589ce4074621afcabf4e86ca9fc1e2868add32a874c5ded4d321.hJC_cGlXcoR6qmDXbGMfn7MuAQBgGc4l1OeMYH8PTbY
+ scenes-other-onboarding--authorized-domains--dark:
+ hash: v1.k794b7964.172cdc3b0b8630a4cb917e41cbcecc808b75bc5cbd55d22ed6787ad65e543f8a.lDuGbeLTdcsKqJOZzgeKDjTBdAnUexaX_tM2o27ezuA
+ scenes-other-onboarding--authorized-domains--light:
+ hash: v1.k794b7964.4cdfd50200dd260e39e6909da0885ee9e4ae4f55898cc6d4d7dbfb279d870059.DojZMDrI-JXpE4agxE53C1gZiMHBuDTKy-HS3hWBLO8
+ scenes-other-onboarding--billing-plans--dark:
+ hash: v1.k794b7964.01c268865e65caaab99dd3bd76861f0e859e98df70300f24191eb34b81b54a50.02BmbKtnwUkpv5AjU7QAqVMMI4VGbZ7Rb_o-HUtu9P8
+ scenes-other-onboarding--billing-plans--light:
+ hash: v1.k794b7964.52f4d16abf9c741136b3a4881b600e20ec27199bfa0730a948e252ea27f8a1a8.ybOmbsBnKnUFLt-Oue6U6FYW4Tuqv5ESgQn6_bdcU-4
+ scenes-other-onboarding--invite-teammates--dark:
+ hash: v1.k794b7964.a1945a1198f52fd3a9b17456c6b30acfadc3551f4a6a2f8b2eb3cc1daa529506.nmpeKcQ7BpAkRjQYboI-xKUIEI317HgaVTR-JVzRIys
+ scenes-other-onboarding--invite-teammates--light:
+ hash: v1.k794b7964.a95a004d5a9fd58d8aac75c172c80158b09e9e4ed4ca1fdbac391f932da96019.lALF94ys_iqlq6UwJB3CSA9WDsrKaSSG13UYI16w5Qc
+ scenes-other-onboarding--link-data--dark:
+ hash: v1.k794b7964.a6e97b04e0d3434ddda2cf8629d93baec151fc1d7cd458651f87f5d8a0b0ed85.dPlfvraK7wOKgZMDh7_KYQidk6BaflvSt5wufd2kBmQ
+ scenes-other-onboarding--link-data--light:
+ hash: v1.k794b7964.680ac56ee2f3f6a614fd0331b38e64d404acf96936c6066ab4c31859f6f2b6cc.oxNUYvvFLC3KWGFXBRRHu001KbJX81vkECp0ruLLgUU
+ scenes-other-onboarding--product-analytics-configuration--dark:
+ hash: v1.k794b7964.b514e09f17855a9e1443f3e1f96f7a955219cc535ad038da0d7da84558308870.RIXw3ktl7uF1wHl_XJODdCC5mGWoU4WMaa81qbnDE18
+ scenes-other-onboarding--product-analytics-configuration--light:
+ hash: v1.k794b7964.ab7c6555aac1606b13277bb37e980da9feab594bf84907ed7f341d5567fa3d3c.Sn8H5UIg4w-xvGU41vmCnPdoNaWETZJ_38e9B62rEXw
+ scenes-other-onboarding--sdk-install--dark:
+ hash: v1.k794b7964.3f953504a96f3d295e23721dbd39a6282ce5f719a7b7a50ca2f083c3c061660c.AaYe6HyJOq-J0IDdL_Iu3wJ5kHSSRkg5gIPzqRzB5uo
+ scenes-other-onboarding--sdk-install--light:
+ hash: v1.k794b7964.03f1893573652b0c32218385c83819272c30e7a87647ea479aa6c17100efa604.1KE0I10oG1Cfcl7IyLI6n9Wvw_0ipoS21uZhrEJRqvQ
+ scenes-other-onboarding--session-replay-configuration--dark:
+ hash: v1.k794b7964.53a16b04178eb3346c8589d3d51804548580372721faa6517b10bce388e9d45f.Zqg1N7ez03g_PNyRpSEqtbXOOGOqisAftmJAobkUO3c
+ scenes-other-onboarding--session-replay-configuration--light:
+ hash: v1.k794b7964.ae59448799162aad40465604d063ddc12c352c26185eaee9fd7446c82ea51539.b5-1cx8vFT67YuQWOLLvcBeIS9g7286wRvl1yNFvPzM
+ scenes-other-onboarding--session-replay-opt-in--dark:
+ hash: v1.k794b7964.1f3e47fa2db5dddd25b77b82f4ba2f5cb8a25f42b1677da26052a119d9a0642d.KoDRLsTqDRJ4QgX4Gln_YAgCSICl-zQ016Ij6CZ7jHg
+ scenes-other-onboarding--session-replay-opt-in--light:
+ hash: v1.k794b7964.35fe17fa90492ec9286aa5257b9eebf8b3d62143f2da83a99c61e0194783302a.YJWL_zoBV7PaiEl1QTRa37vNzaKXxB9Lbrq0eFS5UAs
+ scenes-other-onboarding--source-maps--dark:
+ hash: v1.k794b7964.a7881a38d7336d8d874adcea59e42d26de574cc38a3028444b48610a2735f973.-XBFbm_GJwOPSdZfT76gqTdmE1RcNmxOuE1rIHZEQ4U
+ scenes-other-onboarding--source-maps--light:
+ hash: v1.k794b7964.9c49408675ee2594b032aaaca5bd6ef9002b2f6d17b58203780e00f4ebf2d7c3.QzcwBedfbSdrOvC2aR3EfiOh_5Q7MEyTIvvhqyknDfc
+ scenes-other-onboarding--workflows-custom-installation-instructions--dark:
+ hash: v1.k794b7964.a355f36bf002a119233c8592bebd8c34a0d3aad8050a01a81d2593f1e32ca904.wr-z1hhmoZg1XERZ_bK76Xjx--dCEmDeb87X8neB598
+ scenes-other-onboarding--workflows-custom-installation-instructions--light:
+ hash: v1.k794b7964.0edcc48dfab6e88670a09070350f73a96c21d160bf38ea8027f26492fae286fb.oUJvy8bgtNdYIhWFnn5-9uI7PlAkT21f6ExVDx6jANc
+ scenes-other-onboarding-install-step--cloud-run-in-progress--dark:
+ hash: v1.k794b7964.ad4fcfa9cc9df360e913fcda6c88237211750e26c604be536444594031a508f6.WIDlaN8ByKeWnqddw6vjZiSEB7EC48tw6dQs9Bqxaxc
+ scenes-other-onboarding-install-step--cloud-run-in-progress--light:
+ hash: v1.k794b7964.704c60485fa45afb873967e81cc163e00b9677ddf65387390bfba267fcf32baf.POic8YLlFQHnGLJxe9Lfd92NFXKK9-NhJ19lENha1T0
+ scenes-other-onboarding-install-step--control-arm--dark:
+ hash: v1.k794b7964.3f953504a96f3d295e23721dbd39a6282ce5f719a7b7a50ca2f083c3c061660c.S12DDcG_kP6-5Y0hlBTZFDKUKAuzTBP9kPXFlqI0umE
+ scenes-other-onboarding-install-step--control-arm--light:
+ hash: v1.k794b7964.03f1893573652b0c32218385c83819272c30e7a87647ea479aa6c17100efa604.Ullr23ou7-8Q_0mO44avKU97VGRSbZGcK96bg8Hlwyk
+ scenes-other-onboarding-install-step--test-arm--dark:
+ hash: v1.k794b7964.02e757ddb1ee8fd40b5b20f4ffa67c2c01adef3aa14454056ef9bff28c73565c.9MnHMgx2YubgCwkEhohWJUbiMaOfaxOKCsHsCGqA9Mk
+ scenes-other-onboarding-install-step--test-arm--light:
+ hash: v1.k794b7964.949de7407890712b6d3d2fd9ded05dded417bf9b56cab651746e4df685d179c9.uRQ5qMOFesy07o3rzNVchTwmhmqEhiGnZTzDyvx4Q4k
+ scenes-other-onboarding-product-selection--base--dark:
+ hash: v1.k794b7964.b60ec49c9c54425935da72dee08b9af582389d080594a5ab04047940ea3d2ca0.BUp2Cv79bdb2-k0twgulEJlDBQ_Ipk0dL-SoQ-3MiD4
+ scenes-other-onboarding-product-selection--base--light:
+ hash: v1.k794b7964.e5c1b8b7d8fee3b4c6a4cc3703ee0e1b2f7b00a89209abe8f6ce3a24e4fa8c39.AGzFde75eRPi_uCkV3I1rh8AYJsOfU_7GVRrQ-hYiZ4
scenes-other-onboarding-shared-installation-progress--all-states--dark:
hash: v1.k794b7964.f27ec49d9f5135f7c07e378091bebea93949d910823f9f9d498f162baa1e5536.j1ZpoUvgIKsVhfaOTJ5j5M9ycLq6FAL3o1w-7te1Rqw
scenes-other-onboarding-shared-installation-progress--all-states--light:
@@ -15487,9 +15451,9 @@ snapshots:
scenes-other-onboarding-shared-wizard-cloud-run--playground--light:
hash: v1.k794b7964.89b12fe7e6f467daa70d1e8e2b0775c620137ebf940fd1dd1cdb8fc6e6d6d51f.L4uxBbKm6JjeA_3zz9amB89ihed2ZNAaUXpLmyLNX7I
scenes-other-onboarding-shared-wizard-cloud-run--pull-request-queued--dark:
- hash: v1.k794b7964.3069f1824db30b78cdb1142ad23c4d2cce49abe8e3919dc8ddc91d2c44dc8c47.sSk9IT_qsJUC2r_UP3L3JN7rnu9mgm88YK2eCSaTU1U
+ hash: v1.k794b7964.c2039ff14cc4b1bdf6222d7f10fd5da815cb0b31472c468f6688aa0037692bed.YHla-5uZOW2jdpA5p5GKOIKBlt-kLBp4-hz2pvqHEDg
scenes-other-onboarding-shared-wizard-cloud-run--pull-request-queued--light:
- hash: v1.k794b7964.7ec7e9d1698b2e62f5228a13c1991d64086be0fbc9840457922b154816df2431.nTPGOZUNcBJ1gNrgTQKjPqKNAbhaFCjmCARBoKuu2lo
+ hash: v1.k794b7964.50e1266f1e861c917bb687103cc9d91e1d5f50838bc4a5777876eef5b7a26cab.xjGijhzQBDZPiWD6RrPXspib-56zWH6CmaWT5_gz_yA
scenes-other-onboarding-shared-wizard-cloud-run--repo-picker-open--dark:
hash: v1.k794b7964.86fa9c4496b5d280b84b90c0302a90fe624103308f8950fe74fe20fb82007366.sHbVDI4ZO7poJbeaA1bkMpEoMiMJcPqysKIJw8Bi6aw
scenes-other-onboarding-shared-wizard-cloud-run--repo-picker-open--light:
diff --git a/frontend/src/layout/navigation-3000/navigationLogic.tsx b/frontend/src/layout/navigation-3000/navigationLogic.tsx
index aeddab0125a5..b36f83441574 100644
--- a/frontend/src/layout/navigation-3000/navigationLogic.tsx
+++ b/frontend/src/layout/navigation-3000/navigationLogic.tsx
@@ -3,10 +3,7 @@ import { router } from 'kea-router'
import { subscriptions } from 'kea-subscriptions'
import posthog from 'posthog-js'
-import { FEATURE_FLAGS } from 'lib/constants'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { isEmbeddedPageFrame } from 'lib/utils/embeddedPageFrame'
-import { onboardingVariantChrome, resolveOnboardingFlowVariant } from 'scenes/onboarding/onboardingVariants'
import { organizationLogic } from 'scenes/organizationLogic'
import { projectLogic } from 'scenes/projectLogic'
import { sceneLogic } from 'scenes/sceneLogic'
@@ -55,8 +52,7 @@ export interface navigation3000LogicMeta {
isCurrentOrganizationUnavailable: boolean,
currentProject: ProjectType | null,
zenMode: boolean,
- activeSceneId: string | null,
- featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet
+ activeSceneId: string | null
) => Navigation3000Mode
}
}
@@ -113,21 +109,13 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
},
],
mode: [
- (s) => [
- s.sceneConfig,
- s.isCurrentOrganizationUnavailable,
- s.currentProject,
- s.zenMode,
- s.activeSceneId,
- featureFlagLogic.selectors.featureFlags,
- ],
+ (s) => [s.sceneConfig, s.isCurrentOrganizationUnavailable, s.currentProject, s.zenMode, s.activeSceneId],
(
sceneConfig: null | import('scenes/sceneTypes').SceneConfig,
isCurrentOrganizationUnavailable: boolean,
currentProject: import('~/types').ProjectType | null,
zenMode: boolean,
- activeSceneId: string | null,
- featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet
+ activeSceneId: string | null
): Navigation3000Mode => {
// An embedded page frame sits inside another app page, so it shows the scene alone.
if (isEmbeddedPageFrame()) {
@@ -141,16 +129,8 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
return 'minimal'
}
if (sceneConfig?.layout === 'plain' && !sceneConfig.allowUnauthenticated) {
- if (activeSceneId === Scene.Onboarding) {
- // A flow variant can opt to own the whole viewport (no navbar); the
- // existing ONBOARDING_NAVBAR='hide' flag stays as a separate override.
- const variantHidesNavbar =
- onboardingVariantChrome(resolveOnboardingFlowVariant(featureFlags)) === 'none'
- if (variantHidesNavbar || featureFlags[FEATURE_FLAGS.ONBOARDING_NAVBAR] === 'hide') {
- return 'none'
- }
- }
- return 'minimal'
+ // Onboarding owns the whole viewport, so it gets no navbar.
+ return activeSceneId === Scene.Onboarding ? 'none' : 'minimal'
}
return sceneConfig?.layout !== 'plain' ? 'full' : 'none'
},
diff --git a/frontend/src/layout/panel-layout/InstallationStatusNavButton.stories.tsx b/frontend/src/layout/panel-layout/InstallationStatusNavButton.stories.tsx
deleted file mode 100644
index 8e84ba8e3d7b..000000000000
--- a/frontend/src/layout/panel-layout/InstallationStatusNavButton.stories.tsx
+++ /dev/null
@@ -1,272 +0,0 @@
-import { MOCK_TEAM_ID } from 'lib/api.mock'
-
-import type { Meta, StoryObj } from '@storybook/react'
-import { useMountedLogic } from 'kea'
-import { useEffect } from 'react'
-
-import { activeCloudRunLogic, type CloudRunHandle } from 'scenes/onboarding/shared/wizard-sync/activeCloudRunLogic'
-import { wizardActiveSessionDetectorLogic } from 'scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic'
-import { projectLogic } from 'scenes/projectLogic'
-import { teamLogic } from 'scenes/teamLogic'
-
-import { InstallationStatusNavButton } from './InstallationStatusNavButton'
-import { installationStatusNavLogic } from './installationStatusNavLogic'
-
-type Story = StoryObj<typeof InstallationStatusNavButton>
-
-const meta: Meta<typeof InstallationStatusNavButton> = {
- title: 'Layout/Nav Bar/Installation Status',
- component: InstallationStatusNavButton,
- parameters: {
- layout: 'padded',
- viewMode: 'story',
- featureFlags: [{ 'onboarding-wizard-sidebar': 'test' }],
- msw: {
- mocks: {
- get: {
- '/api/projects/:projectId/wizard/sessions/latest/': () => [204, ''],
- },
- },
- },
- mockDate: '2024-05-01 12:00:00',
- },
- decorators: [
- (Story) => (
- <div className="w-[240px] bg-surface-primary rounded border border-primary overflow-hidden">
- <div className="p-2 border-b border-primary text-xs text-muted uppercase tracking-wide">Sidebar</div>
- <div className="p-1 flex flex-col gap-px">
- <Story />
- </div>
- </div>
- ),
- ],
- args: {
- iconOnly: false,
- },
- argTypes: {
- iconOnly: { control: 'boolean' },
- },
-}
-
-export default meta
-
-// ── Helpers ──────────────────────────────────────────────────────────────────
-
-function makeCloudRunHandle(overrides?: Partial<CloudRunHandle>): CloudRunHandle {
- const startedAt = new Date(Date.now() - 134_000).toISOString()
- return {
- taskId: 'task-abc',
- runId: 'run-xyz',
- startedAt,
- ...overrides,
- }
-}
-
-/** Hook: sets the team as fully onboarded. */
-function useTeamOnboarded(): void {
- useMountedLogic(teamLogic)
- useEffect(() => {
- teamLogic.actions.loadCurrentTeamSuccess({
- id: 1,
- name: 'Test Team',
- completed_snippet_onboarding: true,
- has_completed_onboarding_for: { product_analytics: true },
- ingested_event: true,
- is_demo: false,
- } as any)
- }, [])
-}
-
-/** Hook: sets the team as not yet onboarded. */
-function useTeamNotOnboarded(): void {
- useMountedLogic(teamLogic)
- useEffect(() => {
- teamLogic.actions.loadCurrentTeamSuccess({
- id: 1,
- name: 'Test Team',
- completed_snippet_onboarding: false,
- has_completed_onboarding_for: {},
- ingested_event: false,
- is_demo: false,
- } as any)
- }, [])
-}
-
-/** Hook: simulates an active cloud run. */
-function useCloudRun(overrides?: Partial<CloudRunHandle>): void {
- useMountedLogic(activeCloudRunLogic)
- useEffect(() => {
- const handle = makeCloudRunHandle(overrides)
- // The handle is project-scoped; stamp whichever project the storybook environment resolves.
- activeCloudRunLogic.actions.setActiveCloudRun(
- handle.taskId,
- handle.runId,
- handle.startedAt!,
- projectLogic.values.currentProjectId ?? MOCK_TEAM_ID
- )
- }, [overrides])
-}
-
-/** Hook: simulates an active local wizard session. */
-function useLocalSession(): void {
- useMountedLogic(wizardActiveSessionDetectorLogic)
- useEffect(() => {
- wizardActiveSessionDetectorLogic.actions.markActive('posthog-integration')
- }, [])
-}
-
-// ── Stories ──────────────────────────────────────────────────────────────────
-
-/** Flag is off — the component does not render. */
-export const FlagOff: Story = {
- parameters: {
- featureFlags: [],
- },
- decorators: [
- (Story) => {
- useTeamNotOnboarded()
- return <Story />
- },
- ],
-}
-
-/** User is fully onboarded and there is no active run — nothing to show. */
-export const Hidden: Story = {
- decorators: [
- (Story) => {
- useTeamOnboarded()
- return <Story />
- },
- ],
-}
-
-/** User hasn't completed onboarding — muted "Complete setup" dot. */
-export const IncompleteOnboarding: Story = {
- decorators: [
- (Story) => {
- useTeamNotOnboarded()
- return <Story />
- },
- ],
-}
-
-/** Cloud run in progress — pulsing accent dot, elapsed time. */
-export const CloudRunInProgress: Story = {
- decorators: [
- (Story) => {
- useTeamOnboarded()
- useCloudRun({ startedAt: new Date(Date.now() - 60_000).toISOString() })
- return <Story />
- },
- ],
-}
-
-/** Local wizard session detected — pulsing accent dot. */
-export const LocalSessionActive: Story = {
- decorators: [
- (Story) => {
- useMountedLogic(installationStatusNavLogic)
- useTeamOnboarded()
- useLocalSession()
- return <Story />
- },
- ],
-}
-
-/** Collapsed sidebar — iconOnly mode. */
-export const CollapsedNav: Story = {
- args: {
- iconOnly: true,
- },
- decorators: [
- (Story) => {
- useTeamNotOnboarded()
- return <Story />
- },
- ],
-}
-
-/** Collapsed nav with a cloud run in progress. */
-export const CollapsedNavCloudRun: Story = {
- args: {
- iconOnly: true,
- },
- decorators: [
- (Story) => {
- useTeamOnboarded()
- useCloudRun({ startedAt: new Date(Date.now() - 60_000).toISOString() })
- return <Story />
- },
- ],
-}
-
-// ── Gallery ──────────────────────────────────────────────────────────────────
-
-function StateBlock({ label, children }: { label: string; children: React.ReactNode }): JSX.Element {
- return (
- <div className="flex flex-col gap-1">
- <span className="text-xs text-muted">{label}</span>
- <div className="w-[240px] bg-surface-primary rounded border border-primary overflow-hidden">
- <div className="p-2 border-b border-primary text-xs text-muted uppercase tracking-wide">Sidebar</div>
- <div className="p-1 flex flex-col gap-px">{children}</div>
- </div>
- </div>
- )
-}
-
-/** Wraps the button with team set to fully onboarded (no run active → hidden). */
-function OnboardedVariant(): JSX.Element {
- useMountedLogic(installationStatusNavLogic)
- useTeamOnboarded()
- return <InstallationStatusNavButton iconOnly={false} />
-}
-
-/** Wraps the button with team not onboarded. */
-function NotOnboardedVariant({ iconOnly }: { iconOnly: boolean }): JSX.Element {
- useMountedLogic(installationStatusNavLogic)
- useTeamNotOnboarded()
- return <InstallationStatusNavButton iconOnly={iconOnly} />
-}
-
-/** Wraps the button with a cloud run in progress. */
-function CloudRunVariant({ iconOnly, startedAtOffset }: { iconOnly: boolean; startedAtOffset: number }): JSX.Element {
- useMountedLogic(installationStatusNavLogic)
- useTeamOnboarded()
- useCloudRun({ startedAt: new Date(Date.now() - startedAtOffset).toISOString() })
- return <InstallationStatusNavButton iconOnly={iconOnly} />
-}
-
-/** Wraps the button with a local session active. */
-function LocalSessionVariant({ iconOnly }: { iconOnly: boolean }): JSX.Element {
- useMountedLogic(installationStatusNavLogic)
- useTeamOnboarded()
- useLocalSession()
- return <InstallationStatusNavButton iconOnly={iconOnly} />
-}
-
-/** Every state in one frame for side-by-side review. */
-export const AllStates: Story = {
- parameters: { controls: { disable: true } },
- render: () => (
- <div className="flex flex-col gap-4">
- <StateBlock label="Hidden (onboarded)">
- <OnboardedVariant />
- </StateBlock>
- <StateBlock label="Incomplete onboarding">
- <NotOnboardedVariant iconOnly={false} />
- </StateBlock>
- <StateBlock label="Cloud run in progress">
- <CloudRunVariant iconOnly={false} startedAtOffset={60_000} />
- </StateBlock>
- <StateBlock label="Local session active">
- <LocalSessionVariant iconOnly={false} />
- </StateBlock>
- <StateBlock label="Collapsed (incomplete)">
- <NotOnboardedVariant iconOnly={true} />
- </StateBlock>
- <StateBlock label="Collapsed (cloud run)">
- <CloudRunVariant iconOnly={true} startedAtOffset={60_000} />
- </StateBlock>
- </div>
- ),
-}
diff --git a/frontend/src/layout/panel-layout/InstallationStatusNavButton.tsx b/frontend/src/layout/panel-layout/InstallationStatusNavButton.tsx
deleted file mode 100644
index 1ffe2f719c6a..000000000000
--- a/frontend/src/layout/panel-layout/InstallationStatusNavButton.tsx
+++ /dev/null
@@ -1,188 +0,0 @@
-import { useActions, useMountedLogic, useValues } from 'kea'
-import { useEffect, useRef, useState } from 'react'
-
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { cn } from 'lib/utils/css-classes'
-import { elapsedSecondsFrom } from 'lib/utils/datetime'
-import { activeCloudRunLogic, type CloudRunHandle } from 'scenes/onboarding/shared/wizard-sync/activeCloudRunLogic'
-import { installationProgressLogic } from 'scenes/onboarding/shared/wizard-sync/installationProgressLogic'
-import { wizardActiveSessionDetectorLogic } from 'scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic'
-import { urls } from 'scenes/urls'
-
-import { installationStatusNavLogic, type NavInstallationPhase } from './installationStatusNavLogic'
-
-// 1Hz clock — only ticks while `enabled` is true (i.e. a run with startedAt is active).
-function useNow(enabled: boolean): number {
- const [now, setNow] = useState(() => Date.now())
- useEffect(() => {
- if (!enabled) {
- return
- }
- const id = window.setInterval(() => setNow(Date.now()), 1000)
- return () => window.clearInterval(id)
- }, [enabled])
- return now
-}
-
-function phaseDotClass(phase: NavInstallationPhase): string {
- switch (phase) {
- case 'completed':
- return 'bg-success'
- case 'error':
- return 'bg-danger'
- case 'idle':
- return 'bg-muted'
- case 'connecting':
- case 'running':
- return 'bg-accent animate-pulse'
- }
-}
-
-/**
- * Mounts `installationProgressLogic` only when a cloud run is active, and reports the phase
- * back to the parent via a callback. This avoids opening a wizard-session SSE connection for
- * every authenticated user — the logic's `afterMount` calls `connectSession()`, and
- * `wizardSessionStreamLogic` has no empty-workflow guard. Mirrors the `WizardSyncLocalGate` pattern.
- */
-function CloudRunPhaseReporter({
- handle,
- onPhase,
-}: {
- handle: CloudRunHandle
- onPhase: (phase: NavInstallationPhase | null) => void
-}): null {
- const { installationProgress } = useValues(
- installationProgressLogic({ mode: 'cloud', runId: handle.runId, taskId: handle.taskId })
- )
- useEffect(() => {
- onPhase(installationProgress.isCurrent ? installationProgress.phase : null)
- }, [installationProgress, onPhase])
- return null
-}
-
-/**
- * A small running status indicator shown in the sidebar footer, gated behind
- * `ONBOARDING_WIZARD_SIDEBAR`. Surfaces an active wizard run (cloud or local)
- * or, when onboarding is incomplete, a "Complete setup" link.
- *
- * Follows the same icon/menu pattern as NotificationsMenu — adapts to collapsed
- * vs expanded nav via `ButtonPrimitive`'s `iconOnly` / `menuItem` props.
- */
-export function InstallationStatusNavButton({ iconOnly = false }: { iconOnly?: boolean }): JSX.Element | null {
- const sidebarEnabled = useFeatureFlag('ONBOARDING_WIZARD_SIDEBAR', 'test')
- // Gate BEFORE mounting any logic: the inner component mounts the session detector (directly and
- // via installationStatusNavLogic's connect), whose afterMount starts a 60s REST poll. Flag-off
- // users must not pay that traffic (INC-886 pattern, mirrors WizardSyncLocalGate).
- if (!sidebarEnabled) {
- return null
- }
- return <InstallationStatusNavButtonInner iconOnly={iconOnly} />
-}
-
-function InstallationStatusNavButtonInner({ iconOnly }: { iconOnly: boolean }): JSX.Element | null {
- const { shouldShow, isRunActive, phase: logicPhase } = useValues(installationStatusNavLogic)
- const { openDialog } = useActions(installationStatusNavLogic)
-
- // The detector must be mounted to run the cheap REST poll that surfaces local sessions.
- useMountedLogic(wizardActiveSessionDetectorLogic)
- const { activeCloudRun } = useValues(activeCloudRunLogic)
-
- // Cloud-run phase is reported via a child component that only mounts when a run is active —
- // avoids opening an SSE stream for every user on every page (INC-886 pattern).
- const [cloudPhase, setCloudPhase] = useState<NavInstallationPhase | null>(null)
- const handlePhase = useRef(setCloudPhase)
- handlePhase.current = setCloudPhase
-
- // Derive the effective phase: prefer cloud progress when available, fall back to the logic phase.
- const effectivePhase: NavInstallationPhase = cloudPhase ?? logicPhase
-
- // Elapsed time — only meaningful for cloud runs (we have the kickoff timestamp).
- const startedAt = activeCloudRun?.startedAt ?? null
- const showElapsed = !!startedAt && isRunActive
- const now = useNow(showElapsed)
- const elapsedSeconds = startedAt ? elapsedSecondsFrom(startedAt, now) : 0
-
- // Pulse when the dot's phase changes.
- const [badgePulse, setBadgePulse] = useState(false)
- const prevPhaseRef = useRef(effectivePhase)
- useEffect(() => {
- if (effectivePhase !== prevPhaseRef.current) {
- prevPhaseRef.current = effectivePhase
- setBadgePulse(true)
- const timer = window.setTimeout(() => setBadgePulse(false), 600)
- return () => window.clearTimeout(timer)
- }
- }, [effectivePhase])
-
- if (!shouldShow) {
- return null
- }
-
- const handleClick = (): void => {
- if (isRunActive) {
- openDialog()
- } else {
- window.location.href = urls.onboarding()
- }
- }
-
- const tooltipParts: string[] = []
- if (isRunActive) {
- if (effectivePhase === 'completed') {
- tooltipParts.push('PostHog setup complete')
- } else if (effectivePhase === 'error') {
- tooltipParts.push('Setup encountered an error')
- } else {
- tooltipParts.push('PostHog setup is in progress')
- }
- if (showElapsed) {
- const m = Math.floor(elapsedSeconds / 60)
- const s = Math.floor(elapsedSeconds % 60)
- tooltipParts.push(`${m}:${s.toString().padStart(2, '0')}`)
- }
- } else {
- tooltipParts.push('Finish setting up PostHog')
- }
-
- const tooltipContent = tooltipParts.join(' · ')
- const statusLabel = isRunActive ? 'Installation status' : 'Complete setup'
-
- return (
- <>
- {activeCloudRun && <CloudRunPhaseReporter handle={activeCloudRun} onPhase={handlePhase.current} />}
- <ButtonPrimitive
- tooltip={iconOnly ? tooltipContent : undefined}
- tooltipPlacement="right"
- tooltipCloseDelayMs={0}
- iconOnly={iconOnly}
- menuItem={!iconOnly}
- onClick={handleClick}
- className="group"
- data-attr="installation-status-nav-button"
- >
- <span
- className={cn(
- 'flex text-secondary group-hover:text-primary transition-transform duration-300',
- badgePulse ? 'scale-125' : 'scale-100'
- )}
- >
- <span className={cn('inline-block size-2 rounded-full', phaseDotClass(effectivePhase))} />
- </span>
- {!iconOnly && (
- <>
- <span className="-ml-[2px]">{statusLabel}</span>
- {showElapsed && (
- <span className="ml-auto text-xs text-muted tabular-nums">
- {Math.floor(elapsedSeconds / 60)}:
- {Math.floor(elapsedSeconds % 60)
- .toString()
- .padStart(2, '0')}
- </span>
- )}
- </>
- )}
- </ButtonPrimitive>
- </>
- )
-}
diff --git a/frontend/src/layout/panel-layout/installationStatusNavLogic.ts b/frontend/src/layout/panel-layout/installationStatusNavLogic.ts
deleted file mode 100644
index fb8fcab91df1..000000000000
--- a/frontend/src/layout/panel-layout/installationStatusNavLogic.ts
+++ /dev/null
@@ -1,132 +0,0 @@
-import { MakeLogicType, connect, kea, path, selectors } from 'kea'
-
-import { activeCloudRunLogic } from 'scenes/onboarding/shared/wizard-sync/activeCloudRunLogic'
-import { wizardActiveSessionDetectorLogic } from 'scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic'
-import { wizardSyncUiLogic } from 'scenes/onboarding/shared/wizard-sync/wizardSyncUiLogic'
-import { teamLogic } from 'scenes/teamLogic'
-
-import type { CloudRunHandle } from '../../scenes/onboarding/shared/wizard-sync/activeCloudRunLogic'
-import type { TeamPublicType, TeamType } from '../../types'
-
-export type NavInstallationPhase = 'running' | 'completed' | 'error' | 'connecting' | 'idle'
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface installationStatusNavLogicValues {
- activeCloudRun: CloudRunHandle | null // activeCloudRunLogic
- currentTeam: TeamPublicType | TeamType | null // teamLogic
- hasOnboardedAnyProduct: boolean // teamLogic
- hasActiveSession: boolean // wizardActiveSessionDetectorLogic
- dialogOpen: boolean // wizardSyncUiLogic
- inlinePanelMounted: boolean // wizardSyncUiLogic
- isRunActive: boolean
- phase: NavInstallationPhase
- shouldShow: boolean
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface installationStatusNavLogicActions {
- openDialog: () => {
- value: true
- } // wizardSyncUiLogic
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface installationStatusNavLogicMeta {
- __keaTypeGenInternalSelectorTypes: {
- shouldShow: (
- hasOnboardedAnyProduct: boolean,
- currentTeam: TeamPublicType | TeamType | null,
- activeCloudRun: CloudRunHandle | null,
- hasActiveSession: boolean,
- inlinePanelMounted: boolean
- ) => boolean
- isRunActive: (activeCloudRun: CloudRunHandle | null, hasActiveSession: boolean) => boolean
- phase: (isRunActive: boolean) => NavInstallationPhase
- }
-}
-
-export type installationStatusNavLogicType = MakeLogicType<
- installationStatusNavLogicValues,
- installationStatusNavLogicActions,
- Record<string, any>,
- installationStatusNavLogicMeta
->
-
-/**
- * Coordinates whether to show an "Installation status" item in the sidebar footer,
- * and what label / badge tone to display.
- *
- * Data sources (all already exist):
- * - `activeCloudRunLogic.activeCloudRun` — persisted cloud-run handle
- * - `wizardActiveSessionDetectorLogic.hasActiveSession` — cheap REST poll for local wizard runs
- * - `teamLogic.hasOnboardedAnyProduct`, `currentTeam.ingested_event` — onboarding relevance
- * - `wizardSyncUiLogic` — shared dialog state with the floating FAB
- */
-export const installationStatusNavLogic = kea<installationStatusNavLogicType>([
- path(['layout', 'panel-layout', 'installationStatusNavLogic']),
- connect(() => ({
- values: [
- activeCloudRunLogic,
- ['activeCloudRun'],
- wizardActiveSessionDetectorLogic,
- ['hasActiveSession'],
- teamLogic,
- ['hasOnboardedAnyProduct', 'currentTeam'],
- wizardSyncUiLogic,
- ['dialogOpen', 'inlinePanelMounted'],
- ],
- actions: [wizardSyncUiLogic, ['openDialog']],
- })),
- selectors({
- /** Whether the nav item should render at all. */
- shouldShow: [
- (s) => [
- s.hasOnboardedAnyProduct,
- s.currentTeam,
- s.activeCloudRun,
- s.hasActiveSession,
- s.inlinePanelMounted,
- ],
- (
- hasOnboardedAnyProduct: boolean,
- currentTeam: null | import('../../types').TeamPublicType | import('../../types').TeamType,
- activeCloudRun:
- | null
- | import('scenes/onboarding/shared/wizard-sync/activeCloudRunLogic').CloudRunHandle,
- hasActiveSession: boolean,
- inlinePanelMounted: boolean
- ): boolean => {
- // Panel-mounted inline progress already shows the run — avoid double-surfacing
- if (inlinePanelMounted) {
- return false
- }
- // Cloud or local run in flight
- if (activeCloudRun || hasActiveSession) {
- return true
- }
- // Onboarding is still relevant (no events yet, or no product completed)
- if (!hasOnboardedAnyProduct && currentTeam && !currentTeam.ingested_event) {
- return true
- }
- return false
- },
- ],
-
- /** Whether an active run (cloud or local) is the reason we're showing. */
- isRunActive: [
- (s) => [s.activeCloudRun, s.hasActiveSession],
- (
- activeCloudRun:
- | null
- | import('scenes/onboarding/shared/wizard-sync/activeCloudRunLogic').CloudRunHandle,
- hasActiveSession: boolean
- ): boolean => !!(activeCloudRun || hasActiveSession),
- ],
-
- /** High-level phase for the badge tone: 'running' while in flight, 'idle' for incomplete onboarding. */
- phase: [
- (s) => [s.isRunActive],
- (isRunActive: boolean): NavInstallationPhase => (isRunActive ? 'running' : 'idle'),
- ],
- }),
-])
diff --git a/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx b/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx
index 1fbf5e406f33..9ef5c75fdf80 100644
--- a/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx
+++ b/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx
@@ -14,7 +14,6 @@ import { urls } from 'scenes/urls'
import { uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-import { InstallationStatusNavButton } from '../InstallationStatusNavButton'
import { PostHogTeamCohortBanner } from './PostHogTeamCohortBanner'
export function NavBarFooter({ isLayoutNavCollapsed }: { isLayoutNavCollapsed: boolean }): JSX.Element {
@@ -42,7 +41,6 @@ export function NavBarFooter({ isLayoutNavCollapsed }: { isLayoutNavCollapsed: b
{isNotificationsEnabled && isSidebarItemShown('notifications') && (
<NotificationsMenu iconOnly={isLayoutNavCollapsed} />
)}
- <InstallationStatusNavButton iconOnly={isLayoutNavCollapsed} />
<Link
to={urls.settings('project')}
buttonProps={{ menuItem: isLayoutNavCollapsed ? false : true }}
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index c99f1d54e0ae..ec8177f3fa6c 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -466,15 +466,7 @@ export const FEATURE_FLAGS = {
NOTEBOOK_JUPYTER_MODE: 'notebook-jupyter-mode', // owner: #team-data-tools, lays notebooks out and drives them like JupyterLab
NOTEBOOK_SANDBOX_FREE_COMPUTE: 'notebook-sandbox-free-compute', // owner: #team-data-tools, shows the notebook sandbox rate crossed out at $0.00 / h
NOTEBOOK_SHARING: 'notebook-sharing', // owner: @reecejones #team-platform-features
- ONBOARDING_FLOW_VARIANT: 'onboarding-flow-variant', // owner: @fercgomes #team-growth multivariate=control,self-driving — selects the whole onboarding experience; control is the existing flow (the historical `legacy` value is an alias of control)
- ONBOARDING_HIDE_BREADCRUMBS: 'onboarding-hide-breadcrumbs', // owner: @fercgomes #team-growth, multivariate=true, hides breadcrumbs during onboarding to reduce distractions
- ONBOARDING_MOBILE_INSTALL_HELPER: 'onboarding-mobile-install-helper', // owner: @fercgomes #team-growth multivariate=control,test — target $device_type=Mobile at the flag level
- ONBOARDING_NAVBAR: 'onboarding-navbar', // owner: @fercgomes #team-growth, hides the navbar during onboarding to reduce distractions multivariate=true
- ONBOARDING_PRODUCT_SELECTION_HEADING: 'onboarding-product-selection-heading', // owner: @fercgomes #team-growth, payload overrides the heading copy on the first onboarding page
- ONBOARDING_SOCIAL_PROOF_INFO: 'onboarding-social-proof-info', // owner: @fercgomes #team-growth, payload overrides social proof strings per product
ONBOARDING_WIZARD_CLOUD_RUN: 'onboarding-wizard-cloud-run', // owner: @fercgomes #team-growth multivariate=control,test — gates the "open a PR for me" cloud wizard option on the install step
- ONBOARDING_WIZARD_SIDEBAR: 'onboarding-wizard-sidebar', // owner: @fercgomes #team-growth multivariate=control,test — gates the installation status item in the sidebar footer
- ONBOARDING_WIZARD_SYNC: 'onboarding-wizard-sync', // owner: @fercgomes #team-growth multivariate=control,test — gates the live wizard sync progress panel
ONBOARDING_WIZARD_SYNC_MODE: 'onboarding-wizard-sync-mode', // owner: @fercgomes #team-growth multivariate=sse,polling — how the wizard sync panel pulls run updates (SSE stream vs REST polling); payload carries polling_interval_secs
ORGANIZATION_BILLING_API: 'organization-billing-api', // owner: #team-billing, reads the usage and spend pages from the organization billing API; the same flag gates those routes
OWNER_ONLY_BILLING: 'owner-only-billing', // owner: @pawelcebula #team-billing
diff --git a/frontend/src/lib/utils/eventUsageLogic.test.ts b/frontend/src/lib/utils/eventUsageLogic.test.ts
index 0d11c3fd8181..451db7ed9bf1 100644
--- a/frontend/src/lib/utils/eventUsageLogic.test.ts
+++ b/frontend/src/lib/utils/eventUsageLogic.test.ts
@@ -1,7 +1,5 @@
import posthog from 'posthog-js'
-import { SELF_DRIVING_ONBOARDING_EVENT_PROPS } from 'scenes/onboarding/onboardingEventUsageLogic'
-
import { NodeKind } from '~/queries/schema/schema-general'
import type {
ExperimentFunnelMetric,
@@ -19,12 +17,12 @@ import {
type DashboardType,
FilterLogicalOperator,
FunnelVizType,
+ OnboardingStepKey,
PropertyFilterType,
StepOrderValue,
} from '~/types'
import {
- type OnboardingEventProperties,
dashboardViewedProperties,
eventUsageLogic,
getEventPropertiesForMetric,
@@ -45,16 +43,11 @@ describe('eventUsageLogic', () => {
capture.mockRestore()
})
- const cases: [string, OnboardingEventProperties | undefined, string][] = [
- ['legacy', undefined, 'product_selection'],
- ['self-driving', SELF_DRIVING_ONBOARDING_EVENT_PROPS, 'welcome'],
- ]
-
- it.each(cases)('stamps the %s entry point on every funnel event', (_, properties, entryPoint) => {
- eventUsageLogic.actions.reportOnboardingStarted(properties)
- eventUsageLogic.actions.reportOnboardingStepCompleted('install', undefined, properties)
- eventUsageLogic.actions.reportOnboardingStepSkipped('install', undefined, properties)
- eventUsageLogic.actions.reportOnboardingCompleted('product_analytics', properties)
+ it('stamps the entry point on every funnel event', () => {
+ eventUsageLogic.actions.reportOnboardingStarted()
+ eventUsageLogic.actions.reportOnboardingStepCompleted(OnboardingStepKey.INSTALL)
+ eventUsageLogic.actions.reportOnboardingStepSkipped(OnboardingStepKey.INSTALL)
+ eventUsageLogic.actions.reportOnboardingCompleted('product_analytics')
for (const event of [
'onboarding started',
@@ -63,7 +56,7 @@ describe('eventUsageLogic', () => {
'onboarding completed',
]) {
const call = capture.mock.calls.find(([name]) => name === event)
- expect(call?.[1]).toMatchObject({ entry_point: entryPoint })
+ expect(call?.[1]).toMatchObject({ entry_point: 'product_selection' })
}
})
})
diff --git a/frontend/src/lib/utils/eventUsageLogic.ts b/frontend/src/lib/utils/eventUsageLogic.ts
index 6c910a3b8084..76c416453fd0 100644
--- a/frontend/src/lib/utils/eventUsageLogic.ts
+++ b/frontend/src/lib/utils/eventUsageLogic.ts
@@ -10,7 +10,6 @@ import { preflightLogic } from 'lib/logic/preflightLogic'
import { objectClean } from 'lib/utils/objects'
import { BillingUsageInteractionProps } from 'scenes/billing/types'
import { SharedMetric } from 'scenes/experiments/SharedMetrics/sharedMetricLogic'
-import type { SelfDrivingOnboardingStepId } from 'scenes/onboarding/onboardingEventUsageLogic'
import { ProductTourEvent } from 'scenes/product-tours/constants'
import { NewSurvey, SURVEY_CREATED_SOURCE, SurveyTemplateType } from 'scenes/surveys/constants'
import { userLogic } from 'scenes/userLogic'
@@ -442,25 +441,14 @@ export type SDKSetupInstructionsSurface =
| 'settings_reverse_proxy_setup'
| 'onboarding_ai_observability'
-// GROW-89: both onboarding flows fire the same funnel event names during the transition, told apart
-// by `version` (1 = legacy, 2 = context-first redesign) and `flow_variant`. Stamping properties
-// instead of renaming keeps every existing dashboard and alert on the v1 events working. The
-// redesign's v2 events live in `scenes/onboarding/onboardingEventUsageLogic`.
-// `entry_point` names the surface the flow starts on. It rides along with every funnel event, not
-// only `started`, so a breakdown by entry point stays populated for the whole funnel.
-export type OnboardingEntryPoint = 'product_selection' | 'welcome'
-
-export type OnboardingEventProperties = {
- entry_point: OnboardingEntryPoint
- flow_variant: 'context_first' | 'legacy'
- version: 1 | 2
-}
-
-const LEGACY_ONBOARDING_EVENT_PROPS: OnboardingEventProperties = {
+// pinned: event property values. Onboarding funnel insights filter and break down on these, so
+// they keep the values the flow sent while it was one of two experiment arms. `entry_point` rides
+// along with every funnel event, not only `started`, so a breakdown by it stays populated.
+const ONBOARDING_EVENT_PROPS = {
version: 1,
flow_variant: 'legacy',
entry_point: 'product_selection',
-}
+} as const
function retentionWindowDays(metric: ExperimentRetentionMetric): number | undefined {
const unitToDays: Record<string, number> = { day: 1, week: 7, month: 30 }
@@ -1448,12 +1436,8 @@ export interface eventUsageLogicActions {
itemType: string | null | undefined
section: string
}
- reportOnboardingCompleted: (
- productKey: string,
- properties?: OnboardingEventProperties
- ) => {
+ reportOnboardingCompleted: (productKey: string) => {
productKey: string
- properties: OnboardingEventProperties | undefined
}
reportOnboardingProductToggled: (
productKey: string,
@@ -1464,26 +1448,22 @@ export interface eventUsageLogicActions {
recommendationSource: string
selected: boolean
}
- reportOnboardingStarted: (properties?: OnboardingEventProperties) => {
- properties: OnboardingEventProperties | undefined
+ reportOnboardingStarted: () => {
+ value: true
}
reportOnboardingStepCompleted: (
- stepKey: OnboardingStepKey | SelfDrivingOnboardingStepId,
- productKey?: string,
- properties?: OnboardingEventProperties
+ stepKey: OnboardingStepKey,
+ productKey?: string
) => {
productKey: string | undefined
- properties: OnboardingEventProperties | undefined
- stepKey: OnboardingStepKey | SelfDrivingOnboardingStepId
+ stepKey: OnboardingStepKey
}
reportOnboardingStepSkipped: (
- stepKey: OnboardingStepKey | SelfDrivingOnboardingStepId,
- productKey?: string,
- properties?: OnboardingEventProperties
+ stepKey: OnboardingStepKey,
+ productKey?: string
) => {
productKey: string | undefined
- properties: OnboardingEventProperties | undefined
- stepKey: OnboardingStepKey | SelfDrivingOnboardingStepId
+ stepKey: OnboardingStepKey
}
reportOnboardingUseCaseSelected: (
useCase: string,
@@ -2148,31 +2128,16 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
}),
reportProductTourListViewed: true,
reportProductUnsubscribed: (product: string) => ({ product }),
- reportOnboardingStarted: (properties?: OnboardingEventProperties) => ({
- properties,
- }),
- reportOnboardingStepCompleted: (
- stepKey: OnboardingStepKey | SelfDrivingOnboardingStepId,
- productKey?: string,
- properties?: OnboardingEventProperties
- ) => ({
+ reportOnboardingStarted: true,
+ reportOnboardingStepCompleted: (stepKey: OnboardingStepKey, productKey?: string) => ({
stepKey,
productKey,
- properties,
}),
- reportOnboardingStepSkipped: (
- stepKey: OnboardingStepKey | SelfDrivingOnboardingStepId,
- productKey?: string,
- properties?: OnboardingEventProperties
- ) => ({
+ reportOnboardingStepSkipped: (stepKey: OnboardingStepKey, productKey?: string) => ({
stepKey,
productKey,
- properties,
- }),
- reportOnboardingCompleted: (productKey: string, properties?: OnboardingEventProperties) => ({
- productKey,
- properties,
}),
+ reportOnboardingCompleted: (productKey: string) => ({ productKey }),
reportOnboardingUseCaseSelected: (useCase: string, recommendedProducts: readonly string[]) => ({
useCase,
recommendedProducts,
@@ -3034,42 +2999,36 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
})
},
// onboarding
- reportOnboardingStarted: ({ properties }) => {
- posthog.capture('onboarding started', {
- ...LEGACY_ONBOARDING_EVENT_PROPS,
- ...properties,
- })
+ reportOnboardingStarted: () => {
+ posthog.capture('onboarding started', ONBOARDING_EVENT_PROPS)
},
- reportOnboardingStepCompleted: ({ stepKey, productKey, properties }) => {
+ reportOnboardingStepCompleted: ({ stepKey, productKey }) => {
posthog.capture('onboarding step completed', {
step_key: stepKey,
// Optional — only set when the caller knows which product owns the step.
// Lets dashboards split step funnels by product without joining elsewhere.
...(productKey ? { product_key: productKey } : {}),
- ...LEGACY_ONBOARDING_EVENT_PROPS,
- ...properties,
+ ...ONBOARDING_EVENT_PROPS,
})
},
- reportOnboardingStepSkipped: ({ stepKey, productKey, properties }) => {
+ reportOnboardingStepSkipped: ({ stepKey, productKey }) => {
posthog.capture('onboarding step skipped', {
step_key: stepKey,
...(productKey ? { product_key: productKey } : {}),
- ...LEGACY_ONBOARDING_EVENT_PROPS,
- ...properties,
+ ...ONBOARDING_EVENT_PROPS,
})
},
- reportOnboardingCompleted: ({ productKey, properties }) => {
+ reportOnboardingCompleted: ({ productKey }) => {
posthog.capture('onboarding completed', {
product_key: productKey,
- ...LEGACY_ONBOARDING_EVENT_PROPS,
- ...properties,
+ ...ONBOARDING_EVENT_PROPS,
})
},
reportOnboardingUseCaseSelected: ({ useCase, recommendedProducts }) => {
posthog.capture('onboarding use case selected', {
use_case: useCase,
recommended_products: recommendedProducts,
- ...LEGACY_ONBOARDING_EVENT_PROPS,
+ ...ONBOARDING_EVENT_PROPS,
})
},
reportOnboardingProductToggled: ({ productKey, selected, recommendationSource }) => {
@@ -3077,7 +3036,7 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
product_key: productKey,
selected,
recommendation_source: recommendationSource,
- ...LEGACY_ONBOARDING_EVENT_PROPS,
+ ...ONBOARDING_EVENT_PROPS,
})
},
reportSDKSelected: ({ sdk }) => {
diff --git a/frontend/src/scenes/appScenes.ts b/frontend/src/scenes/appScenes.ts
index 050aafc0e780..8a540663f26b 100644
--- a/frontend/src/scenes/appScenes.ts
+++ b/frontend/src/scenes/appScenes.ts
@@ -67,7 +67,7 @@ export const appScenes: Record<Scene | string, () => any> = {
[Scene.Notebooks]: () => import('./notebooks/NotebooksScene'),
[Scene.OAuthAuthorize]: () => import('./oauth/OAuthAuthorize'),
[Scene.Onboarding]: () => import('./onboarding/Onboarding'),
- [Scene.OnboardingCoupon]: () => import('./onboarding/legacy/coupon/OnboardingCouponRedemption'),
+ [Scene.OnboardingCoupon]: () => import('./onboarding/coupon/OnboardingCouponRedemption'),
[Scene.OrganizationCreateFirst]: () => import('./organization/Create'),
[Scene.OrganizationCreationConfirm]: () => import('./organization/ConfirmOrganization/ConfirmOrganization'),
[Scene.PasswordResetComplete]: () => import('./authentication/password-reset/PasswordResetComplete'),
diff --git a/frontend/src/scenes/onboarding/Onboarding.stories.tsx b/frontend/src/scenes/onboarding/Onboarding.stories.tsx
index 0a318c1d19e6..51689b08b9a0 100644
--- a/frontend/src/scenes/onboarding/Onboarding.stories.tsx
+++ b/frontend/src/scenes/onboarding/Onboarding.stories.tsx
@@ -16,10 +16,10 @@ import preflightJson from '~/mocks/fixtures/_preflight.json'
import { ProductKey } from '~/queries/schema/schema-general'
import { OnboardingStepKey } from '~/types'
-import { onboardingLogic } from './legacy/onboardingLogic'
+import { onboardingLogic } from './onboardingLogic'
const meta: Meta = {
- title: 'Scenes-Other/Onboarding/Legacy',
+ title: 'Scenes-Other/Onboarding',
parameters: {
layout: 'fullscreen',
viewMode: 'story',
diff --git a/frontend/src/scenes/onboarding/Onboarding.tsx b/frontend/src/scenes/onboarding/Onboarding.tsx
index ece91e1825cc..1429c0e14c26 100644
--- a/frontend/src/scenes/onboarding/Onboarding.tsx
+++ b/frontend/src/scenes/onboarding/Onboarding.tsx
@@ -1,26 +1,37 @@
import './Onboarding.scss'
+import clsx from 'clsx'
import { useValues } from 'kea'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
+import { Logo } from 'lib/brand'
import { SceneExport } from 'scenes/sceneTypes'
-import { onboardingLogic } from './legacy/onboardingLogic'
-import { onboardingVariantRegistry } from './onboardingVariantRegistry'
-import { resolveOnboardingFlowVariant } from './onboardingVariants'
+import { OnboardingFlowHost } from './OnboardingFlowHost'
+import { onboardingLogic } from './onboardingLogic'
+import { ProductSelectionShell } from './productSelection/ProductSelectionShell'
export const scene: SceneExport = {
component: Onboarding,
logic: onboardingLogic,
}
+const CARD_CLASSES =
+ 'relative w-full min-h-0 flex flex-col overflow-visible p-0 sm:max-h-[calc(100dvh-7rem)] sm:overflow-y-auto sm:p-8 md:p-10 sm:bg-surface-primary sm:rounded-2xl sm:shadow-[0_16px_40px_rgb(30_50_10_/_25%)] sm:border sm:border-primary'
+
/**
- * Onboarding scene shell.
+ * Renders product selection until a product is chosen, then hands off to the flow host.
*/
export function Onboarding(): JSX.Element | null {
- const { featureFlags } = useValues(featureFlagLogic)
- const onboardingFlowVariant = resolveOnboardingFlowVariant(featureFlags)
+ const { productKey } = useValues(onboardingLogic)
- const VariantComponent = onboardingVariantRegistry[onboardingFlowVariant] ?? onboardingVariantRegistry.legacy
- return <VariantComponent />
+ return (
+ <div className="OnboardingDottedBg min-h-screen flex flex-col items-center justify-center p-4 sm:p-6">
+ <span className="block mb-6">
+ <Logo size="lg" />
+ </span>
+ <div className={clsx(CARD_CLASSES, productKey ? 'max-w-5xl' : 'max-w-6xl')}>
+ {productKey ? <OnboardingFlowHost /> : <ProductSelectionShell />}
+ </div>
+ </div>
+ )
}
diff --git a/frontend/src/scenes/onboarding/legacy/OnboardingFlowHost.tsx b/frontend/src/scenes/onboarding/OnboardingFlowHost.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/OnboardingFlowHost.tsx
rename to frontend/src/scenes/onboarding/OnboardingFlowHost.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/OnboardingInviteTeammates.tsx b/frontend/src/scenes/onboarding/OnboardingInviteTeammates.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/OnboardingInviteTeammates.tsx
rename to frontend/src/scenes/onboarding/OnboardingInviteTeammates.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/OnboardingProductConfiguration.tsx b/frontend/src/scenes/onboarding/OnboardingProductConfiguration.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/OnboardingProductConfiguration.tsx
rename to frontend/src/scenes/onboarding/OnboardingProductConfiguration.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/OnboardingSessionReplayConfiguration.tsx b/frontend/src/scenes/onboarding/OnboardingSessionReplayConfiguration.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/OnboardingSessionReplayConfiguration.tsx
rename to frontend/src/scenes/onboarding/OnboardingSessionReplayConfiguration.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/OnboardingStep.tsx b/frontend/src/scenes/onboarding/OnboardingStep.tsx
similarity index 98%
rename from frontend/src/scenes/onboarding/legacy/OnboardingStep.tsx
rename to frontend/src/scenes/onboarding/OnboardingStep.tsx
index 4efcc15b690e..220da5a509fc 100644
--- a/frontend/src/scenes/onboarding/legacy/OnboardingStep.tsx
+++ b/frontend/src/scenes/onboarding/OnboardingStep.tsx
@@ -10,7 +10,6 @@ import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { OnboardingStepKey } from '~/types'
-import { OnboardingBreadcrumbs } from './OnboardingBreadcrumbs'
import { stepKeyToTitle } from './onboardingFlowUtils'
import { onboardingLogic } from './onboardingLogic'
@@ -88,7 +87,6 @@ export const OnboardingStep = ({
<>
<div className="pb-2">
<div className={`text-secondary max-w-screen-md mx-auto ${hideHeader && 'hidden'}`}>
- <OnboardingBreadcrumbs />
<div className="flex flex-col sm:flex-row sm:justify-between sm:items-center items-start gap-2 mt-3 px-4 sm:px-0">
{!hideTitle && (
<h1 className={clsx('font-bold m-0 px-0 sm:px-2 sm:shrink-0', fullWidth && 'text-center')}>
diff --git a/frontend/src/scenes/onboarding/legacy/billing/FreeTierLimits.tsx b/frontend/src/scenes/onboarding/billing/FreeTierLimits.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/billing/FreeTierLimits.tsx
rename to frontend/src/scenes/onboarding/billing/FreeTierLimits.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/billing/OnboardingUpgradeStep.tsx b/frontend/src/scenes/onboarding/billing/OnboardingUpgradeStep.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/billing/OnboardingUpgradeStep.tsx
rename to frontend/src/scenes/onboarding/billing/OnboardingUpgradeStep.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/billing/PlanCards.scss b/frontend/src/scenes/onboarding/billing/PlanCards.scss
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/billing/PlanCards.scss
rename to frontend/src/scenes/onboarding/billing/PlanCards.scss
diff --git a/frontend/src/scenes/onboarding/legacy/billing/PlanCards.test.ts b/frontend/src/scenes/onboarding/billing/PlanCards.test.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/billing/PlanCards.test.ts
rename to frontend/src/scenes/onboarding/billing/PlanCards.test.ts
diff --git a/frontend/src/scenes/onboarding/legacy/billing/PlanCards.tsx b/frontend/src/scenes/onboarding/billing/PlanCards.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/billing/PlanCards.tsx
rename to frontend/src/scenes/onboarding/billing/PlanCards.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/coupon/OnboardingCouponRedemption.tsx b/frontend/src/scenes/onboarding/coupon/OnboardingCouponRedemption.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/coupon/OnboardingCouponRedemption.tsx
rename to frontend/src/scenes/onboarding/coupon/OnboardingCouponRedemption.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx b/frontend/src/scenes/onboarding/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx
rename to frontend/src/scenes/onboarding/data-warehouse/OnboardingDataWarehouseSourcesStep.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingAlertsStep.tsx b/frontend/src/scenes/onboarding/error-tracking/OnboardingErrorTrackingAlertsStep.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingAlertsStep.tsx
rename to frontend/src/scenes/onboarding/error-tracking/OnboardingErrorTrackingAlertsStep.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingSourceMapsModal.tsx b/frontend/src/scenes/onboarding/error-tracking/OnboardingErrorTrackingSourceMapsModal.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingSourceMapsModal.tsx
rename to frontend/src/scenes/onboarding/error-tracking/OnboardingErrorTrackingSourceMapsModal.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingSourceMapsStep.tsx b/frontend/src/scenes/onboarding/error-tracking/OnboardingErrorTrackingSourceMapsStep.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingSourceMapsStep.tsx
rename to frontend/src/scenes/onboarding/error-tracking/OnboardingErrorTrackingSourceMapsStep.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/onboardingErrorTrackingAlertsLogic.ts b/frontend/src/scenes/onboarding/error-tracking/onboardingErrorTrackingAlertsLogic.ts
similarity index 99%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/onboardingErrorTrackingAlertsLogic.ts
rename to frontend/src/scenes/onboarding/error-tracking/onboardingErrorTrackingAlertsLogic.ts
index 0cdd0bb2b2e7..a2bad7840054 100644
--- a/frontend/src/scenes/onboarding/legacy/error-tracking/onboardingErrorTrackingAlertsLogic.ts
+++ b/frontend/src/scenes/onboarding/error-tracking/onboardingErrorTrackingAlertsLogic.ts
@@ -11,7 +11,7 @@ import { errorTrackingIssueLinkHogTemplate } from 'scenes/hog-functions/sub-temp
import { HogFunctionConfigurationType } from '~/types'
-import type { IntegrationType } from '../../../../types'
+import type { IntegrationType } from '../../../types'
import { onboardingLogic } from '../onboardingLogic'
export type ErrorTrackingAlertIntegrationType = 'slack' | 'microsoft-teams' | 'discord'
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapOptionCard.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapOptionCard.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapOptionCard.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapOptionCard.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapStatus.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapStatus.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapStatus.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapStatus.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapsAPIKeyBanner.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapsAPIKeyBanner.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapsAPIKeyBanner.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapsAPIKeyBanner.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapsSDKInstructionsMap.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapsSDKInstructionsMap.tsx
similarity index 91%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapsSDKInstructionsMap.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapsSDKInstructionsMap.tsx
index b3d22ff0654a..9e06dfdd17e0 100644
--- a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/SourceMapsSDKInstructionsMap.tsx
+++ b/frontend/src/scenes/onboarding/error-tracking/source-maps/SourceMapsSDKInstructionsMap.tsx
@@ -1,4 +1,4 @@
-import { ALL_SDKS } from 'scenes/onboarding/legacy/sdks/allSDKs'
+import { ALL_SDKS } from 'scenes/onboarding/sdks/allSDKs'
import { SDKInstructionsMap, SDKKey } from '~/types'
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/VerifySourceMaps.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/VerifySourceMaps.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/VerifySourceMaps.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/VerifySourceMaps.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/automated-technologies/IOSSourceMapsInstructions.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/automated-technologies/IOSSourceMapsInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/automated-technologies/IOSSourceMapsInstructions.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/automated-technologies/IOSSourceMapsInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/automated-technologies/NextJSSourceMapsInstructions.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/automated-technologies/NextJSSourceMapsInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/automated-technologies/NextJSSourceMapsInstructions.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/automated-technologies/NextJSSourceMapsInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/automated-technologies/NuxtSourceMapsInstructions.tsx b/frontend/src/scenes/onboarding/error-tracking/source-maps/automated-technologies/NuxtSourceMapsInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/automated-technologies/NuxtSourceMapsInstructions.tsx
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/automated-technologies/NuxtSourceMapsInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/sourceMapsStepLogic.ts b/frontend/src/scenes/onboarding/error-tracking/source-maps/sourceMapsStepLogic.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/error-tracking/source-maps/sourceMapsStepLogic.ts
rename to frontend/src/scenes/onboarding/error-tracking/source-maps/sourceMapsStepLogic.ts
diff --git a/frontend/src/scenes/onboarding/legacy/exit/OnboardingExitAction.tsx b/frontend/src/scenes/onboarding/exit/OnboardingExitAction.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/exit/OnboardingExitAction.tsx
rename to frontend/src/scenes/onboarding/exit/OnboardingExitAction.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/exit/OnboardingExitModal.test.ts b/frontend/src/scenes/onboarding/exit/OnboardingExitModal.test.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/exit/OnboardingExitModal.test.ts
rename to frontend/src/scenes/onboarding/exit/OnboardingExitModal.test.ts
diff --git a/frontend/src/scenes/onboarding/legacy/exit/OnboardingExitModal.tsx b/frontend/src/scenes/onboarding/exit/OnboardingExitModal.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/exit/OnboardingExitModal.tsx
rename to frontend/src/scenes/onboarding/exit/OnboardingExitModal.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/exit/index.ts b/frontend/src/scenes/onboarding/exit/index.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/exit/index.ts
rename to frontend/src/scenes/onboarding/exit/index.ts
diff --git a/frontend/src/scenes/onboarding/legacy/exit/onboardingExitLogic.ts b/frontend/src/scenes/onboarding/exit/onboardingExitLogic.ts
similarity index 99%
rename from frontend/src/scenes/onboarding/legacy/exit/onboardingExitLogic.ts
rename to frontend/src/scenes/onboarding/exit/onboardingExitLogic.ts
index 49b6a877b1f4..94cf8ddad7cd 100644
--- a/frontend/src/scenes/onboarding/legacy/exit/onboardingExitLogic.ts
+++ b/frontend/src/scenes/onboarding/exit/onboardingExitLogic.ts
@@ -10,7 +10,7 @@ import { userLogic } from 'scenes/userLogic'
import { invitesDelegateCreate } from '~/generated/core/api'
import { UserType } from '~/types'
-import type { OnboardingStepKey } from '../../../../types'
+import type { OnboardingStepKey } from '../../../types'
import { onboardingLogic } from '../onboardingLogic'
const isValidEmail = (email: string): boolean => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.trim())
diff --git a/frontend/src/scenes/onboarding/legacy/LegacyOnboarding.tsx b/frontend/src/scenes/onboarding/legacy/LegacyOnboarding.tsx
deleted file mode 100644
index fead1a6b3be8..000000000000
--- a/frontend/src/scenes/onboarding/legacy/LegacyOnboarding.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import clsx from 'clsx'
-import { useValues } from 'kea'
-
-import { Logo } from 'lib/brand'
-
-import { OnboardingFlowHost } from './OnboardingFlowHost'
-import { onboardingLogic } from './onboardingLogic'
-import { ProductSelectionShell } from './productSelection/ProductSelectionShell'
-
-const CARD_CLASSES =
- 'relative w-full min-h-0 flex flex-col overflow-visible p-0 sm:max-h-[calc(100dvh-7rem)] sm:overflow-y-auto sm:p-8 md:p-10 sm:bg-surface-primary sm:rounded-2xl sm:shadow-[0_16px_40px_rgb(30_50_10_/_25%)] sm:border sm:border-primary'
-
-/**
- * Host for the existing ("legacy") onboarding experience. Renders product selection until a
- * product is chosen, then hands off to the flow host. Selected via `onboardingVariantRegistry`.
- */
-export function LegacyOnboarding(): JSX.Element | null {
- const { productKey } = useValues(onboardingLogic)
-
- return (
- <div className="OnboardingDottedBg min-h-screen flex flex-col items-center justify-center p-4 sm:p-6">
- <span className="block mb-6">
- <Logo size="lg" />
- </span>
- <div className={clsx(CARD_CLASSES, productKey ? 'max-w-5xl' : 'max-w-6xl')}>
- {productKey ? <OnboardingFlowHost /> : <ProductSelectionShell />}
- </div>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/legacy/OnboardingBreadcrumbs.tsx b/frontend/src/scenes/onboarding/legacy/OnboardingBreadcrumbs.tsx
deleted file mode 100644
index a12abcd831ef..000000000000
--- a/frontend/src/scenes/onboarding/legacy/OnboardingBreadcrumbs.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import clsx from 'clsx'
-import { useActions, useValues } from 'kea'
-import React from 'react'
-
-import { IconChevronRight } from '@posthog/icons'
-import { Link } from '@posthog/lemon-ui'
-
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
-import { availableOnboardingProducts } from 'scenes/onboarding/shared/utils'
-
-import { stepKeyToTitle } from './onboardingFlowUtils'
-import { onboardingLogic } from './onboardingLogic'
-
-export function OnboardingBreadcrumbs(): JSX.Element | null {
- const { flow, currentFlowStep } = useValues(onboardingLogic)
- const { setStepId } = useActions(onboardingLogic)
- const hideBreadcrumbs = useFeatureFlag('ONBOARDING_HIDE_BREADCRUMBS', 'test')
-
- if (hideBreadcrumbs) {
- return null
- }
-
- const stepCount = flow.length
- const activeId = currentFlowStep?.id
-
- // Disambiguate duplicate step types by appending the product name. This keeps a
- // flow like `Install (PA) → Install (SR) → Install (WA)` readable instead of three
- // identical "Install" labels.
- const stepKeyCounts = flow.reduce<Record<string, number>>((acc, step) => {
- acc[step.stepKey] = (acc[step.stepKey] ?? 0) + 1
- return acc
- }, {})
- const labelForStep = (step: (typeof flow)[number]): string => {
- if (step.label) {
- return step.label
- }
- const base = stepKeyToTitle(step.stepKey) ?? step.stepKey
- if (stepKeyCounts[step.stepKey] > 1) {
- const productName =
- availableOnboardingProducts[step.productKey as keyof typeof availableOnboardingProducts]?.name
- if (productName) {
- // Middle dot scopes the product name as a qualifier rather than reading
- // as one phrase ("Install · Web Analytics" instead of "Install Web Analytics").
- // Product names use the registry's Title Case ("Product Analytics",
- // "AI observability") as-is — these are proper-noun product names.
- // A deduped step covers other products too; the step subtitle names the full set.
- return `${base} · ${productName}`
- }
- }
- return base
- }
-
- return (
- <div
- className="flex items-center justify-start gap-x-3 px-4 sm:px-2 w-full overflow-x-auto [mask-image:linear-gradient(to_right,black_calc(100%-24px),transparent)] sm:[mask-image:none]"
- data-attr="onboarding-breadcrumbs"
- >
- {flow.map((step, idx) => {
- const highlightStep = step.id === activeId
- const label = labelForStep(step)
- return (
- <React.Fragment key={`stepId-${step.id}-${idx}`}>
- <Link
- className={clsx('text-sm shrink-0 whitespace-nowrap', highlightStep && 'font-bold')}
- data-text={label}
- key={step.id}
- onClick={() => setStepId(step.id)}
- >
- <span className={clsx('text-sm', !highlightStep && 'text-muted')}>{label}</span>
- </Link>
- {stepCount > 1 && idx !== stepCount - 1 && <IconChevronRight className="text-xl shrink-0" />}
- </React.Fragment>
- )
- })}
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/NextButton.test.tsx b/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/NextButton.test.tsx
deleted file mode 100644
index 96a9617e20f7..000000000000
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/NextButton.test.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import '@testing-library/jest-dom'
-
-import { cleanup, fireEvent, render, screen } from '@testing-library/react'
-import posthog from 'posthog-js'
-
-import { ProductKey } from '~/queries/schema/schema-general'
-import { initKeaTests } from '~/test/init'
-
-import { onboardingLogic } from '../../onboardingLogic'
-import { NextButton } from './NextButton'
-
-describe('NextButton', () => {
- let logic: ReturnType<typeof onboardingLogic.build>
-
- beforeEach(() => {
- localStorage.clear()
- initKeaTests()
- logic = onboardingLogic()
- logic.mount()
- logic.actions.setProductKey(ProductKey.PRODUCT_ANALYTICS)
- logic.actions.setStepId('install:product_analytics')
- })
-
- afterEach(() => {
- logic.unmount()
- cleanup()
- })
-
- it('falls back to the legacy step machine when no override is supplied', () => {
- render(<NextButton installationComplete={false} />)
-
- fireEvent.click(screen.getByText('Skip installation'))
-
- expect(logic.values.stepId).toBe('configure:product_analytics')
- })
-
- it('calls the supplied override instead of the legacy step machine (self-driving)', () => {
- // Regression test for the self-driving "Skip installation" dead click: the modal
- // that hosts this button reuses the legacy NextButton, which used to always dispatch
- // into the legacy onboardingLogic step machine that self-driving never reads.
- const onAdvance = jest.fn()
- const capture = jest.spyOn(posthog, 'capture')
-
- render(<NextButton installationComplete={false} onAdvance={onAdvance} />)
-
- fireEvent.click(screen.getByText('Skip installation'))
-
- expect(onAdvance).toHaveBeenCalledTimes(1)
- // The legacy machine must stay untouched when an override is supplied.
- expect(logic.values.stepId).toBe('install:product_analytics')
- expect(capture.mock.calls.map((call) => call[0])).toContain('onboarding step skipped')
-
- capture.mockRestore()
- })
-})
diff --git a/frontend/src/scenes/onboarding/legacy/onboardingDelegationState.test.ts b/frontend/src/scenes/onboarding/onboardingDelegationState.test.ts
similarity index 98%
rename from frontend/src/scenes/onboarding/legacy/onboardingDelegationState.test.ts
rename to frontend/src/scenes/onboarding/onboardingDelegationState.test.ts
index 41c2509933fd..2b007add5865 100644
--- a/frontend/src/scenes/onboarding/legacy/onboardingDelegationState.test.ts
+++ b/frontend/src/scenes/onboarding/onboardingDelegationState.test.ts
@@ -1,7 +1,7 @@
import {
hasPendingDelegationForCurrentOrg,
isOnboardingRedirectSuppressed,
-} from 'scenes/onboarding/legacy/onboardingDelegationState'
+} from 'scenes/onboarding/onboardingDelegationState'
describe('hasPendingDelegationForCurrentOrg', () => {
it('returns true for pending delegation in current org', () => {
diff --git a/frontend/src/scenes/onboarding/legacy/onboardingDelegationState.ts b/frontend/src/scenes/onboarding/onboardingDelegationState.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/onboardingDelegationState.ts
rename to frontend/src/scenes/onboarding/onboardingDelegationState.ts
diff --git a/frontend/src/scenes/onboarding/onboardingEventUsageLogic.ts b/frontend/src/scenes/onboarding/onboardingEventUsageLogic.ts
index 24b64740774d..df175129e6d4 100644
--- a/frontend/src/scenes/onboarding/onboardingEventUsageLogic.ts
+++ b/frontend/src/scenes/onboarding/onboardingEventUsageLogic.ts
@@ -3,24 +3,6 @@ import posthog from 'posthog-js'
import { FEATURE_FLAGS } from 'lib/constants'
import { featureFlagLogic, type FeatureFlagsSet } from 'lib/logic/featureFlagLogic'
-import type { OnboardingEventProperties } from 'lib/utils/eventUsageLogic'
-
-import { resolveOnboardingFlowVariant } from './onboardingVariants'
-
-export type SelfDrivingOnboardingStepId =
- | 'welcome'
- | 'goals'
- | 'tools'
- | 'install'
- | 'authorized-urls'
- | 'ai-observability'
- | 'billing'
-
-export const SELF_DRIVING_ONBOARDING_EVENT_PROPS: OnboardingEventProperties = {
- version: 2,
- flow_variant: 'context_first',
- entry_point: 'welcome',
-}
export type CloudRunExperimentArm = 'control' | 'test'
@@ -31,22 +13,20 @@ export function resolveCloudRunExperimentArm(featureFlags: FeatureFlagsSet): Clo
function wizardSyncEventProps(featureFlags: FeatureFlagsSet): {
version: 2
- flow_variant: string
+ flow_variant: 'legacy'
cloud_run_experiment_arm: CloudRunExperimentArm | null
} {
return {
version: 2,
- flow_variant: resolveOnboardingFlowVariant(featureFlags) === 'self-driving' ? 'context_first' : 'legacy',
+ // pinned: event property value. Insights filter on `flow_variant`, so it keeps the value
+ // the flow sent while it was one of two experiment arms.
+ flow_variant: 'legacy',
cloud_run_experiment_arm: resolveCloudRunExperimentArm(featureFlags),
}
}
const reportedHandoffShownRuns = new Set<string>()
-export function resetCloudRunExperimentExposureForTests(): void {
- reportedHandoffShownRuns.clear()
-}
-
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface onboardingEventUsageLogicValues {
featureFlags: FeatureFlagsSet // featureFlagLogic
@@ -74,31 +54,9 @@ export interface onboardingEventUsageLogicActions {
runId: string
taskId: string
}
- reportOnboardingGoalSelected: (goal: string) => {
- goal: string
- }
reportOnboardingInstallModeSelected: (mode: 'cloud' | 'local' | 'manual') => {
mode: 'cloud' | 'local' | 'manual'
}
- reportOnboardingInstallVerified: () => {}
- reportOnboardingPlanSelected: (plan: 'free' | 'pay_as_you_go') => {
- plan: 'free' | 'pay_as_you_go'
- }
- reportOnboardingSelfDrivingExplainerClicked: (stepKey: SelfDrivingOnboardingStepId) => {
- stepKey: SelfDrivingOnboardingStepId
- }
- reportOnboardingStepViewed: (stepId: SelfDrivingOnboardingStepId) => {
- stepId: SelfDrivingOnboardingStepId
- }
- reportOnboardingUseCaseSelected: (
- useCase: string,
- recommendedProducts: readonly string[],
- properties?: OnboardingEventProperties
- ) => {
- properties: OnboardingEventProperties | undefined
- recommendedProducts: readonly string[]
- useCase: string
- }
reportWizardSyncExpanded: (props: { mode: 'cloud' | 'local'; phase: string; runKey: string }) => {
mode: 'cloud' | 'local'
phase: string
@@ -158,21 +116,7 @@ export const onboardingEventUsageLogic = kea<onboardingEventUsageLogicType>([
values: [featureFlagLogic, ['featureFlags']],
})),
actions({
- reportOnboardingStepViewed: (stepId: SelfDrivingOnboardingStepId) => ({ stepId }),
- reportOnboardingGoalSelected: (goal: string) => ({ goal }),
- reportOnboardingUseCaseSelected: (
- useCase: string,
- recommendedProducts: readonly string[],
- properties?: OnboardingEventProperties
- ) => ({
- useCase,
- recommendedProducts,
- properties,
- }),
reportOnboardingInstallModeSelected: (mode: 'cloud' | 'local' | 'manual') => ({ mode }),
- reportOnboardingSelfDrivingExplainerClicked: (stepKey: SelfDrivingOnboardingStepId) => ({ stepKey }),
- reportOnboardingInstallVerified: () => ({}),
- reportOnboardingPlanSelected: (plan: 'free' | 'pay_as_you_go') => ({ plan }),
reportOnboardingCloudRunQueued: (props: { taskId: string; runId: string; repository: string }) => props,
reportOnboardingCloudRunCompleted: (props: {
taskId: string
@@ -204,50 +148,12 @@ export const onboardingEventUsageLogic = kea<onboardingEventUsageLogicType>([
}) => props,
}),
listeners(({ values }) => ({
- reportOnboardingStepViewed: ({ stepId }) => {
- posthog.capture('onboarding step viewed', {
- step_key: stepId,
- ...SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- })
- },
- reportOnboardingGoalSelected: ({ goal }) => {
- posthog.capture('onboarding goal selected', {
- goal,
- ...SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- })
- },
- reportOnboardingUseCaseSelected: ({ useCase, recommendedProducts, properties }) => {
- posthog.capture('onboarding use case selected', {
- use_case: useCase,
- recommended_products: recommendedProducts,
- ...SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- ...properties,
- })
- },
reportOnboardingInstallModeSelected: ({ mode }) => {
posthog.capture('onboarding install mode selected', {
mode,
...wizardSyncEventProps(values.featureFlags),
})
},
- reportOnboardingSelfDrivingExplainerClicked: ({ stepKey }) => {
- posthog.capture('onboarding self-driving explainer clicked', {
- step_key: stepKey,
- ...SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- })
- },
- reportOnboardingInstallVerified: () => {
- posthog.capture('onboarding installation verified', {
- step_key: 'install',
- ...SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- })
- },
- reportOnboardingPlanSelected: ({ plan }) => {
- posthog.capture('onboarding plan selected', {
- plan,
- ...SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- })
- },
reportOnboardingCloudRunQueued: ({ taskId, runId }) => {
posthog.capture('onboarding cloud run queued', {
task_id: taskId,
diff --git a/frontend/src/scenes/onboarding/legacy/onboardingFlowUtils.ts b/frontend/src/scenes/onboarding/onboardingFlowUtils.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/onboardingFlowUtils.ts
rename to frontend/src/scenes/onboarding/onboardingFlowUtils.ts
diff --git a/frontend/src/scenes/onboarding/legacy/onboardingLogic.test.ts b/frontend/src/scenes/onboarding/onboardingLogic.test.ts
similarity index 92%
rename from frontend/src/scenes/onboarding/legacy/onboardingLogic.test.ts
rename to frontend/src/scenes/onboarding/onboardingLogic.test.ts
index fc9a9a51f648..35339da35967 100644
--- a/frontend/src/scenes/onboarding/legacy/onboardingLogic.test.ts
+++ b/frontend/src/scenes/onboarding/onboardingLogic.test.ts
@@ -678,61 +678,13 @@ describe('onboardingLogic — flow composition', () => {
})
})
- describe('onboardingFlowVariant', () => {
- const setVariant = (value: string | boolean | undefined): void => {
- featureFlagLogic
- .findMounted()
- ?.actions.setFeatureFlags(
- value === undefined ? [] : [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT],
- value === undefined ? {} : { [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]: value }
- )
- }
-
- it('falls back to legacy when the flag is not set', () => {
- // Default test env sets no feature flags — the missing-flag path must resolve to legacy.
- expect(logic.values.onboardingFlowVariant).toBe('legacy')
- })
-
- it('falls back to legacy when the flag resolves to a boolean (non-string) value', () => {
- setVariant(true)
- expect(logic.values.onboardingFlowVariant).toBe('legacy')
- })
-
- it('maps the original control flag value to legacy', () => {
- setVariant('control')
- expect(logic.values.onboardingFlowVariant).toBe('legacy')
- })
-
- it('returns self-driving when the flag selects it', () => {
- setVariant('self-driving')
- expect(logic.values.onboardingFlowVariant).toBe('self-driving')
- })
-
- it('falls back to legacy for an unregistered variant', () => {
- setVariant('some_future_variant')
- expect(logic.values.onboardingFlowVariant).toBe('legacy')
- })
- })
-
- describe('completion redirect gate', () => {
- const setVariant = (value: string | undefined): void => {
- featureFlagLogic
- .findMounted()
- ?.actions.setFeatureFlags(
- value === undefined ? [] : [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT],
- value === undefined ? {} : { [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]: value }
- )
- }
-
- // The completion PATCH that the self-driving flow sends also reaches this scene logic, which
- // stays mounted under both variants. Only the legacy variant may redirect on it, so the two
- // flows never push competing destinations for the same completion.
+ describe('completion redirect', () => {
const completeProduct = (): void => {
const completed = { has_completed_onboarding_for: { product_analytics: true } }
logic.actions.updateCurrentTeamSuccess(completed as any, completed as any)
}
- it('redirects on completion under the legacy variant', async () => {
+ it('redirects to the product once onboarding completes', async () => {
router.actions.push(urls.default())
logic.actions.setProductKey(ProductKey.PRODUCT_ANALYTICS)
await expectLogic(logic, () => {
@@ -740,18 +692,6 @@ describe('onboardingLogic — flow composition', () => {
}).toFinishAllListeners()
expect(router.values.location.pathname).toMatch(/quickstart|insight/i)
})
-
- it('does not redirect on completion under the self-driving variant', async () => {
- setVariant('self-driving')
- router.actions.push(urls.default())
- const before = router.values.location.pathname
- logic.actions.setProductKey(ProductKey.PRODUCT_ANALYTICS)
- await expectLogic(logic, () => {
- completeProduct()
- }).toFinishAllListeners()
- expect(router.values.location.pathname).not.toMatch(/quickstart|insight/i)
- expect(router.values.location.pathname).toBe(before)
- })
})
describe('flow stays consistent across product changes', () => {
diff --git a/frontend/src/scenes/onboarding/legacy/onboardingLogic.tsx b/frontend/src/scenes/onboarding/onboardingLogic.tsx
similarity index 98%
rename from frontend/src/scenes/onboarding/legacy/onboardingLogic.tsx
rename to frontend/src/scenes/onboarding/onboardingLogic.tsx
index 164794984d5b..76fa9e6fb303 100644
--- a/frontend/src/scenes/onboarding/legacy/onboardingLogic.tsx
+++ b/frontend/src/scenes/onboarding/onboardingLogic.tsx
@@ -12,7 +12,6 @@ import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { isKeyOf } from 'lib/utils/guards'
import { removeProjectIdIfPresent } from 'lib/utils/kea-router'
import { billingLogic } from 'scenes/billing/billingLogic'
-import { resolveOnboardingFlowVariant } from 'scenes/onboarding/onboardingVariants'
import { availableOnboardingProducts } from 'scenes/onboarding/shared/utils'
import { organizationLogic } from 'scenes/organizationLogic'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
@@ -25,7 +24,7 @@ import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePane
import { ProductKey } from '~/queries/schema/schema-general'
import { Breadcrumb, OnboardingProduct, OnboardingStepKey } from '~/types'
-import type { FeatureFlagsSet } from '../../../lib/logic/featureFlagLogic'
+import type { FeatureFlagsSet } from '../../lib/logic/featureFlagLogic'
import type {
BillingProductV2Type,
BillingType,
@@ -35,13 +34,13 @@ import type {
TeamPublicType,
TeamType,
UserType,
-} from '../../../types'
+} from '../../types'
import { arraysEqual, parseProductsParam, stepKeyToTitle } from './onboardingFlowUtils'
import { appendSharedTrailingSteps, mayBeAppendedLater } from './sharedSteps'
import { onboardingProviderRegistry } from './stepProviderRegistry'
import { type OnboardingFlowContext, type OnboardingStepDescriptor } from './types'
-/** Interface kept for callers that import it (legacy step components). */
+/** Interface kept for step components that import it. */
export interface OnboardingStepComponentType<P = object> extends React.FC<P> {
stepKey: OnboardingStepKey
}
@@ -74,7 +73,6 @@ export interface onboardingLogicValues {
isCompleting: boolean
onCompleteOnboardingRedirectUrl: string
onCompleteOnboardingRedirectUrlOverride: string | null
- onboardingFlowVariant: string
onboardingStepKeys: OnboardingStepKey[]
product: OnboardingProduct | null
productKey: ProductKey | null
@@ -170,7 +168,6 @@ export interface onboardingLogicActions {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface onboardingLogicMeta {
__keaTypeGenInternalSelectorTypes: {
- onboardingFlowVariant: (featureFlags: FeatureFlagsSet) => string
canInviteTeammates: (currentOrganization: OrganizationType | null, user: UserType | null) => boolean
billingProduct: (billing: BillingType | null, productKey: ProductKey | null) => BillingProductV2Type | null
shouldShowBillingStep: (
@@ -351,11 +348,6 @@ export const onboardingLogic = kea<onboardingLogicType>([
],
})),
selectors({
- onboardingFlowVariant: [
- (s) => [s.featureFlags],
- (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): string =>
- resolveOnboardingFlowVariant(featureFlags),
- ],
canInviteTeammates: [
(s) => [s.currentOrganization, s.user],
(
@@ -962,12 +954,6 @@ export const onboardingLogic = kea<onboardingLogicType>([
return [url, searchParams, undefined, { replace: true }]
},
updateCurrentTeamSuccess(val) {
- // This scene logic stays mounted under the self-driving variant, which owns its own
- // completion redirect. Only redirect when the legacy flow is the active variant, so the
- // two flows do not push competing destinations for the same completion PATCH.
- if (values.onboardingFlowVariant !== 'legacy') {
- return
- }
if (values.productKey && val.payload?.has_completed_onboarding_for?.[values.productKey]) {
const redirectUrl = values.onCompleteOnboardingRedirectUrl
// Reset the override after consuming it so a subsequent onboarding session
diff --git a/frontend/src/scenes/onboarding/legacy/onboardingProductConfigurationLogic.ts b/frontend/src/scenes/onboarding/onboardingProductConfigurationLogic.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/onboardingProductConfigurationLogic.ts
rename to frontend/src/scenes/onboarding/onboardingProductConfigurationLogic.ts
diff --git a/frontend/src/scenes/onboarding/onboardingVariantRegistry.tsx b/frontend/src/scenes/onboarding/onboardingVariantRegistry.tsx
deleted file mode 100644
index 37c9f1769159..000000000000
--- a/frontend/src/scenes/onboarding/onboardingVariantRegistry.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import { LegacyOnboarding } from './legacy/LegacyOnboarding'
-import type { OnboardingFlowVariant } from './onboardingVariants'
-import { SelfDrivingOnboarding } from './self-driving/SelfDrivingOnboarding'
-
-/**
- * Maps each shipped variant to its host component. Add a variant here and in
- * `ONBOARDING_FLOW_VARIANTS` (onboardingVariants.ts) to ship a new onboarding.
- */
-export const onboardingVariantRegistry: Record<OnboardingFlowVariant, () => JSX.Element | null> = {
- legacy: LegacyOnboarding,
- 'self-driving': SelfDrivingOnboarding,
-}
diff --git a/frontend/src/scenes/onboarding/onboardingVariants.test.ts b/frontend/src/scenes/onboarding/onboardingVariants.test.ts
deleted file mode 100644
index d116db457419..000000000000
--- a/frontend/src/scenes/onboarding/onboardingVariants.test.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { FEATURE_FLAGS } from 'lib/constants'
-import type { FeatureFlagsSet } from 'lib/logic/featureFlagLogic'
-
-import { onboardingVariantChrome, resolveOnboardingFlowVariant } from './onboardingVariants'
-
-describe('onboardingVariants', () => {
- describe('resolveOnboardingFlowVariant', () => {
- it('falls back to legacy when the flag is not set', () => {
- expect(resolveOnboardingFlowVariant({} as FeatureFlagsSet)).toBe('legacy')
- })
-
- it('falls back to legacy when the flag resolves to a boolean', () => {
- expect(
- resolveOnboardingFlowVariant({ [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]: true } as FeatureFlagsSet)
- ).toBe('legacy')
- })
-
- it('maps the control flag value to legacy', () => {
- expect(
- resolveOnboardingFlowVariant({ [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]: 'control' } as FeatureFlagsSet)
- ).toBe('legacy')
- })
-
- it('maps the historical legacy flag value to legacy, same as control', () => {
- expect(
- resolveOnboardingFlowVariant({ [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]: 'legacy' } as FeatureFlagsSet)
- ).toBe('legacy')
- })
-
- it('returns self-driving when the flag selects it', () => {
- expect(
- resolveOnboardingFlowVariant({
- [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]: 'self-driving',
- } as FeatureFlagsSet)
- ).toBe('self-driving')
- })
-
- it('falls back to legacy for an unregistered variant', () => {
- expect(
- resolveOnboardingFlowVariant({
- [FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]: 'some_future_variant',
- } as FeatureFlagsSet)
- ).toBe('legacy')
- })
- })
-
- describe('onboardingVariantChrome', () => {
- it('legacy owns the whole viewport (no chrome)', () => {
- expect(onboardingVariantChrome('legacy')).toBe('none')
- })
-
- it('self-driving owns the whole viewport (no chrome)', () => {
- expect(onboardingVariantChrome('self-driving')).toBe('none')
- })
- })
-})
diff --git a/frontend/src/scenes/onboarding/onboardingVariants.ts b/frontend/src/scenes/onboarding/onboardingVariants.ts
deleted file mode 100644
index ea023d5de359..000000000000
--- a/frontend/src/scenes/onboarding/onboardingVariants.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { FEATURE_FLAGS } from 'lib/constants'
-import type { FeatureFlagsSet } from 'lib/logic/featureFlagLogic'
-
-/** Shipped onboarding variants. `legacy` is the existing experience; `self-driving` is the redesigned one. */
-export type OnboardingFlowVariant = 'legacy' | 'self-driving'
-
-/**
- * Chrome rendered around an onboarding variant.
- * - `minimal`: slim top bar (logo + account menu).
- * - `none`: no navbar at all; the variant component owns the entire viewport.
- */
-export type OnboardingVariantChrome = 'minimal' | 'none'
-
-interface OnboardingVariantConfig {
- chrome: OnboardingVariantChrome
-}
-
-const DEFAULT_VARIANT: OnboardingFlowVariant = 'legacy'
-const DEFAULT_VARIANT_CONFIG: OnboardingVariantConfig = { chrome: 'minimal' }
-
-/**
- * Per-variant configuration consumed by core layout code (navigationLogic) to decide the
- * surrounding chrome. Kept free of React imports so it can be read without pulling the
- * onboarding scene chunk into the main bundle. The matching components live in
- * `onboardingVariantRegistry.tsx` — add a variant in both places to ship a new onboarding.
- */
-export const ONBOARDING_FLOW_VARIANTS: Record<OnboardingFlowVariant, OnboardingVariantConfig> = {
- legacy: { chrome: 'none' },
- 'self-driving': { chrome: 'none' },
-}
-
-/**
- * Resolve the active flow variant from the raw flag value. The flag's variant values are `control`
- * and `self-driving`; only `self-driving` selects the redesigned flow. Everything else — `control`,
- * the historical `legacy` value (treated as an alias of control), unknown values, booleans, unset —
- * maps to the internal `legacy` flow.
- */
-export function resolveOnboardingFlowVariant(featureFlags: FeatureFlagsSet): OnboardingFlowVariant {
- const variant = featureFlags[FEATURE_FLAGS.ONBOARDING_FLOW_VARIANT]
- return variant === 'self-driving' ? 'self-driving' : DEFAULT_VARIANT
-}
-
-export function onboardingVariantChrome(variant: OnboardingFlowVariant): OnboardingVariantChrome {
- return (ONBOARDING_FLOW_VARIANTS[variant] ?? DEFAULT_VARIANT_CONFIG).chrome
-}
diff --git a/frontend/src/scenes/onboarding/legacy/productRecommendations.ts b/frontend/src/scenes/onboarding/productRecommendations.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/productRecommendations.ts
rename to frontend/src/scenes/onboarding/productRecommendations.ts
diff --git a/frontend/src/scenes/onboarding/legacy/productSelection/ProductSelection.stories.tsx b/frontend/src/scenes/onboarding/productSelection/ProductSelection.stories.tsx
similarity index 93%
rename from frontend/src/scenes/onboarding/legacy/productSelection/ProductSelection.stories.tsx
rename to frontend/src/scenes/onboarding/productSelection/ProductSelection.stories.tsx
index 828b871eb1bf..0a25a5886163 100644
--- a/frontend/src/scenes/onboarding/legacy/productSelection/ProductSelection.stories.tsx
+++ b/frontend/src/scenes/onboarding/productSelection/ProductSelection.stories.tsx
@@ -9,7 +9,7 @@ import preflightJson from '~/mocks/fixtures/_preflight.json'
const meta: Meta = {
component: App,
- title: 'Scenes-Other/Onboarding/Legacy/Product Selection',
+ title: 'Scenes-Other/Onboarding/Product Selection',
parameters: {
layout: 'fullscreen',
viewMode: 'story',
diff --git a/frontend/src/scenes/onboarding/legacy/productSelection/ProductSelection.tsx b/frontend/src/scenes/onboarding/productSelection/ProductSelection.tsx
similarity index 95%
rename from frontend/src/scenes/onboarding/legacy/productSelection/ProductSelection.tsx
rename to frontend/src/scenes/onboarding/productSelection/ProductSelection.tsx
index 31062bed87f8..598be00dace4 100644
--- a/frontend/src/scenes/onboarding/legacy/productSelection/ProductSelection.tsx
+++ b/frontend/src/scenes/onboarding/productSelection/ProductSelection.tsx
@@ -3,7 +3,6 @@ import { useActions, useValues } from 'kea'
import { IconArrowRight, IconChevronDown, IconCursor } from '@posthog/icons'
import { LemonBanner, LemonButton, LemonCard, LemonLabel, LemonSelect } from '@posthog/lemon-ui'
-import { getFeatureFlagPayload } from 'lib/logic/featureFlagLogic'
import { availableOnboardingProducts, getProductIcon } from 'scenes/onboarding/shared/utils'
import type { ProductKey } from '~/queries/schema/schema-general'
@@ -36,16 +35,10 @@ function ChoosePathStep(): JSX.Element {
const { useCases } = useValues(productSelectionLogic)
const { selectUseCase, selectPickMyself } = useActions(productSelectionLogic)
- const headingCopy = getFeatureFlagPayload('onboarding-product-selection-heading') as
- | { heading?: string; subheading?: string }
- | undefined
- const heading = headingCopy?.heading ?? 'What do you want to do with PostHog?'
- const subheading = headingCopy?.subheading ?? 'Pick a goal to get started with the right products'
-
return (
<div className="max-w-6xl w-full">
- <h1 className="text-4xl font-bold text-center mb-2">{heading}</h1>
- <p className="text-center text-muted mb-8">{subheading}</p>
+ <h1 className="text-4xl font-bold text-center mb-2">What do you want to do with PostHog?</h1>
+ <p className="text-center text-muted mb-8">Pick a goal to get started with the right products</p>
{/* Use cases grid - 2 rows x 3 columns */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
diff --git a/frontend/src/scenes/onboarding/legacy/productSelection/ProductSelectionShell.tsx b/frontend/src/scenes/onboarding/productSelection/ProductSelectionShell.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/productSelection/ProductSelectionShell.tsx
rename to frontend/src/scenes/onboarding/productSelection/ProductSelectionShell.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/productSelection/browsingHistoryMapping.ts b/frontend/src/scenes/onboarding/productSelection/browsingHistoryMapping.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/productSelection/browsingHistoryMapping.ts
rename to frontend/src/scenes/onboarding/productSelection/browsingHistoryMapping.ts
diff --git a/frontend/src/scenes/onboarding/legacy/productSelection/productSelectionLogic.ts b/frontend/src/scenes/onboarding/productSelection/productSelectionLogic.ts
similarity index 96%
rename from frontend/src/scenes/onboarding/legacy/productSelection/productSelectionLogic.ts
rename to frontend/src/scenes/onboarding/productSelection/productSelectionLogic.ts
index 357471028e4b..7b681c4e2880 100644
--- a/frontend/src/scenes/onboarding/legacy/productSelection/productSelectionLogic.ts
+++ b/frontend/src/scenes/onboarding/productSelection/productSelectionLogic.ts
@@ -4,12 +4,8 @@ import posthog from 'posthog-js'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { getRelativeNextPath } from 'lib/utils/url'
-import { onboardingLogic } from 'scenes/onboarding/legacy/onboardingLogic'
-import {
- USE_CASE_OPTIONS,
- UseCaseOption,
- getRecommendedProducts,
-} from 'scenes/onboarding/legacy/productRecommendations'
+import { onboardingLogic } from 'scenes/onboarding/onboardingLogic'
+import { USE_CASE_OPTIONS, UseCaseOption, getRecommendedProducts } from 'scenes/onboarding/productRecommendations'
import { availableOnboardingProducts } from 'scenes/onboarding/shared/utils'
import { teamLogic } from 'scenes/teamLogic'
import { urls } from 'scenes/urls'
@@ -17,8 +13,8 @@ import { urls } from 'scenes/urls'
import { ProductIntentContext, ProductKey } from '~/queries/schema/schema-general'
import { OnboardingStepKey } from '~/types'
-import type { ProductIntentProperties } from '../../../../lib/utils/product-intents'
-import type { TeamPublicType, TeamType } from '../../../../types'
+import type { ProductIntentProperties } from '../../../lib/utils/product-intents'
+import type { TeamPublicType, TeamType } from '../../../types'
import type { UseCaseDefinition } from '../productRecommendations'
import {
getBrowsingHistoryFromPostHog,
@@ -77,10 +73,8 @@ export interface productSelectionLogicActions {
recommendationSource: string
selected: boolean
} // eventUsageLogic
- reportOnboardingStarted: (
- properties?: import('lib/utils/eventUsageLogic').OnboardingEventProperties | undefined
- ) => {
- properties: import('lib/utils/eventUsageLogic').OnboardingEventProperties | undefined
+ reportOnboardingStarted: () => {
+ value: true
} // eventUsageLogic
setOnCompleteOnboardingRedirectUrl: (url: string | null) => {
url: string | null
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
similarity index 96%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
index 8cf96929f121..a4e57302303d 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/MobileInstallHandoff.tsx
@@ -22,11 +22,9 @@ interface MobileInstallHandoffProps {
}
/**
- * Install step for mobile users in the ONBOARDING_MOBILE_INSTALL_HELPER `test`
- * arm. Offers to hand off the install URL to the user's computer via the Web
- * Share API, with a copy-link fallback and a "continue on this device" escape.
- * When events start arriving, the card flips to a success state with an
- * in-card continue button.
+ * Install step for mobile users. Offers to hand off the install URL to the user's computer via
+ * the Web Share API, with a copy-link fallback and a "continue on this device" escape. When
+ * events start arriving, the card flips to a success state with an in-card continue button.
*/
export function MobileInstallHandoff({
listeningForName,
diff --git a/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/NextButton.test.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/NextButton.test.tsx
new file mode 100644
index 000000000000..47d556ae75cc
--- /dev/null
+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/NextButton.test.tsx
@@ -0,0 +1,35 @@
+import '@testing-library/jest-dom'
+
+import { cleanup, fireEvent, render, screen } from '@testing-library/react'
+
+import { ProductKey } from '~/queries/schema/schema-general'
+import { initKeaTests } from '~/test/init'
+
+import { onboardingLogic } from '../../onboardingLogic'
+import { NextButton } from './NextButton'
+
+describe('NextButton', () => {
+ let logic: ReturnType<typeof onboardingLogic.build>
+
+ beforeEach(() => {
+ localStorage.clear()
+ initKeaTests()
+ logic = onboardingLogic()
+ logic.mount()
+ logic.actions.setProductKey(ProductKey.PRODUCT_ANALYTICS)
+ logic.actions.setStepId('install:product_analytics')
+ })
+
+ afterEach(() => {
+ logic.unmount()
+ cleanup()
+ })
+
+ it('skipping installation advances to the next step', () => {
+ render(<NextButton installationComplete={false} />)
+
+ fireEvent.click(screen.getByText('Skip installation'))
+
+ expect(logic.values.stepId).toBe('configure:product_analytics')
+ })
+})
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/NextButton.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/NextButton.tsx
similarity index 84%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/NextButton.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/NextButton.tsx
index 5d6a20e62949..a6c3ea9bba26 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/NextButton.tsx
+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/NextButton.tsx
@@ -12,16 +12,14 @@ import { onboardingLogic } from '../../onboardingLogic'
interface NextButtonProps {
installationComplete: boolean
size?: 'small' | 'medium'
- /** Overrides the legacy onboardingLogic advance for flows (e.g. self-driving) that manage their own step state. */
- onAdvance?: () => void
}
-export const NextButton = ({ installationComplete, size = 'medium', onAdvance }: NextButtonProps): JSX.Element => {
+export const NextButton = ({ installationComplete, size = 'medium' }: NextButtonProps): JSX.Element => {
const { hasNextStep, currentStepProductKey } = useValues(onboardingLogic)
const { completeOnboarding, goToNextStep } = useActions(onboardingLogic)
const { reportOnboardingStepCompleted, reportOnboardingStepSkipped } = useActions(eventUsageLogic)
- const advance = onAdvance ?? (!hasNextStep ? completeOnboarding : goToNextStep)
+ const advance = !hasNextStep ? completeOnboarding : goToNextStep
const skipInstallation = (): void => {
reportOnboardingStepSkipped(OnboardingStepKey.INSTALL, currentStepProductKey ?? undefined)
advance()
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/SDKGrid.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/SDKGrid.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/SDKGrid.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/SDKGrid.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/SDKInstructionsModal.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/SDKInstructionsModal.tsx
similarity index 94%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/SDKInstructionsModal.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/SDKInstructionsModal.tsx
index 1c428a56424d..36b77cd257df 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/SDKInstructionsModal.tsx
+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/SDKInstructionsModal.tsx
@@ -18,8 +18,6 @@ interface SDKInstructionsModalProps {
verifyingProperty?: string
verifyingName?: string
hideInstallationCheck?: boolean
- /** Overrides the legacy onboardingLogic advance the footer's NextButton dispatches by default. */
- onAdvance?: () => void
}
export function SDKInstructionsModal({
@@ -31,7 +29,6 @@ export function SDKInstructionsModal({
verifyingProperty = 'ingested_event',
verifyingName = 'event',
hideInstallationCheck = false,
- onAdvance,
}: SDKInstructionsModalProps): JSX.Element {
const installationCompleteFromTeam = useInstallationComplete(verifyingProperty)
const installationComplete = hideInstallationCheck || installationCompleteFromTeam
@@ -68,7 +65,7 @@ export function SDKInstructionsModal({
) : (
<span />
)}
- <NextButton installationComplete={installationComplete} onAdvance={onAdvance} />
+ <NextButton installationComplete={installationComplete} />
</footer>
</div>
)}
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallIntro.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallIntro.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallIntro.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallIntro.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.stories.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.stories.tsx
similarity index 90%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.stories.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.stories.tsx
index 22c189703098..78ca65030972 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.stories.tsx
+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.stories.tsx
@@ -17,13 +17,13 @@ import preflightJson from '~/mocks/fixtures/_preflight.json'
import { ProductKey } from '~/queries/schema/schema-general'
import { IntegrationType, OnboardingStepKey } from '~/types'
-import { activeCloudRunLogic } from '../../../../shared/wizard-sync/activeCloudRunLogic'
import { onboardingLogic } from '../../../onboardingLogic'
+import { activeCloudRunLogic } from '../../../shared/wizard-sync/activeCloudRunLogic'
/**
- * The legacy onboarding install step under each arm of the cloud-wizard AB test (GROW-117), plus the
- * pinned progress state once a cloud run is underway. The context-first variant's equivalents live in
- * the Wizard Cloud Run stories; these render the legacy flow (ONBOARDING_FLOW_VARIANT unset).
+ * The onboarding install step under each arm of the cloud-wizard AB test (GROW-117), plus the
+ * pinned progress state once a cloud run is underway. The cloud run block's own states live in the
+ * Wizard Cloud Run stories.
*/
const githubIntegration: IntegrationType = {
@@ -83,7 +83,7 @@ const TASK_RUN_STREAM_BODY = [
].join('')
const meta: Meta = {
- title: 'Scenes-Other/Onboarding/Legacy/Install Step',
+ title: 'Scenes-Other/Onboarding/Install Step',
parameters: {
layout: 'fullscreen',
viewMode: 'story',
@@ -120,8 +120,8 @@ export default meta
type Story = StoryObj
-/** Lands on the legacy install step for product analytics, optionally staging extra state first. */
-function legacyInstallStory({
+/** Lands on the install step for product analytics, optionally staging extra state first. */
+function installStepStory({
featureFlags = {},
drive,
waitForSelector,
@@ -161,12 +161,12 @@ function legacyInstallStory({
* is deliberately UNSET rather than 'control': storybook's useFeatureFlag treats any truthy value as
* flag-on (the variant match is ignored there), and the control arm renders the flag-off branch anyway.
*/
-export const ControlArm: Story = legacyInstallStory({
+export const ControlArm: Story = installStepStory({
waitForSelector: '[data-attr="wizard-command-block"]',
})
/** Test arm: the cloud/local toggle with the "open a PR" block up front (GitHub connected). */
-export const TestArm: Story = legacyInstallStory({
+export const TestArm: Story = installStepStory({
featureFlags: { [FEATURE_FLAGS.ONBOARDING_WIZARD_CLOUD_RUN]: 'test' },
waitForSelector: '[data-attr="wizard-cloud-run-open-pr"]',
})
@@ -175,7 +175,7 @@ export const TestArm: Story = legacyInstallStory({
* A cloud run underway: the step pins to the run's live pipeline (fed by the mocked task-run
* stream), the local tab is blocked, and Continue is unblocked.
*/
-export const CloudRunInProgress: Story = legacyInstallStory({
+export const CloudRunInProgress: Story = installStepStory({
featureFlags: { [FEATURE_FLAGS.ONBOARDING_WIZARD_CLOUD_RUN]: 'test' },
drive: () =>
activeCloudRunLogic.actions.setActiveCloudRun('task-1', 'run-1', new Date().toISOString(), MOCK_TEAM_ID),
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.test.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.test.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.test.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/WizardInstallStep.test.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
similarity index 68%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
index ce12972b5ac0..95436ae8e0ef 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/WizardInstallStep/index.tsx
@@ -2,18 +2,16 @@ 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 { onboardingEventUsageLogic } from '../../../../onboardingEventUsageLogic'
-import { activeCloudRunLogic } from '../../../../shared/wizard-sync/activeCloudRunLogic'
-import { useLocalWizardRunActive } from '../../../../shared/wizard-sync/hooks'
-import { InstallationProgressView } from '../../../../shared/wizard-sync/InstallationProgressView'
-import { WizardCommandBlock } from '../../../../shared/wizard-sync/WizardCommandBlock'
-import { WizardInstallOptions } from '../../../../shared/wizard-sync/WizardInstallOptions'
-import { WizardFrameworkBadges } from '../../../../shared/wizard-sync/WizardModeShell'
+import { onboardingEventUsageLogic } from '../../../onboardingEventUsageLogic'
import { OnboardingStep } from '../../../OnboardingStep'
+import { activeCloudRunLogic } from '../../../shared/wizard-sync/activeCloudRunLogic'
+import { useLocalWizardRunActive } from '../../../shared/wizard-sync/hooks'
+import { InstallationProgressView } from '../../../shared/wizard-sync/InstallationProgressView'
+import { WizardCommandBlock } from '../../../shared/wizard-sync/WizardCommandBlock'
+import { WizardInstallOptions } from '../../../shared/wizard-sync/WizardInstallOptions'
+import { WizardFrameworkBadges } from '../../../shared/wizard-sync/WizardModeShell'
import { AdblockWarning, RealtimeCheckIndicator } from '../../RealtimeCheckIndicator'
import { SDKGrid } from '../SDKGrid'
import { SDKInstructionsModal } from '../SDKInstructionsModal'
@@ -21,10 +19,10 @@ import { VariantProps, WizardOverrides } from '../types'
import { wizardInstallStepLogic } from '../wizardInstallStepLogic'
import { WizardInstallIntro } from './WizardInstallIntro'
-// The shared cloud/local switcher wrapped with legacy's own command block and instrumentation. An
-// active cloud run renders inside it (WizardCloudRunBlock pins to the run's progress), so the
+// The shared cloud/local switcher wrapped with onboarding's own command block and instrumentation.
+// An active cloud run renders inside it (WizardCloudRunBlock pins to the run's progress), so the
// failed-run "Run it yourself" fallback keeps working — the mode state must not unmount mid-recovery.
-function LegacyInstallOptions({ wizardOverrides }: { wizardOverrides?: WizardOverrides }): JSX.Element {
+function OnboardingInstallOptions({ wizardOverrides }: { wizardOverrides?: WizardOverrides }): JSX.Element {
const { reportOnboardingInstallModeSelected } = useActions(onboardingEventUsageLogic)
return (
<WizardInstallOptions
@@ -53,45 +51,14 @@ function LegacyInstallOptions({ wizardOverrides }: { wizardOverrides?: WizardOve
* 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.
+ * A live local wizard run takes over the step, and an in-flight run (cloud or local) unblocks
+ * Continue without waiting for installation events.
*/
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 isLocalRunActive = useLocalWizardRunActive()
// Deliberately not gated on the cloud-run flag: a persisted handle is proof the user started a
// run while on the test arm, and a mid-experiment flag change must not strand an in-flight run.
- const { activeCloudRun: persistedCloudRun } = useValues(activeCloudRunLogic)
- // A run queued on another step only executes the base program, so a dedicated-program step
- // (wizardOverrides) ignores it: its command stays visible and Continue stays gated.
- const activeCloudRun = props.wizardOverrides ? null : persistedCloudRun
- // A queued/running cloud run unblocks Continue just like a local takeover: the run keeps going
- // in the background (surfaced by the FAB) and installation events aren't required.
- const continueDisabledReason =
- props.installationComplete || activeCloudRun ? undefined : 'Installation is not complete'
- return (
- <WizardInstallShell
- continueDisabledReason={continueDisabledReason}
- showSkip={!props.installationComplete && !activeCloudRun}
- props={props}
- >
- {/* The intro's terminal framing makes no sense while a run's progress is on screen. */}
- {!activeCloudRun && <WizardInstallIntro description={props.wizardOverrides?.intro} />}
- <div className="max-w-xl mx-auto">
- <LegacyInstallOptions wizardOverrides={props.wizardOverrides} />
- </div>
- </WizardInstallShell>
- )
-}
-
-function WizardInstallStepWithSync(props: VariantProps): JSX.Element {
- const isLocalRunActive = useLocalWizardRunActive()
- // See WizardInstallStepStatic: an existing handle renders regardless of the experiment arm,
- // but a dedicated-program step ignores it (the run only executes the base program).
+ // A dedicated-program step ignores it, because the run only executes the base program.
const { activeCloudRun: persistedCloudRun } = useValues(activeCloudRunLogic)
const activeCloudRun = props.wizardOverrides ? null : persistedCloudRun
// Once the wizard is in flight (cloud or local), trust it — installation events aren't required
@@ -106,10 +73,10 @@ function WizardInstallStepWithSync(props: VariantProps): JSX.Element {
>
{/* A cloud run wins over the local run view: the cloud wizard posts to the same session
stream, so rendering both would show the same run twice. The cloud run's progress
- renders inside LegacyInstallOptions (WizardCloudRunBlock pins to it). */}
+ renders inside OnboardingInstallOptions (WizardCloudRunBlock pins to it). */}
{activeCloudRun ? (
<div className="max-w-xl mx-auto">
- <LegacyInstallOptions wizardOverrides={props.wizardOverrides} />
+ <OnboardingInstallOptions wizardOverrides={props.wizardOverrides} />
</div>
) : isLocalRunActive ? (
<div className="max-w-xl mx-auto">
@@ -119,7 +86,7 @@ function WizardInstallStepWithSync(props: VariantProps): JSX.Element {
<>
<WizardInstallIntro description={props.wizardOverrides?.intro} />
<div className="max-w-xl mx-auto">
- <LegacyInstallOptions wizardOverrides={props.wizardOverrides} />
+ <OnboardingInstallOptions wizardOverrides={props.wizardOverrides} />
</div>
</>
)}
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/index.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/index.tsx
similarity index 95%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/index.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/index.tsx
index 7b5712d8d858..af8a5581f336 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/index.tsx
+++ b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/index.tsx
@@ -2,7 +2,6 @@ import { useActions, useValues } from 'kea'
import posthog from 'posthog-js'
import { useEffect, useRef, useState } from 'react'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { isMobile } from 'lib/utils/dom'
import { humanList } from 'lib/utils/strings'
import { availableOnboardingProducts } from 'scenes/onboarding/shared/utils'
@@ -90,10 +89,7 @@ export const OnboardingInstallStep: OnboardingStepComponentType<OnboardingInstal
const isLogsProduct = currentStepProductKey === ProductKey.LOGS
- // 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
+ const showMobileHandoff = isMobile() && !mobileHandoffDismissed
useEffect(() => {
setSDKDocsLinkOverrides(sdkDocsLinkOverrides ?? {})
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/types.ts b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/types.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/types.ts
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/types.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/wizardInstallStepLogic.ts b/frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardInstallStepLogic.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingInstallStep/wizardInstallStepLogic.ts
rename to frontend/src/scenes/onboarding/sdks/OnboardingInstallStep/wizardInstallStepLogic.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/OnboardingLiveEvents.tsx b/frontend/src/scenes/onboarding/sdks/OnboardingLiveEvents.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/OnboardingLiveEvents.tsx
rename to frontend/src/scenes/onboarding/sdks/OnboardingLiveEvents.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/RealtimeCheckIndicator.tsx b/frontend/src/scenes/onboarding/sdks/RealtimeCheckIndicator.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/RealtimeCheckIndicator.tsx
rename to frontend/src/scenes/onboarding/sdks/RealtimeCheckIndicator.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/SDKSnippet.tsx b/frontend/src/scenes/onboarding/sdks/SDKSnippet.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/SDKSnippet.tsx
rename to frontend/src/scenes/onboarding/sdks/SDKSnippet.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/ai-observability/AIObservabilitySDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/ai-observability/AIObservabilitySDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/ai-observability/AIObservabilitySDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/ai-observability/AIObservabilitySDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/allSDKs.tsx b/frontend/src/scenes/onboarding/sdks/allSDKs.tsx
similarity index 88%
rename from frontend/src/scenes/onboarding/legacy/sdks/allSDKs.tsx
rename to frontend/src/scenes/onboarding/sdks/allSDKs.tsx
index e4e19c6e1605..ad742c2aeea4 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/allSDKs.tsx
+++ b/frontend/src/scenes/onboarding/sdks/allSDKs.tsx
@@ -9,57 +9,57 @@ import { Logomark } from 'lib/brand'
import { SDK, SDKKey, SDKTag } from '~/types'
-import androidImage from '../../shared/logos/android.svg'
-import angularImage from '../../shared/logos/angular.svg'
-import { AnthropicLogo } from '../../shared/logos/AnthropicLogo'
-import { AstroLogo } from '../../shared/logos/AstroLogo'
-import { BubbleLogo } from '../../shared/logos/BubbleLogo'
-import djangoImage from '../../shared/logos/django.svg'
-import docusaurusImage from '../../shared/logos/docusaurus.svg'
-import dotnetImage from '../../shared/logos/dotnet.svg'
-import elixirImage from '../../shared/logos/elixir.svg'
-import flutterImage from '../../shared/logos/flutter.svg'
-import { FramerLogo } from '../../shared/logos/FramerLogo'
-import gatsbyImage from '../../shared/logos/gatsby.svg'
-import geminiImage from '../../shared/logos/gemini.svg'
-import goImage from '../../shared/logos/go.svg'
-import gtmImage from '../../shared/logos/gtm.svg'
-import honoImage from '../../shared/logos/hono.svg'
-import { IOSLogo } from '../../shared/logos/IOSLogo'
-import javaImage from '../../shared/logos/java.svg'
-import jsImage from '../../shared/logos/javascript_web.svg'
-import { LangChainLogo } from '../../shared/logos/LangChainLogo'
-import langfuseImage from '../../shared/logos/langfuse.svg'
-import laravelImage from '../../shared/logos/laravel.svg'
-import moengageImage from '../../shared/logos/moengage.png'
-import n8nImage from '../../shared/logos/n8n.svg'
-import nextjsImage from '../../shared/logos/nextjs.svg'
-import nodejsImage from '../../shared/logos/nodejs.svg'
-import nuxtImage from '../../shared/logos/nuxt.svg'
-import { OpenAILogo } from '../../shared/logos/OpenAILogo'
-import { OpenRouterLogo } from '../../shared/logos/OpenRouterLogo'
-import phpImage from '../../shared/logos/php.svg'
-import pythonImage from '../../shared/logos/python.svg'
-import railsImage from '../../shared/logos/rails.svg'
-import reactImage from '../../shared/logos/react.svg'
-import reactNativeImage from '../../shared/logos/react.svg'
-import { ReactRouterLogo } from '../../shared/logos/ReactRouterLogo'
-import { RemixLogo } from '../../shared/logos/RemixLogo'
-import { RetoolLogo } from '../../shared/logos/RetoolLogo'
-import rubyImage from '../../shared/logos/ruby.svg'
-import { RudderstackLogo } from '../../shared/logos/RudderstackLogo'
-import rustImage from '../../shared/logos/rust.svg'
-import segmentImage from '../../shared/logos/segment.svg'
-import { SentryLogo } from '../../shared/logos/SentryLogo'
-import shopifyImage from '../../shared/logos/shopify.svg'
-import svelteImage from '../../shared/logos/svelte.svg'
-import tanStackImage from '../../shared/logos/tanstack.png'
-import traceloopImage from '../../shared/logos/traceloop.svg'
-import viteImage from '../../shared/logos/vite.svg'
-import vueImage from '../../shared/logos/vue.svg'
-import webflowImage from '../../shared/logos/webflow.svg'
-import { WordpressLogo } from '../../shared/logos/WordpressLogo'
-import zapierImage from '../../shared/logos/zapier.svg'
+import androidImage from '../shared/logos/android.svg'
+import angularImage from '../shared/logos/angular.svg'
+import { AnthropicLogo } from '../shared/logos/AnthropicLogo'
+import { AstroLogo } from '../shared/logos/AstroLogo'
+import { BubbleLogo } from '../shared/logos/BubbleLogo'
+import djangoImage from '../shared/logos/django.svg'
+import docusaurusImage from '../shared/logos/docusaurus.svg'
+import dotnetImage from '../shared/logos/dotnet.svg'
+import elixirImage from '../shared/logos/elixir.svg'
+import flutterImage from '../shared/logos/flutter.svg'
+import { FramerLogo } from '../shared/logos/FramerLogo'
+import gatsbyImage from '../shared/logos/gatsby.svg'
+import geminiImage from '../shared/logos/gemini.svg'
+import goImage from '../shared/logos/go.svg'
+import gtmImage from '../shared/logos/gtm.svg'
+import honoImage from '../shared/logos/hono.svg'
+import { IOSLogo } from '../shared/logos/IOSLogo'
+import javaImage from '../shared/logos/java.svg'
+import jsImage from '../shared/logos/javascript_web.svg'
+import { LangChainLogo } from '../shared/logos/LangChainLogo'
+import langfuseImage from '../shared/logos/langfuse.svg'
+import laravelImage from '../shared/logos/laravel.svg'
+import moengageImage from '../shared/logos/moengage.png'
+import n8nImage from '../shared/logos/n8n.svg'
+import nextjsImage from '../shared/logos/nextjs.svg'
+import nodejsImage from '../shared/logos/nodejs.svg'
+import nuxtImage from '../shared/logos/nuxt.svg'
+import { OpenAILogo } from '../shared/logos/OpenAILogo'
+import { OpenRouterLogo } from '../shared/logos/OpenRouterLogo'
+import phpImage from '../shared/logos/php.svg'
+import pythonImage from '../shared/logos/python.svg'
+import railsImage from '../shared/logos/rails.svg'
+import reactImage from '../shared/logos/react.svg'
+import reactNativeImage from '../shared/logos/react.svg'
+import { ReactRouterLogo } from '../shared/logos/ReactRouterLogo'
+import { RemixLogo } from '../shared/logos/RemixLogo'
+import { RetoolLogo } from '../shared/logos/RetoolLogo'
+import rubyImage from '../shared/logos/ruby.svg'
+import { RudderstackLogo } from '../shared/logos/RudderstackLogo'
+import rustImage from '../shared/logos/rust.svg'
+import segmentImage from '../shared/logos/segment.svg'
+import { SentryLogo } from '../shared/logos/SentryLogo'
+import shopifyImage from '../shared/logos/shopify.svg'
+import svelteImage from '../shared/logos/svelte.svg'
+import tanStackImage from '../shared/logos/tanstack.png'
+import traceloopImage from '../shared/logos/traceloop.svg'
+import viteImage from '../shared/logos/vite.svg'
+import vueImage from '../shared/logos/vue.svg'
+import webflowImage from '../shared/logos/webflow.svg'
+import { WordpressLogo } from '../shared/logos/WordpressLogo'
+import zapierImage from '../shared/logos/zapier.svg'
export const ALL_SDKS: SDK[] = [
// Web
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/error-tracking/ErrorTrackingSDKInstructions.test.ts b/frontend/src/scenes/onboarding/sdks/error-tracking/ErrorTrackingSDKInstructions.test.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/error-tracking/ErrorTrackingSDKInstructions.test.ts
rename to frontend/src/scenes/onboarding/sdks/error-tracking/ErrorTrackingSDKInstructions.test.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/error-tracking/ErrorTrackingSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/error-tracking/ErrorTrackingSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/error-tracking/ErrorTrackingSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/error-tracking/ErrorTrackingSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/experiments/ExperimentsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/experiments/ExperimentsSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/experiments/ExperimentsSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/experiments/ExperimentsSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/feature-flags/FeatureFlagsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/feature-flags/FeatureFlagsSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/feature-flags/FeatureFlagsSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/feature-flags/FeatureFlagsSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/getAvailableSDKs.ts b/frontend/src/scenes/onboarding/sdks/getAvailableSDKs.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/getAvailableSDKs.ts
rename to frontend/src/scenes/onboarding/sdks/getAvailableSDKs.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/hooks/useAdblockDetection.ts b/frontend/src/scenes/onboarding/sdks/hooks/useAdblockDetection.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/hooks/useAdblockDetection.ts
rename to frontend/src/scenes/onboarding/sdks/hooks/useAdblockDetection.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/hooks/useInstallationComplete.tsx b/frontend/src/scenes/onboarding/sdks/hooks/useInstallationComplete.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/hooks/useInstallationComplete.tsx
rename to frontend/src/scenes/onboarding/sdks/hooks/useInstallationComplete.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/kmpSDKInstructions.test.ts b/frontend/src/scenes/onboarding/sdks/kmpSDKInstructions.test.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/kmpSDKInstructions.test.ts
rename to frontend/src/scenes/onboarding/sdks/kmpSDKInstructions.test.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/logs/LogsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/logs/LogsSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/logs/LogsSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/logs/LogsSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/metrics/MetricsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/metrics/MetricsSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/metrics/MetricsSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/metrics/MetricsSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/android.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/android.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/android.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/android.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/angular.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/angular.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/angular.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/angular.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/astro.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/astro.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/astro.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/astro.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/bubble.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/bubble.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/bubble.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/bubble.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/django.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/django.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/django.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/django.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/elixir.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/elixir.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/elixir.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/elixir.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/flutter.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/flutter.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/flutter.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/flutter.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/framer.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/framer.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/framer.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/framer.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/go.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/go.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/go.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/go.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/index.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/index.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/index.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/index.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/ios.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ios.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/ios.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ios.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/js-web.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/js-web.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/js-web.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/js-web.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/laravel.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/laravel.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/laravel.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/laravel.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/next-js.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/next-js.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/next-js.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/next-js.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/nextJsInstructionsLogic.ts b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/nextJsInstructionsLogic.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/nextJsInstructionsLogic.ts
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/nextJsInstructionsLogic.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/nodejs.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/nodejs.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/nodejs.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/nodejs.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/nuxt.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/nuxt.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/nuxt.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/nuxt.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/php.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/php.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/php.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/php.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/python.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/python.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/python.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/python.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/react-native.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react-native.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/react-native.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react-native.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/react.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/react.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/remix.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/remix.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/remix.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/remix.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/ruby.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ruby.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/ruby.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ruby.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/svelte.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/svelte.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/svelte.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/svelte.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/vue.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/vue.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/vue.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/vue.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/webflow.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/webflow.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdk-install-instructions/webflow.tsx
rename to frontend/src/scenes/onboarding/sdks/sdk-install-instructions/webflow.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdksLogic.test.ts b/frontend/src/scenes/onboarding/sdks/sdksLogic.test.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdksLogic.test.ts
rename to frontend/src/scenes/onboarding/sdks/sdksLogic.test.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/sdksLogic.tsx b/frontend/src/scenes/onboarding/sdks/sdksLogic.tsx
similarity index 99%
rename from frontend/src/scenes/onboarding/legacy/sdks/sdksLogic.tsx
rename to frontend/src/scenes/onboarding/sdks/sdksLogic.tsx
index 73bdfd630cf7..5ed770b92703 100644
--- a/frontend/src/scenes/onboarding/legacy/sdks/sdksLogic.tsx
+++ b/frontend/src/scenes/onboarding/sdks/sdksLogic.tsx
@@ -14,8 +14,8 @@ import { ProductKey } from '~/queries/schema/schema-general'
import { hogql } from '~/queries/utils'
import { SDK, SDKDocsLinkOverrides, SDKInstructionsMap, SDKTag, SDKTagOverrides } from '~/types'
-import type { FeatureFlagsSet } from '../../../../lib/logic/featureFlagLogic'
-import type { SDKKey, UserType } from '../../../../types'
+import type { FeatureFlagsSet } from '../../../lib/logic/featureFlagLogic'
+import type { SDKKey, UserType } from '../../../types'
import { onboardingLogic } from '../onboardingLogic'
import { ALL_SDKS } from './allSDKs'
import { getAvailableSDKs } from './getAvailableSDKs'
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/session-replay/AdvertiseMobileReplay.tsx b/frontend/src/scenes/onboarding/sdks/session-replay/AdvertiseMobileReplay.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/session-replay/AdvertiseMobileReplay.tsx
rename to frontend/src/scenes/onboarding/sdks/session-replay/AdvertiseMobileReplay.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/session-replay/SessionReplaySDKInstructions.test.ts b/frontend/src/scenes/onboarding/sdks/session-replay/SessionReplaySDKInstructions.test.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/session-replay/SessionReplaySDKInstructions.test.ts
rename to frontend/src/scenes/onboarding/sdks/session-replay/SessionReplaySDKInstructions.test.ts
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/session-replay/SessionReplaySDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/session-replay/SessionReplaySDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/session-replay/SessionReplaySDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/session-replay/SessionReplaySDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/session-replay/index.tsx b/frontend/src/scenes/onboarding/sdks/session-replay/index.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/session-replay/index.tsx
rename to frontend/src/scenes/onboarding/sdks/session-replay/index.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/shared/onboardingWrappers.tsx b/frontend/src/scenes/onboarding/sdks/shared/onboardingWrappers.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/shared/onboardingWrappers.tsx
rename to frontend/src/scenes/onboarding/sdks/shared/onboardingWrappers.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/skillBadge.tsx b/frontend/src/scenes/onboarding/sdks/skillBadge.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/skillBadge.tsx
rename to frontend/src/scenes/onboarding/sdks/skillBadge.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/surveys/SurveysSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/surveys/SurveysSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/surveys/SurveysSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/surveys/SurveysSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/web-analytics/WebAnalyticsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/web-analytics/WebAnalyticsSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/web-analytics/WebAnalyticsSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/web-analytics/WebAnalyticsSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/web-analytics/index.tsx b/frontend/src/scenes/onboarding/sdks/web-analytics/index.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/web-analytics/index.tsx
rename to frontend/src/scenes/onboarding/sdks/web-analytics/index.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/sdks/workflows/WorkflowsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/workflows/WorkflowsSDKInstructions.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sdks/workflows/WorkflowsSDKInstructions.tsx
rename to frontend/src/scenes/onboarding/sdks/workflows/WorkflowsSDKInstructions.tsx
diff --git a/frontend/src/scenes/onboarding/self-driving/RoughMark.tsx b/frontend/src/scenes/onboarding/self-driving/RoughMark.tsx
deleted file mode 100644
index 2bf928268522..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/RoughMark.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import { useEffect, useRef } from 'react'
-import { annotate } from 'rough-notation'
-import type { RoughAnnotation } from 'rough-notation/lib/model'
-
-/**
- * Minimal port of posthog.com's RoughAnnotation wrapper (src/components/Code/RoughAnnotation.tsx)
- * for the hand-drawn highlight/squiggle treatments of the site's visual language. Draws on mount -
- * onboarding steps are short-lived cards, so no scroll observer.
- */
-export function RoughMark({
- children,
- type,
- color,
- strokeWidth = 2,
- padding = 2,
- multiline = false,
- delay = 0,
-}: {
- children: React.ReactNode
- type: 'underline' | 'highlight'
- color: string
- strokeWidth?: number
- padding?: number
- multiline?: boolean
- delay?: number
-}): JSX.Element {
- const ref = useRef<HTMLSpanElement>(null)
-
- useEffect(() => {
- if (!ref.current) {
- return
- }
- const annotation: RoughAnnotation = annotate(ref.current, {
- type,
- color,
- strokeWidth,
- padding,
- multiline,
- iterations: 2,
- animationDuration: 800,
- })
- const timeout = window.setTimeout(() => annotation.show(), delay)
- return () => {
- window.clearTimeout(timeout)
- annotation.remove()
- }
- }, [type, color, strokeWidth, padding, multiline, delay])
-
- return <span ref={ref}>{children}</span>
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboarding.stories.tsx b/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboarding.stories.tsx
deleted file mode 100644
index 988cf8f193bb..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboarding.stories.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import type { Meta, StoryObj } from '@storybook/react'
-import { router } from 'kea-router'
-
-import { urls } from 'scenes/urls'
-
-import { mswDecorator } from '~/mocks/browser'
-
-import { SelfDrivingOnboarding } from './SelfDrivingOnboarding'
-
-const meta: Meta<typeof SelfDrivingOnboarding> = {
- title: 'Scenes-Other/Onboarding/Self-driving',
- component: SelfDrivingOnboarding,
- parameters: {
- layout: 'fullscreen',
- viewMode: 'story',
- },
- decorators: [mswDecorator({})],
- render: () => {
- router.actions.replace(urls.onboarding(), { step: 'goals' })
- return <SelfDrivingOnboarding />
- },
-}
-
-export default meta
-
-type Story = StoryObj<typeof SelfDrivingOnboarding>
-
-export const UseCasesLight: Story = {
- globals: { theme: 'light' },
- parameters: {
- testOptions: {
- skipDarkMode: true,
- waitForSelector: '[data-attr="self-driving-goal-improve_experience"]',
- },
- },
-}
-
-export const UseCasesDark: Story = {
- globals: { theme: 'dark' },
- parameters: {
- testOptions: {
- skipLightMode: true,
- waitForSelector: '[data-attr="self-driving-goal-improve_experience"]',
- },
- },
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboarding.tsx b/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboarding.tsx
deleted file mode 100644
index b574684755e6..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboarding.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Logo } from 'lib/brand'
-
-import { SelfDrivingOnboardingFlow } from './SelfDrivingOnboardingFlow'
-
-/**
- * Host for the self-driving onboarding experience: dotted backdrop, logo, and a centered card that
- * holds the context-first step flow. Selected via `onboardingVariantRegistry` when the
- * `ONBOARDING_FLOW_VARIANT` flag resolves to `'self-driving'`.
- */
-export function SelfDrivingOnboarding(): JSX.Element | null {
- return (
- <div className="OnboardingDottedBg min-h-screen flex flex-col items-center justify-center p-4 sm:p-6">
- <span className="block mb-6">
- <Logo size="lg" />
- </span>
- {/* The card chrome and its per-step width live inside the flow (so the width can vary
- by step); here we just center it under the logo. */}
- <SelfDrivingOnboardingFlow />
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboardingFlow.tsx b/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboardingFlow.tsx
deleted file mode 100644
index 063e0f8998ce..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/SelfDrivingOnboardingFlow.tsx
+++ /dev/null
@@ -1,290 +0,0 @@
-import { useActions, useValues } from 'kea'
-import { router } from 'kea-router'
-import { useEffect, useMemo, useState } from 'react'
-
-import { IconArrowLeft, IconArrowRight } from '@posthog/icons'
-import { LemonButton } from '@posthog/lemon-ui'
-
-import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows'
-import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
-import { cn } from 'lib/utils/css-classes'
-import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
-
-import { RealtimeCheckIndicator } from '../legacy/sdks/RealtimeCheckIndicator'
-import {
- onboardingEventUsageLogic,
- SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- type SelfDrivingOnboardingStepId,
-} from '../onboardingEventUsageLogic'
-import { resolveSetup } from '../shared/useCases'
-import type { OnboardingExtraStepId, OnboardingUseCaseKey } from '../shared/useCases'
-import { wizardSyncUiLogic } from '../shared/wizard-sync/wizardSyncUiLogic'
-import { InstallationTrackerGate } from './components/InstallationTracker'
-import { ManualSetupButton } from './components/SelfDrivingInstallOptions'
-import { onboardingLogic } from './onboardingLogic'
-import { RoughMark } from './RoughMark'
-import { AIObservabilityStep } from './steps/AIObservabilityStep'
-import { AuthorizedUrlsStep } from './steps/AuthorizedUrlsStep'
-import { BillingStep } from './steps/BillingStep'
-import { InstallStep } from './steps/InstallStep'
-import { ProductsStep } from './steps/ProductsStep'
-import { UseCasesStep } from './steps/UseCasesStep'
-import { WelcomeStep } from './steps/WelcomeStep'
-import { useCaseSelectionLogic } from './useCaseSelectionLogic'
-
-interface StepDef {
- id: SelfDrivingOnboardingStepId
- title: string
- Content: (props: { onContinue: () => void; onSkip: () => void; completing: boolean }) => JSX.Element
- skippable?: boolean
- /** Step provides its own primary action (e.g. plan picks), so suppress the footer Continue. */
- hideContinue?: boolean
- /** Tailwind `max-w-*` for the card on this step. Defaults to `max-w-xl`; wider steps (e.g. billing
- * with side-by-side plan cards) opt into more room. */
- maxWidth?: string
-}
-
-// The steps a use case can declare as `extraSteps` - only ones that need the user's own input.
-const EXTRA_STEPS: Record<OnboardingExtraStepId, StepDef> = {
- 'authorized-urls': {
- id: 'authorized-urls',
- title: 'Add your website URLs',
- Content: AuthorizedUrlsStep,
- hideContinue: true,
- },
- 'ai-observability': {
- id: 'ai-observability',
- title: 'Instrument your AI app',
- Content: AIObservabilityStep,
- hideContinue: true,
- maxWidth: 'max-w-2xl',
- },
-}
-
-function buildSteps(useCase: OnboardingUseCaseKey | null): StepDef[] {
- return [
- { id: 'welcome', title: '', Content: WelcomeStep },
- // The step id stays 'goals' so existing funnel queries continue to work.
- {
- id: 'goals',
- title: 'What do you want to get done first?',
- Content: UseCasesStep,
- hideContinue: true,
- maxWidth: 'max-w-2xl',
- },
- // The use case's product collection is shown before install so the user knows what they are getting.
- // The step id stays 'tools' so existing funnel queries continue to work.
- {
- id: 'tools',
- title: 'Your products',
- Content: ProductsStep,
- hideContinue: true,
- maxWidth: 'max-w-2xl',
- },
- { id: 'install', title: 'Install PostHog', Content: InstallStep },
- // The declared use case FILTERS what comes after install: only steps it can't reach its
- // finish line without. These steps render their own action zone, so the footer Continue is
- // suppressed.
- ...(resolveSetup(useCase).extraSteps ?? []).map((id) => EXTRA_STEPS[id]),
- {
- id: 'billing',
- title: 'Pick a plan',
- Content: BillingStep,
- hideContinue: true,
- maxWidth: 'max-w-3xl',
- },
- ]
-}
-
-// The card: chrome (sm+ panel; full-bleed on mobile) plus the content flex-column. Width varies per
-// step via StepDef.maxWidth — SelfDrivingOnboarding just provides the backdrop + logo.
-const CARD_CLASSES =
- 'relative w-full flex flex-col gap-5 overflow-hidden p-0 sm:max-h-[calc(100dvh-7rem)] sm:p-8 md:p-10 sm:bg-surface-primary sm:rounded-2xl sm:shadow-[0_16px_40px_rgb(30_50_10_/_25%)] sm:border sm:border-primary'
-
-export function SelfDrivingOnboardingFlow(): JSX.Element {
- const { claimInlinePanel, releaseInlinePanel } = useActions(wizardSyncUiLogic)
- // The flow surfaces the run itself (install-step tracker, header pill), so claim the inline
- // panel for its whole lifetime - the corner FAB never appears during onboarding.
- useEffect(() => {
- claimInlinePanel('local')
- return () => releaseInlinePanel('local')
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [])
- const { completeOnboarding } = useActions(onboardingLogic)
- const { isCompleting } = useValues(onboardingLogic)
- const { reportOnboardingStarted, reportOnboardingStepCompleted, reportOnboardingStepSkipped } =
- useActions(eventUsageLogic)
- const { reportOnboardingStepViewed, reportOnboardingInstallVerified } = useActions(onboardingEventUsageLogic)
- // The step list depends on the declared use case (persisted, so a refresh keeps the
- // conditional steps in place).
- const { selectedUseCase } = useValues(useCaseSelectionLogic)
- const steps = useMemo(() => buildSteps(selectedUseCase), [selectedUseCase])
- // Track the current step by id, not index, so use-case changes (which insert/remove steps)
- // can't shift the user onto a different step. Initialize from the URL so a refresh — or an OAuth
- // callback that lands back on ?step=install (e.g. the GitHub connect flow) — resumes where it
- // left off instead of restarting at welcome.
- const [stepId, setStepId] = useState<SelfDrivingOnboardingStepId>(() => {
- const fromUrl = steps.find((s) => s.id === router.values.searchParams['step'])
- return fromUrl?.id ?? 'welcome'
- })
-
- // If the current step left the list (e.g. the goal changed and removed it), fall back to the
- // start rather than rendering nothing.
- const stepIndex = Math.max(
- 0,
- steps.findIndex((s) => s.id === stepId)
- )
- const step = steps[stepIndex]
- const isFirst = stepIndex === 0
- const isLast = stepIndex === steps.length - 1
-
- // Funnel (GROW-89): `started` fires once per fresh entry — a ?step= resume (refresh, OAuth
- // callback) is a continuation, not a new start. `step viewed` fires for every step shown,
- // including the one this mounts on.
- useOnMountEffect(() => {
- if (stepIndex === 0) {
- reportOnboardingStarted(SELF_DRIVING_ONBOARDING_EVENT_PROPS)
- }
- })
- useEffect(() => {
- reportOnboardingStepViewed(step.id)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [step.id, reportOnboardingStepViewed])
-
- // Keep ?step= in sync as the user moves so the URL stays resumable, preserving any other params
- // (like the integration ids the GitHub callback appends).
- const goToStep = (index: number): void => {
- const target = steps[index]
- if (!target) {
- return
- }
- setStepId(target.id)
- router.actions.replace(router.values.location.pathname, {
- ...router.values.searchParams,
- step: target.id,
- })
- }
-
- const advance = (): void => {
- if (isLast) {
- // Marks onboarding complete (credits the sources turned on, plus the declared use
- // case's product) and navigates out, so sceneLogic doesn't bounce the user back in.
- completeOnboarding(selectedUseCase)
- return
- }
- goToStep(stepIndex + 1)
- }
- // Leaving a step forward is either completing it (Continue / the step's own primary action,
- // e.g. a queued cloud run or a plan pick) or skipping it — reported separately so the funnel
- // can tell drop-off from opt-out.
- const completeStep = (): void => {
- reportOnboardingStepCompleted(step.id, undefined, SELF_DRIVING_ONBOARDING_EVENT_PROPS)
- advance()
- }
- const skipStep = (): void => {
- reportOnboardingStepSkipped(step.id, undefined, SELF_DRIVING_ONBOARDING_EVENT_PROPS)
- advance()
- }
- const goBack = (): void => goToStep(Math.max(0, stepIndex - 1))
-
- return (
- // This div is the card: chrome + per-step width. On sm+ it's capped to the viewport so the middle
- // scrolls internally; on mobile the chrome drops and content flows (the page scrolls).
- <div className={cn(CARD_CLASSES, step.maxWidth ?? 'max-w-xl')}>
- {/* Pinned header: back button + progress share one row. Equal-width side slots keep the
- progress dots centered in the card regardless of whether the back button is shown. */}
- <div className="shrink-0 flex flex-col items-center gap-4">
- {/* The dots are absolutely centered so uneven side content (back button vs the
- verification chip or run pill) can never shift them off the card's midline. */}
- <div className="relative flex items-center justify-between gap-2 w-full min-h-8">
- <div className="w-8 shrink-0 flex justify-start">
- {!isFirst && (
- <LemonButton
- icon={<IconArrowLeft />}
- size="small"
- onClick={goBack}
- tooltip="Go back"
- aria-label="Go back"
- />
- )}
- </div>
- <div
- className="absolute left-1/2 -translate-x-1/2 flex items-center gap-1.5"
- role="group"
- aria-label={`Step ${stepIndex + 1} of ${steps.length}`}
- >
- {steps.map((s, i) => (
- <div
- key={s.id}
- className={`h-1.5 rounded-full transition-all ${
- i === stepIndex ? 'w-6 bg-accent' : 'w-1.5 bg-border'
- }`}
- />
- ))}
- </div>
- <div className="min-w-0 flex justify-end">
- {/* On the install step, live verification: flips when the team's first event
- lands, whichever install path produced it. Past the install step, the run
- keeps a quiet presence up here; on the install step itself the tracker
- lives in the content. */}
- {step.id === 'install' && (
- <RealtimeCheckIndicator
- teamPropertyToVerify="ingested_event"
- minimal
- onComplete={reportOnboardingInstallVerified}
- />
- )}
- {stepIndex > steps.findIndex((s) => s.id === 'install') && <InstallationTrackerGate />}
- </div>
- </div>
- {step.title && (
- <h1 className="text-2xl font-bold text-center m-0">
- {/* The hand-drawn squiggle from the website's section headers - only on the
- goals step, where the question is the hero. Keyed by title so the
- annotation is redrawn at the text's width (it only measures on mount). */}
- {step.id === 'goals' ? (
- <RoughMark key={step.title} type="underline" color="#f54e00" padding={4}>
- {step.title}
- </RoughMark>
- ) : (
- step.title
- )}
- </h1>
- )}
- </div>
-
- {/* Scrollable middle: fade edges + hover scrollbar so tall steps don't hard-crop. */}
- <ScrollableShadows direction="vertical" styledScrollbars className="flex-1 min-h-0" contentClassName="px-1">
- <step.Content onContinue={completeStep} onSkip={skipStep} completing={isLast && isCompleting} />
- </ScrollableShadows>
-
- {/* Pinned footer — omitted when the step has neither Skip nor a footer Continue (it supplies
- its own actions, e.g. the plan picks on billing). */}
- {(step.skippable || !step.hideContinue) && (
- <div className="shrink-0 flex items-center justify-between gap-2">
- {step.skippable ? (
- <LemonButton type="tertiary" size="small" onClick={skipStep}>
- Skip for now
- </LemonButton>
- ) : (
- <span />
- )}
- {!step.hideContinue && (
- <div className="flex items-center gap-2">
- {step.id === 'install' && <ManualSetupButton onAdvance={advance} />}
- <LemonButton
- type="primary"
- status="alt"
- sideIcon={<IconArrowRight />}
- onClick={completeStep}
- loading={isLast && isCompleting}
- >
- {isLast ? 'Finish' : isFirst ? 'Get started' : 'Continue'}
- </LemonButton>
- </div>
- )}
- </div>
- )}
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/InstallationTracker.tsx b/frontend/src/scenes/onboarding/self-driving/components/InstallationTracker.tsx
deleted file mode 100644
index 84ba6b4287c1..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/InstallationTracker.tsx
+++ /dev/null
@@ -1,105 +0,0 @@
-import { useActions, useMountedLogic, useValues } from 'kea'
-import { useEffect } from 'react'
-
-import { cn } from 'lib/utils/css-classes'
-import { userLogic } from 'scenes/userLogic'
-
-import { elapsedLabel, resolveStartedByLabel, syncHeadline, toneTextClass } from '../../shared/wizard-sync/helpers'
-import { useRunElapsedSeconds } from '../../shared/wizard-sync/hooks'
-import { installationProgressLogic } from '../../shared/wizard-sync/installationProgressLogic'
-import { StatusGlyph } from '../../shared/wizard-sync/StatusGlyph'
-import {
- watchWorkflowWhileMounted,
- wizardActiveSessionDetectorLogic,
-} from '../../shared/wizard-sync/wizardActiveSessionDetectorLogic'
-import { WizardSyncDialog } from '../../shared/wizard-sync/WizardSyncDialog'
-import { wizardSyncUiLogic } from '../../shared/wizard-sync/wizardSyncUiLogic'
-import { SELF_DRIVING_WORKFLOW_ID } from '../../shared/wizard-sync/workflows'
-
-/**
- * The self-driving flow's in-card run tracker: a compact clickable summary of the wizard run that
- * opens the full progress dialog. `card` replaces the install step's command block while the run is
- * going; `pill` sits in the flow header on the steps after it. The onboarding shows the run through
- * these (and claims the inline panel), so the corner FAB never appears here.
- */
-export function InstallationTracker({ variant }: { variant: 'card' | 'pill' }): JSX.Element | null {
- const { installationProgress, latestSession } = useValues(
- installationProgressLogic({ mode: 'local', workflowId: SELF_DRIVING_WORKFLOW_ID })
- )
- const { dialogOpen } = useValues(wizardSyncUiLogic)
- const { openDialog, closeDialog, openHandoffDoc } = useActions(wizardSyncUiLogic)
- const { user } = useValues(userLogic)
-
- const isTerminal = installationProgress.phase === 'completed' || installationProgress.phase === 'error'
- const elapsedSeconds = useRunElapsedSeconds(
- latestSession?.started_at,
- isTerminal ? latestSession?.updated_at : undefined
- )
-
- if (!installationProgress.isCurrent) {
- return null
- }
-
- const handoffText = installationProgress.handoffText
- const runKey = latestSession?.session_id
- const handleViewReport =
- handoffText && runKey ? () => openHandoffDoc({ key: runKey, text: handoffText }) : undefined
-
- return (
- <>
- {variant === 'card' ? (
- <button
- type="button"
- onClick={openDialog}
- data-attr="self-driving-installation-tracker-card"
- className="OnboardingProductCard w-full flex items-center gap-3 p-4 rounded-lg border text-left cursor-pointer transition-all hover:shadow-sm"
- >
- <StatusGlyph progress={installationProgress} />
- <div className="flex-1 min-w-0 flex flex-col gap-0.5">
- <span className="text-sm font-semibold">PostHog setup</span>
- <span className={cn('text-xs', toneTextClass(installationProgress))}>
- {syncHeadline(installationProgress)}
- </span>
- </div>
- <span className="text-xs text-muted tabular-nums shrink-0">{elapsedLabel(elapsedSeconds)}</span>
- </button>
- ) : (
- <button
- type="button"
- onClick={openDialog}
- aria-label="Show PostHog setup progress"
- data-attr="self-driving-installation-tracker-pill"
- className="flex items-center gap-1.5 rounded-full border bg-surface-primary pl-1.5 pr-2.5 py-1 hover:bg-fill-highlight-50 transition-colors cursor-pointer"
- >
- <StatusGlyph progress={installationProgress} />
- <span className="text-xs text-muted tabular-nums whitespace-nowrap">
- {elapsedLabel(elapsedSeconds)}
- </span>
- </button>
- )}
- <WizardSyncDialog
- progress={installationProgress}
- elapsedSeconds={elapsedSeconds}
- mode="local"
- isOpen={dialogOpen}
- onClose={closeDialog}
- onViewReport={handleViewReport}
- startedByLabel={resolveStartedByLabel(installationProgress.startedBy, user?.email)}
- />
- </>
- )
-}
-
-/**
- * Gate for surfaces that don't already stream the run (the flow header): opens the session stream
- * only once the cheap detector poll says a self-driving run is in flight.
- */
-export function InstallationTrackerGate(): JSX.Element | null {
- useMountedLogic(wizardActiveSessionDetectorLogic)
- const { shouldStream, activeWorkflowId } = useValues(wizardActiveSessionDetectorLogic)
- useEffect(() => watchWorkflowWhileMounted(SELF_DRIVING_WORKFLOW_ID), [])
- if (!shouldStream || activeWorkflowId !== SELF_DRIVING_WORKFLOW_ID) {
- return null
- }
- return <InstallationTracker variant="pill" />
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/PlanCard.tsx b/frontend/src/scenes/onboarding/self-driving/components/PlanCard.tsx
deleted file mode 100644
index c297fa05c042..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/PlanCard.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import { type ReactNode } from 'react'
-
-import { LemonCard } from 'lib/lemon-ui/LemonCard'
-import { cn } from 'lib/utils/css-classes'
-
-/**
- * One plan option: header (name + price), body, footnote, and a bottom-pinned CTA. The two plan
- * cards differ only in this data plus whether they carry the accent border, so the shape lives here
- * and the call sites read as content.
- */
-export function PlanCard({
- title,
- titleCaption,
- priceLabel,
- highlighted = false,
- footnote,
- cta,
- children,
-}: {
- title: string
- /** Small line under the title (e.g. "Free allowance included"). */
- titleCaption?: string
- /** Right-aligned price text in the header. */
- priceLabel?: string | null
- /** Accent border, for the plan we want the eye on. */
- highlighted?: boolean
- footnote?: string
- cta: ReactNode
- children: ReactNode
-}): JSX.Element {
- return (
- <LemonCard hoverEffect={false} focused={highlighted} className={cn('flex flex-1 basis-72 flex-col gap-3 p-4')}>
- <div className="flex items-baseline justify-between gap-2">
- <div>
- <p className="m-0 text-base font-semibold">{title}</p>
- {titleCaption && <p className="m-0 text-xs text-muted">{titleCaption}</p>}
- </div>
- {priceLabel && <p className="m-0 text-sm text-muted">{priceLabel}</p>}
- </div>
- {children}
- {footnote && <p className="m-0 text-xs text-muted">{footnote}</p>}
- <div className="mt-auto">{cta}</div>
- </LemonCard>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/PlanChoice.tsx b/frontend/src/scenes/onboarding/self-driving/components/PlanChoice.tsx
deleted file mode 100644
index 40778ca05819..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/PlanChoice.tsx
+++ /dev/null
@@ -1,126 +0,0 @@
-import { useActions, useValues } from 'kea'
-
-import { LemonButton } from '@posthog/lemon-ui'
-
-import { BillingUpgradeCTA } from 'lib/components/BillingUpgradeCTA'
-import { pluralize } from 'lib/utils/strings'
-import { freePrs, pricePerPrUsd } from 'scenes/billing/inboxPricing'
-import { paymentEntryLogic } from 'scenes/billing/paymentEntryLogic'
-import { onboardingEventUsageLogic } from 'scenes/onboarding/onboardingEventUsageLogic'
-import { PlanCard } from 'scenes/onboarding/self-driving/components/PlanCard'
-import { ProductFreeTiers } from 'scenes/onboarding/self-driving/components/ProductFreeTiers'
-import { SelfDrivingPricing } from 'scenes/onboarding/self-driving/components/SelfDrivingPricing'
-import { formatUsd } from 'scenes/onboarding/self-driving/utils'
-import { CheckList } from 'scenes/onboarding/shared/components/CheckList'
-
-import { type BillingProductV2Type } from '~/types'
-
-/** The free vs pay-as-you-go pick, under the pricing headline. */
-export function PlanChoice({
- platformProduct,
- inboxProduct,
- products,
- onContinue,
- completing,
-}: {
- platformProduct: BillingProductV2Type | null
- inboxProduct: BillingProductV2Type | null
- products: BillingProductV2Type[] | undefined
- onContinue: () => void
- /** The free pick finishes onboarding, which writes to the team before navigating. */
- completing: boolean
-}): JSX.Element {
- const { startPaymentEntryFlow } = useActions(paymentEntryLogic)
- const { reportOnboardingPlanSelected } = useActions(onboardingEventUsageLogic)
- // Guard the subscribe button against double-submit: `isLoading` covers the returning-customer
- // activate call, `paymentEntryModalOpen` covers a new customer once the Stripe modal is up.
- const { isLoading, paymentEntryModalOpen } = useValues(paymentEntryLogic)
- const subscribing = isLoading || paymentEntryModalOpen
-
- const included = freePrs(inboxProduct)
- const perPrUsd = pricePerPrUsd(inboxProduct)
-
- // Reported at the pick, not at payment completion — whether payment then resolves is billing's
- // own funnel (GROW-89).
- const subscribe = (): void => {
- reportOnboardingPlanSelected('pay_as_you_go')
- // Returning the user to the same URL keeps them in the onboarding flow once payment resolves.
- startPaymentEntryFlow(platformProduct, window.location.pathname + window.location.search)
- }
- const continueFree = (): void => {
- reportOnboardingPlanSelected('free')
- onContinue()
- }
-
- return (
- <div className="flex flex-wrap gap-3">
- <SelfDrivingPricing product={inboxProduct} />
-
- <PlanCard
- title="Free"
- priceLabel="$0 / month"
- footnote="Agents pause shipping once the free pull requests are used up, instead of charging you."
- cta={
- <LemonButton
- type="secondary"
- fullWidth
- center
- onClick={continueFree}
- loading={completing}
- data-attr="self-driving-onboarding-free"
- >
- Start free
- </LemonButton>
- }
- >
- <CheckList
- items={[
- {
- content:
- included > 0 ? (
- <>
- <strong>{pluralize(included, 'pull request', undefined)}</strong> a month,
- shipped and reviewed
- </>
- ) : (
- 'A monthly allowance of shipped pull requests'
- ),
- },
- { content: 'No payment method needed' },
- ]}
- />
- </PlanCard>
-
- <PlanCard
- title="Pay-as-you-go"
- titleCaption="Free allowance included"
- priceLabel={perPrUsd !== null ? `${formatUsd(perPrUsd)} per shipped PR` : null}
- highlighted
- cta={
- <BillingUpgradeCTA
- type="primary"
- status="alt"
- fullWidth
- center
- loading={subscribing}
- disabledReason={subscribing ? 'Opening payment…' : undefined}
- disableClientSideRouting
- onClick={subscribe}
- data-attr="self-driving-onboarding-subscribe"
- >
- Add payment method
- </BillingUpgradeCTA>
- }
- >
- <CheckList
- items={[
- { content: 'Agents keep shipping past the free allowance' },
- { content: 'Set a spend limit whenever you want' },
- ]}
- />
- </PlanCard>
-
- <ProductFreeTiers products={products} />
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/ProductFreeTiers.tsx b/frontend/src/scenes/onboarding/self-driving/components/ProductFreeTiers.tsx
deleted file mode 100644
index d522194b230f..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/ProductFreeTiers.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { pluralize } from 'lib/utils/strings'
-import { compact } from 'scenes/onboarding/self-driving/utils'
-import { CheckList } from 'scenes/onboarding/shared/components/CheckList'
-import { availableOnboardingProducts } from 'scenes/onboarding/shared/utils'
-
-import { type BillingProductV2Type } from '~/types'
-
-/**
- * Monthly free allowance on the products the wizard turns on, so the plan reads as the whole platform
- * rather than PRs alone. It sits under both plans because subscribing changes nothing about it:
- * every product keeps the same free tier either way.
- */
-export function ProductFreeTiers({ products }: { products: BillingProductV2Type[] | undefined }): JSX.Element | null {
- const allowances = (products ?? [])
- .filter((product) => product.type in availableOnboardingProducts)
- .map((product) => {
- const freePlan = product.plans.find((plan) => plan.plan_key?.startsWith('free'))
- return { name: product.name, unit: freePlan?.unit ?? '', value: freePlan?.free_allocation ?? 0 }
- })
- .filter((allowance) => allowance.unit && allowance.value > 0)
-
- if (allowances.length === 0) {
- return null
- }
-
- return (
- <div className="w-full flex flex-col gap-2">
- <p className="m-0 text-xs text-muted">Every other product keeps its free tier on both plans:</p>
- <CheckList
- size="xs"
- className="grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-1"
- items={allowances.map(({ name, unit, value }) => ({
- content: (
- <span className="text-muted">
- <strong className="font-semibold text-default">{name}</strong>: {compact(value)}{' '}
- {pluralize(value, unit, undefined, false)} a month
- </span>
- ),
- }))}
- />
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/SelfDrivingInstallOptions.tsx b/frontend/src/scenes/onboarding/self-driving/components/SelfDrivingInstallOptions.tsx
deleted file mode 100644
index be735257841a..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/SelfDrivingInstallOptions.tsx
+++ /dev/null
@@ -1,209 +0,0 @@
-import { useActions, useValues } from 'kea'
-import { useEffect, useState } from 'react'
-
-import { IconCheckCircle } from '@posthog/icons'
-import { LemonButton, LemonModal, Link } from '@posthog/lemon-ui'
-
-import { useAdblockDetection } from 'scenes/onboarding/legacy/sdks/hooks/useAdblockDetection'
-import { useInstallationComplete } from 'scenes/onboarding/legacy/sdks/hooks/useInstallationComplete'
-import { SDKGrid } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep/SDKGrid'
-import { SDKInstructionsModal } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep/SDKInstructionsModal'
-import { ProductAnalyticsSDKInstructions } from 'scenes/onboarding/legacy/sdks/product-analytics/ProductAnalyticsSDKInstructions'
-import { sdksLogic } from 'scenes/onboarding/legacy/sdks/sdksLogic'
-import { onboardingEventUsageLogic } from 'scenes/onboarding/onboardingEventUsageLogic'
-import { CheckList } from 'scenes/onboarding/shared/components/CheckList'
-import { useWizardCommand } from 'scenes/onboarding/shared/useWizardCommand'
-import { useLocalWizardRunActive } from 'scenes/onboarding/shared/wizard-sync/hooks'
-import { WizardCommandBlock } from 'scenes/onboarding/shared/wizard-sync/WizardCommandBlock'
-import { WizardInstallOptions } from 'scenes/onboarding/shared/wizard-sync/WizardInstallOptions'
-import { SELF_DRIVING_WORKFLOW_ID } from 'scenes/onboarding/shared/wizard-sync/workflows'
-import { teamLogic } from 'scenes/teamLogic'
-
-import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { type SDK } from '~/types'
-
-import { DOCS_URL_BY_PRODUCT_PATH, ONBOARDING_PRODUCTS, resolveSetup, productIconType } from '../../shared/useCases'
-import { useCaseSelectionLogic } from '../useCaseSelectionLogic'
-import { InstallationTracker } from './InstallationTracker'
-
-/** A quiet reminder of what the install feeds: the use case's products, as icons and names. */
-function ProductsBeingInstalled(): JSX.Element {
- const { selectedUseCase } = useValues(useCaseSelectionLogic)
- const products = resolveSetup(selectedUseCase).products.map((key) => ONBOARDING_PRODUCTS[key])
- return (
- <div className="flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-xs text-muted">
- <span>Products for your setup:</span>
- {products.map((product) => (
- <Link
- key={product.productPath}
- to={DOCS_URL_BY_PRODUCT_PATH[product.productPath]}
- target="_blank"
- className="flex items-center gap-1 text-muted hover:text-default"
- >
- <span className="flex text-sm group/colorful-product-icons colorful-product-icons-true">
- {iconForType(productIconType(product))}
- </span>
- {product.displayName ?? product.productPath}
- </Link>
- ))}
- </div>
- )
-}
-
-/** What the self-driving run wires up, so the command isn't a leap of faith. */
-const WIZARD_SETS_UP = [
- 'Installs the SDK and wires up event capture',
- 'Connects GitHub so agents can open pull requests',
- 'Sets up scouts that send findings to your Inbox',
-]
-
-// The self-driving run is interactive: it asks about your issue tracker, walks you through the
-// GitHub App install, and proposes scouts. The cloud runner can't do any of that (it runs headless
-// and the CLI rejects `--ci` for this program), so the cloud arm is forced off here rather than
-// being left to the experiment flag.
-export function SelfDrivingInstallOptions({ onContinue }: { onContinue: () => void }): JSX.Element {
- const { isCloudOrDev } = useWizardCommand()
- const { reportOnboardingInstallModeSelected, reportOnboardingSelfDrivingExplainerClicked } =
- useActions(onboardingEventUsageLogic)
- // Once the CLI registers a run, the command block and its caption give way to the tracker -
- // the command has been run, so repeating it is noise.
- const isRunActive = useLocalWizardRunActive(SELF_DRIVING_WORKFLOW_ID)
-
- // Self-hosted: the wizard CLI only targets cloud + dev, so the command block renders nothing.
- // Show a real, actionable fallback instead of an empty step.
- if (!isCloudOrDev) {
- return (
- <div className="flex flex-col gap-3">
- <p className="text-sm text-muted m-0">
- Install the PostHog SDK for your framework and your product's context starts flowing in, ready for
- agents to act on.
- </p>
- <LemonButton type="primary" to="https://posthog.com/docs/getting-started/install" targetBlank>
- Read the install docs
- </LemonButton>
- </div>
- )
- }
-
- return (
- <div className="flex flex-col gap-4">
- <p className="text-sm text-muted text-center m-0">
- Run this command in your project. The setup agent detects your framework, installs the SDK, and starts
- capturing events.{' '}
- <Link
- to="https://posthog.com/self-driving"
- target="_blank"
- targetBlankIcon={false}
- onClick={() => reportOnboardingSelfDrivingExplainerClicked('install')}
- data-attr="self-driving-explainer-link"
- >
- What is self-driving?
- </Link>
- </p>
- <WizardInstallOptions
- hideHog
- offerCloudRun={false}
- onQueued={onContinue}
- onModeSelected={reportOnboardingInstallModeSelected}
- localBlock={
- <div className="flex flex-col gap-2">
- {isRunActive ? (
- <InstallationTracker variant="card" />
- ) : (
- <WizardCommandBlock
- hideHog
- subcommand="self-driving"
- description="About ten minutes: a few questions up front, then the agent does the rest."
- />
- )}
- <ProductsBeingInstalled />
- </div>
- }
- />
- <div className="flex justify-center">
- <CheckList
- size="xs"
- items={WIZARD_SETS_UP.map((line) => ({
- icon: <IconCheckCircle />,
- content: <span className="text-muted">{line}</span>,
- }))}
- />
- </div>
- </div>
- )
-}
-
-/**
- * The manual escape hatch, rendered by the flow footer next to Continue on the install step.
- * Opens the legacy manual-setup dialog: the SDK grid, then per-SDK instructions. Picking an SDK
- * closes the grid and opens the instructions; closing the instructions reopens the grid.
- */
-export function ManualSetupButton({ onAdvance }: { onAdvance: () => void }): JSX.Element {
- const { reportOnboardingInstallModeSelected } = useActions(onboardingEventUsageLogic)
- const { setAvailableSDKInstructionsMap, selectSDK, setSearchTerm, setSelectedTag } = useActions(sdksLogic)
- const { filteredSDKs, selectedSDK, tags, searchTerm, selectedTag } = useValues(sdksLogic)
- const { currentTeam } = useValues(teamLogic)
- const installationComplete = useInstallationComplete('ingested_event')
- const adblockResult = useAdblockDetection()
- const [gridOpen, setGridOpen] = useState(false)
- const [instructionsOpen, setInstructionsOpen] = useState(false)
-
- // The same map the legacy default flow shows: one install covers the core web products.
- useEffect(() => {
- setAvailableSDKInstructionsMap(ProductAnalyticsSDKInstructions)
- }, [setAvailableSDKInstructionsMap])
-
- const handleSDKClick = (sdk: SDK): void => {
- selectSDK(sdk)
- setGridOpen(false)
- setInstructionsOpen(true)
- }
-
- return (
- <>
- <LemonButton
- type="tertiary"
- size="small"
- onClick={() => {
- reportOnboardingInstallModeSelected('manual')
- setGridOpen(true)
- }}
- data-attr="self-driving-manual-setup"
- >
- Set up manually
- </LemonButton>
- <LemonModal isOpen={gridOpen} onClose={() => setGridOpen(false)} title="Manual SDK setup" width="80vw">
- <div className="p-4">
- <SDKGrid
- filteredSDKs={filteredSDKs ?? []}
- searchTerm={searchTerm}
- selectedTag={selectedTag}
- tags={tags}
- onSDKClick={handleSDKClick}
- onSearchChange={setSearchTerm}
- onTagChange={setSelectedTag}
- currentTeam={currentTeam}
- showTopControls
- installationComplete={installationComplete}
- showTopSkipButton={false}
- />
- </div>
- </LemonModal>
- {selectedSDK && (
- <SDKInstructionsModal
- isOpen={instructionsOpen && !gridOpen}
- onClose={() => {
- setInstructionsOpen(false)
- setGridOpen(true)
- }}
- sdk={selectedSDK}
- sdkInstructionMap={ProductAnalyticsSDKInstructions}
- adblockResult={adblockResult}
- verifyingProperty="ingested_event"
- verifyingName="event"
- onAdvance={onAdvance}
- />
- )}
- </>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/SelfDrivingPricing.tsx b/frontend/src/scenes/onboarding/self-driving/components/SelfDrivingPricing.tsx
deleted file mode 100644
index cbc640ed07aa..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/SelfDrivingPricing.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { pluralize } from 'lib/utils/strings'
-import { freePrs, pricePerPrUsd } from 'scenes/billing/inboxPricing'
-import { StatFigure } from 'scenes/onboarding/self-driving/components/StatFigure'
-import { formatUsd } from 'scenes/onboarding/self-driving/utils'
-
-import { type BillingProductV2Type } from '~/types'
-
-/**
- * The headline: what self-driving costs, before the plans that differ only in what happens after
- * the free PRs run out.
- *
- * The numbers are optional on purpose. Billing may not carry the inbox product (an instance without
- * it in its plans config, or a request that came back thin), and the pricing model is still the
- * point of this screen, so the copy stands on its own and only the figures drop out.
- */
-export function SelfDrivingPricing({ product }: { product: BillingProductV2Type | null }): JSX.Element {
- const included = freePrs(product)
- const perPr = pricePerPrUsd(product)
-
- return (
- <div className="OnboardingProductCard w-full flex flex-col gap-3 p-4 rounded-lg border">
- <p className="m-0 text-sm font-semibold">You pay for shipped work, nothing else</p>
- {(included > 0 || perPr !== null) && (
- <div className="flex flex-wrap items-start gap-x-10 gap-y-3">
- {included > 0 && (
- <StatFigure
- value={included}
- label={`${pluralize(included, 'pull request', undefined, false)} a month, free`}
- />
- )}
- {perPr !== null && <StatFigure value={formatUsd(perPr)} label="per pull request after that" />}
- </div>
- )}
- <p className="m-0 text-xs text-muted">
- Scouts, signals, and reports never cost anything. You're charged only when an agent ships a pull request
- you can review.
- </p>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/StatFigure.tsx b/frontend/src/scenes/onboarding/self-driving/components/StatFigure.tsx
deleted file mode 100644
index c63adce4d0fd..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/StatFigure.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-/** A big figure with a small caption — the pricing headline's number pairs. */
-export function StatFigure({ value, label }: { value: string | number; label: string }): JSX.Element {
- return (
- <div>
- <p className="m-0 text-2xl font-bold leading-tight">{value}</p>
- <p className="m-0 text-xs text-muted">{label}</p>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/components/SubscribedState.tsx b/frontend/src/scenes/onboarding/self-driving/components/SubscribedState.tsx
deleted file mode 100644
index 751958874e8e..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/components/SubscribedState.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { LemonBanner, LemonButton } from '@posthog/lemon-ui'
-
-/** The billing step's short-circuit for a team that already subscribed: confirm and move on. */
-export function SubscribedState({
- onContinue,
- completing,
-}: {
- onContinue: () => void
- completing: boolean
-}): JSX.Element {
- return (
- <div className="flex flex-col gap-3">
- <LemonBanner type="success">
- <p className="m-0 text-sm font-semibold">You're on pay-as-you-go</p>
- <p className="m-0 text-xs font-normal">
- Agents keep watching and reporting for free. You only pay when one ships a PR.
- </p>
- </LemonBanner>
- <p className="text-xs text-muted m-0">Change or cancel any time from billing settings.</p>
- <LemonButton type="primary" status="alt" onClick={onContinue} loading={completing} className="self-end">
- Go to the Inbox
- </LemonButton>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/onboardingLogic.test.ts b/frontend/src/scenes/onboarding/self-driving/onboardingLogic.test.ts
deleted file mode 100644
index b23be89f7dd4..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/onboardingLogic.test.ts
+++ /dev/null
@@ -1,211 +0,0 @@
-import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'
-
-import { expectLogic } from 'kea-test-utils'
-import posthog from 'posthog-js'
-
-import { teamLogic } from 'scenes/teamLogic'
-
-import { resumeKeaLoadersErrors, silenceKeaLoadersErrors } from '~/initKea'
-import { useMocks } from '~/mocks/jest'
-import { ProductIntentContext, ProductKey } from '~/queries/schema/schema-general'
-import { initKeaTests } from '~/test/init'
-
-import { onboardingLogic } from './onboardingLogic'
-import { useCaseSelectionLogic } from './useCaseSelectionLogic'
-
-describe('onboardingLogic', () => {
- let logic: ReturnType<typeof onboardingLogic.build>
-
- beforeEach(() => {
- localStorage.clear()
- useMocks({
- get: {
- '/api/environments/:team_id/user_product_list': async () => [200, { results: [], count: 0 }],
- },
- patch: {
- '/api/environments/:team_id/': async ({ request }) => [
- 200,
- { ...MOCK_DEFAULT_TEAM, ...((await request.json()) as Record<string, unknown>) },
- ],
- '/api/environments/:team_id/add_product_intent/': async () => [200, { product_intents: [] }],
- '/api/environments/:team_id/complete_product_onboarding': async () => [200, { product_intents: [] }],
- },
- })
- initKeaTests()
- logic = onboardingLogic()
- logic.mount()
- })
-
- afterEach(() => {
- logic.unmount()
- })
-
- it('persists both onboarding completion signals', async () => {
- await expectLogic(logic, () => {
- logic.actions.completeOnboarding()
- }).toDispatchActions([
- (action) => {
- if (action.type !== logic.actionTypes.updateCurrentTeam) {
- return false
- }
- if (!action.payload.completed_snippet_onboarding) {
- return false
- }
- expect(action.payload).toMatchObject({
- completed_snippet_onboarding: true,
- has_completed_onboarding_for: { [ProductKey.PRODUCT_ANALYTICS]: true },
- })
- return true
- },
- ])
- })
-
- it('short-circuits when a completion is already in flight', async () => {
- logic.actions.setIsCompleting(true)
- await expectLogic(logic, () => {
- logic.actions.completeOnboarding()
- }).toNotHaveDispatchedActions(['updateCurrentTeam'])
- })
-
- it('sets the selected products required options before completing onboarding', async () => {
- const updates: Record<string, unknown>[] = []
- teamLogic.actions.loadCurrentTeamSuccess({
- ...MOCK_DEFAULT_TEAM,
- session_recording_masking_config: null,
- })
- useMocks({
- patch: {
- '/api/environments/:team_id/': async ({ request }) => {
- const update = (await request.json()) as Record<string, unknown>
- updates.push(update)
- return [200, { ...MOCK_DEFAULT_TEAM, ...update }]
- },
- },
- })
-
- await logic.asyncActions.completeOnboarding('find_problems')
-
- expect(updates).toEqual(
- expect.arrayContaining([
- {
- autocapture_exceptions_opt_in: true,
- },
- {
- session_recording_opt_in: true,
- session_recording_masking_config: { maskAllInputs: true },
- capture_console_log_opt_in: true,
- capture_performance_opt_in: true,
- },
- ])
- )
- })
-
- it('records each selected product once and persists completion last', async () => {
- let addIntentRequests = 0
- let customProductLoads = 0
- const intents: { intent_context: ProductIntentContext; product_type: ProductKey }[] = []
- const writes: string[] = []
- teamLogic.actions.loadCurrentTeamSuccess({ ...MOCK_DEFAULT_TEAM, surveys_opt_in: true })
- useMocks({
- get: {
- '/api/environments/:team_id/user_product_list': () => {
- customProductLoads++
- return [200, { results: [], count: 0 }]
- },
- },
- patch: {
- '/api/environments/:team_id/': async ({ request }) => {
- const update = (await request.json()) as Record<string, unknown>
- if (update.completed_snippet_onboarding) {
- writes.push('completion')
- }
- return [200, { ...MOCK_DEFAULT_TEAM, ...update }]
- },
- '/api/environments/:team_id/add_product_intent/': () => {
- addIntentRequests++
- return [200, { product_intents: [] }]
- },
- '/api/environments/:team_id/complete_product_onboarding': async ({ request }) => {
- const intent = (await request.json()) as {
- intent_context: ProductIntentContext
- product_type: ProductKey
- }
- intents.push(intent)
- writes.push(`intent:${intent.product_type}`)
- return [200, { ...MOCK_DEFAULT_TEAM, product_intents: [] }]
- },
- },
- })
- useCaseSelectionLogic.actions.selectUseCase('find_problems')
-
- await logic.asyncActions.completeOnboarding('find_problems')
-
- expect(addIntentRequests).toBe(0)
- expect(intents).toHaveLength(5)
- expect(new Set(intents.map(({ product_type }) => product_type)).size).toBe(5)
- expect(intents).not.toContainEqual(expect.objectContaining({ product_type: ProductKey.SURVEYS }))
- expect(intents).not.toContainEqual(expect.objectContaining({ product_type: ProductKey.METRICS }))
- expect(intents).toEqual(
- expect.arrayContaining([
- {
- product_type: ProductKey.ERROR_TRACKING,
- intent_context: ProductIntentContext.ONBOARDING_PRODUCT_SELECTED_PRIMARY,
- },
- {
- product_type: ProductKey.SESSION_REPLAY,
- intent_context: ProductIntentContext.ONBOARDING_PRODUCT_SELECTED_SECONDARY,
- },
- {
- product_type: ProductKey.CONVERSATIONS,
- intent_context: ProductIntentContext.ONBOARDING_PRODUCT_SELECTED_SECONDARY,
- },
- ])
- )
- expect(customProductLoads).toBe(1)
- expect(writes.at(-1)).toBe('completion')
- expect(useCaseSelectionLogic.values.selectedUseCase).toBeNull()
- })
-
- it('reports onboarding completion once with the shared event schema', async () => {
- const capture = jest.spyOn(posthog, 'capture')
-
- await logic.asyncActions.completeOnboarding('find_problems')
-
- expect(capture.mock.calls.filter(([event]) => event === 'onboarding completed')).toEqual([
- [
- 'onboarding completed',
- {
- product_key: ProductKey.ERROR_TRACKING,
- version: 2,
- flow_variant: 'context_first',
- entry_point: 'welcome',
- },
- ],
- ])
- capture.mockRestore()
- })
-
- it('does not persist completion when a product intent request fails', async () => {
- let completionUpdates = 0
- silenceKeaLoadersErrors()
- useMocks({
- patch: {
- '/api/environments/:team_id/': async ({ request }) => {
- const update = (await request.json()) as Record<string, unknown>
- if (update.completed_snippet_onboarding) {
- completionUpdates++
- }
- return [200, { ...MOCK_DEFAULT_TEAM, ...update }]
- },
- '/api/environments/:team_id/complete_product_onboarding': () => [500, {}],
- },
- })
-
- try {
- await logic.asyncActions.completeOnboarding('find_problems')
- expect(completionUpdates).toBe(0)
- } finally {
- resumeKeaLoadersErrors()
- }
- })
-})
diff --git a/frontend/src/scenes/onboarding/self-driving/onboardingLogic.ts b/frontend/src/scenes/onboarding/self-driving/onboardingLogic.ts
deleted file mode 100644
index a12937962ccf..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/onboardingLogic.ts
+++ /dev/null
@@ -1,190 +0,0 @@
-import { MakeLogicType, actions, connect, kea, listeners, path, reducers } from 'kea'
-import { router } from 'kea-router'
-
-import { lemonToast } from '@posthog/lemon-ui'
-
-import { eventUsageLogic, type OnboardingEventProperties } from 'lib/utils/eventUsageLogic'
-import { completeProductOnboarding, teamLogic } from 'scenes/teamLogic'
-import { urls } from 'scenes/urls'
-
-import { customProductsLogic } from '~/layout/panel-layout/ProjectTree/customProductsLogic'
-import { ProductIntentContext, ProductKey } from '~/queries/schema/schema-general'
-import type { TeamPublicType, TeamType } from '~/types'
-
-import { SELF_DRIVING_ONBOARDING_EVENT_PROPS } from '../onboardingEventUsageLogic'
-import { optionsForSetup, productKeysForSetup, resolveSetup } from '../shared/useCases'
-import type { TeamOption } from '../shared/useCases'
-import type { OnboardingUseCaseKey } from '../shared/useCases'
-import { useCaseSelectionLogic } from './useCaseSelectionLogic'
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface onboardingLogicValues {
- currentTeam: TeamPublicType | TeamType | null // teamLogic
- isCompleting: boolean
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface onboardingLogicActions {
- loadCustomProducts: () => any // customProductsLogic
- reportOnboardingCompleted: (
- productKey: string,
- properties?: OnboardingEventProperties | undefined
- ) => {
- productKey: string
- properties: OnboardingEventProperties | undefined
- } // eventUsageLogic
- updateCurrentTeam: (payload: Partial<TeamType>) => Partial<TeamType> // teamLogic
- clearUseCase: () => {
- value: true
- } // useCaseSelectionLogic
- completeOnboarding: (useCase?: OnboardingUseCaseKey | null) => {
- useCase: OnboardingUseCaseKey | null
- }
- setIsCompleting: (isCompleting: boolean) => {
- isCompleting: boolean
- }
-}
-
-export type onboardingLogicType = MakeLogicType<onboardingLogicValues, onboardingLogicActions>
-
-function completedOnboardingMap(
- team: TeamPublicType | TeamType | null,
- products: ProductKey[]
-): Record<string, boolean> {
- const completedMap: Record<string, boolean> = { ...team?.has_completed_onboarding_for }
- for (const productKey of products) {
- completedMap[productKey] = true
- }
- return completedMap
-}
-
-function optionsPayload(team: TeamPublicType | TeamType | null, options: TeamOption[]): Partial<TeamType> {
- return {
- ...(options.includes('session_recording') ? { session_recording_opt_in: true } : {}),
- ...(options.includes('replay_masking_floor') && team?.session_recording_masking_config == null
- ? { session_recording_masking_config: { maskAllInputs: true } }
- : {}),
- ...(options.includes('exception_autocapture') ? { autocapture_exceptions_opt_in: true } : {}),
- ...(options.includes('web_vitals') ? { autocapture_web_vitals_opt_in: true } : {}),
- ...(options.includes('console_log_capture') ? { capture_console_log_opt_in: true } : {}),
- ...(options.includes('network_performance') ? { capture_performance_opt_in: true } : {}),
- ...(options.includes('heatmaps') ? { heatmaps_opt_in: true } : {}),
- ...(options.includes('dead_clicks') ? { capture_dead_clicks: true } : {}),
- }
-}
-
-export const onboardingLogic = kea<onboardingLogicType>([
- path(['scenes', 'onboarding', 'self-driving', 'onboardingLogic']),
-
- connect(() => ({
- values: [teamLogic, ['currentTeam']],
- actions: [
- teamLogic,
- ['updateCurrentTeam'],
- customProductsLogic,
- ['loadCustomProducts'],
- useCaseSelectionLogic,
- ['clearUseCase'],
- eventUsageLogic,
- ['reportOnboardingCompleted'],
- ],
- })),
-
- actions({
- completeOnboarding: (useCase?: OnboardingUseCaseKey | null) => ({ useCase: useCase ?? null }),
- setIsCompleting: (isCompleting: boolean) => ({ isCompleting }),
- }),
-
- reducers({
- isCompleting: [
- false,
- {
- setIsCompleting: (_, { isCompleting }) => isCompleting,
- },
- ],
- }),
-
- listeners(({ actions, values }) => ({
- completeOnboarding: async ({ useCase }) => {
- if (values.isCompleting) {
- return
- }
- actions.setIsCompleting(true)
- const team = values.currentTeam
- const setup = resolveSetup(useCase)
- const products = productKeysForSetup(setup)
- const options = optionsForSetup(setup)
- const needsReplayAdminSetup =
- options.includes('replay_masking_floor') && team?.session_recording_masking_config == null
- try {
- if (!team) {
- throw new Error('Current team is not loaded')
- }
- const {
- session_recording_opt_in,
- session_recording_masking_config,
- capture_console_log_opt_in,
- capture_performance_opt_in,
- heatmaps_opt_in,
- capture_dead_clicks,
- ...otherOptions
- } = optionsPayload(team, options)
- const memberOptions = needsReplayAdminSetup
- ? otherOptions
- : {
- ...otherOptions,
- ...(session_recording_opt_in ? { session_recording_opt_in } : {}),
- }
- if (Object.keys(memberOptions).length > 0) {
- await teamLogic.asyncActions.updateCurrentTeam(memberOptions)
- }
- const adminOptions = needsReplayAdminSetup
- ? {
- ...(session_recording_opt_in ? { session_recording_opt_in } : {}),
- session_recording_masking_config,
- capture_console_log_opt_in,
- capture_performance_opt_in,
- heatmaps_opt_in,
- capture_dead_clicks,
- }
- : {
- session_recording_masking_config,
- capture_console_log_opt_in,
- capture_performance_opt_in,
- heatmaps_opt_in,
- capture_dead_clicks,
- }
- if (Object.values(adminOptions).some(Boolean)) {
- try {
- await teamLogic.asyncActions.updateCurrentTeam(adminOptions)
- } catch {
- lemonToast.warning('Some settings could not be enabled. An admin can finish them later.')
- }
- }
- await Promise.all(
- products.map((productKey) =>
- completeProductOnboarding(team.id, {
- product_type: productKey,
- intent_context:
- productKey === setup.primaryProduct
- ? ProductIntentContext.ONBOARDING_PRODUCT_SELECTED_PRIMARY
- : ProductIntentContext.ONBOARDING_PRODUCT_SELECTED_SECONDARY,
- })
- )
- )
- actions.loadCustomProducts()
- await teamLogic.asyncActions.updateCurrentTeam({
- completed_snippet_onboarding: true,
- has_completed_onboarding_for: completedOnboardingMap(team, products),
- })
- actions.clearUseCase()
- actions.reportOnboardingCompleted(setup.primaryProduct, SELF_DRIVING_ONBOARDING_EVENT_PROPS)
- router.actions.push(urls.inbox())
- } catch {
- lemonToast.error("Couldn't finish onboarding. Please try again.")
- } finally {
- actions.setIsCompleting(false)
- }
- },
- })),
-])
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/AIObservabilityStep.test.tsx b/frontend/src/scenes/onboarding/self-driving/steps/AIObservabilityStep.test.tsx
deleted file mode 100644
index f3c0868fc186..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/AIObservabilityStep.test.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'
-
-import '@testing-library/jest-dom'
-
-import { cleanup, fireEvent, render, screen } from '@testing-library/react'
-
-import { teamLogic } from 'scenes/teamLogic'
-
-import { initKeaTests } from '~/test/init'
-
-import { AIObservabilityStep } from './AIObservabilityStep'
-
-describe('AIObservabilityStep', () => {
- beforeEach(() => {
- initKeaTests()
- teamLogic.mount()
- teamLogic.actions.loadCurrentTeamSuccess(MOCK_DEFAULT_TEAM)
- })
-
- afterEach(() => {
- cleanup()
- })
-
- it('keeps the chosen language when the provider changes', () => {
- render(<AIObservabilityStep onContinue={jest.fn()} onSkip={jest.fn()} />)
-
- expect(screen.getByText(/pip install posthog openai/)).toBeInTheDocument()
-
- fireEvent.click(screen.getAllByText('Node')[0])
- expect(screen.getByText(/npm install @posthog\/ai posthog-node openai/)).toBeInTheDocument()
-
- fireEvent.click(screen.getAllByText('OpenAI')[0])
- fireEvent.click(screen.getByText('Anthropic'))
-
- expect(screen.getByText(/npm install @posthog\/ai posthog-node @anthropic-ai\/sdk/)).toBeInTheDocument()
- })
-})
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/AIObservabilityStep.tsx b/frontend/src/scenes/onboarding/self-driving/steps/AIObservabilityStep.tsx
deleted file mode 100644
index 0baf57cea586..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/AIObservabilityStep.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import { useActions } from 'kea'
-import { useState } from 'react'
-
-import { LemonButton, LemonSelect } from '@posthog/lemon-ui'
-
-import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
-import { AIObservabilitySDKInstructions } from 'scenes/onboarding/legacy/sdks/ai-observability/AIObservabilitySDKInstructions'
-import { ALL_SDKS } from 'scenes/onboarding/legacy/sdks/allSDKs'
-import { OnboardingSelectedFileProvider } from 'scenes/onboarding/shared/OnboardingDocsContentWrapper'
-
-import { SDKKey } from '~/types'
-
-const PROVIDER_OPTIONS = Object.keys(AIObservabilitySDKInstructions).map((key) => ({
- value: key as SDKKey,
- label: ALL_SDKS.find((sdk) => sdk.key === key)?.name ?? key,
-}))
-
-/**
- * Goal-conditional step for `maintain_ai`: the generic wizard install doesn't wire LLM instrumentation,
- * so this step carries the per-provider instructions. The goal's finish line is the first AI
- * traces coming in.
- */
-export function AIObservabilityStep({
- onContinue,
- onSkip,
-}: {
- onContinue: () => void
- onSkip: () => void
-}): JSX.Element {
- const [provider, setProvider] = useState<SDKKey>(SDKKey.OPENAI)
- const { reportSDKSetupInstructionsSDKSelected } = useActions(eventUsageLogic)
- const Instructions = AIObservabilitySDKInstructions[provider]
-
- return (
- <OnboardingSelectedFileProvider>
- <div className="flex flex-col gap-5">
- <div className="flex items-center justify-center gap-2">
- <span className="text-secondary text-sm">My AI app uses</span>
- <LemonSelect
- size="small"
- value={provider}
- onChange={(value) => {
- if (!value) {
- return
- }
- setProvider(value)
- reportSDKSetupInstructionsSDKSelected(value, 'onboarding_ai_observability')
- }}
- options={PROVIDER_OPTIONS}
- />
- </div>
- {Instructions && (
- <div className="border rounded p-4 text-left">
- <Instructions />
- </div>
- )}
- <div className="flex flex-col items-center gap-1 pt-2">
- <LemonButton type="primary" status="alt" onClick={onContinue}>
- Continue
- </LemonButton>
- <LemonButton type="tertiary" size="small" onClick={onSkip}>
- Skip for now
- </LemonButton>
- </div>
- </div>
- </OnboardingSelectedFileProvider>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/AuthorizedUrlsStep.tsx b/frontend/src/scenes/onboarding/self-driving/steps/AuthorizedUrlsStep.tsx
deleted file mode 100644
index e78d90a4765f..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/AuthorizedUrlsStep.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import { useValues } from 'kea'
-
-import { LemonBanner, LemonButton } from '@posthog/lemon-ui'
-
-import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList'
-import { AuthorizedUrlListType, authorizedUrlListLogic } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic'
-
-const AUTHORIZED_URL_LOGIC_PROPS = {
- actionId: null,
- experimentId: null,
- productTourId: null,
- type: AuthorizedUrlListType.WEB_ANALYTICS,
- allowWildCards: false,
-} as const
-
-/**
- * Goal-conditional step for `improve_experience`: web analytics breaks traffic down by authorized
- * URL, so the goal's finish line (a live dashboard) needs at least one. Wildcards are off - the
- * URL must be concrete so the toolbar and agents can open the site.
- */
-export function AuthorizedUrlsStep({
- onContinue,
- onSkip,
-}: {
- onContinue: () => void
- onSkip: () => void
-}): JSX.Element {
- const { authorizedUrls } = useValues(authorizedUrlListLogic(AUTHORIZED_URL_LOGIC_PROPS))
-
- return (
- <div className="flex flex-col gap-5">
- <p className="text-secondary text-center m-0">
- Add each full URL where your site runs. Web analytics uses these URLs to show where your traffic comes
- from.
- </p>
- <LemonBanner type="info">Include https:// in each URL. Wildcards are not supported.</LemonBanner>
- <AuthorizedUrlList
- type={AuthorizedUrlListType.WEB_ANALYTICS}
- allowWildCards={false}
- hideEmptyState
- showLaunch={false}
- />
- <div className="flex flex-col items-center gap-1 pt-2">
- <LemonButton
- type="primary"
- status="alt"
- onClick={onContinue}
- disabledReason={authorizedUrls.length === 0 ? 'Add at least one URL' : null}
- >
- Continue
- </LemonButton>
- <LemonButton type="tertiary" size="small" onClick={onSkip}>
- Skip for now
- </LemonButton>
- </div>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/BillingStep.tsx b/frontend/src/scenes/onboarding/self-driving/steps/BillingStep.tsx
deleted file mode 100644
index 6b40943d744d..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/BillingStep.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import { useValues } from 'kea'
-
-import { LemonButton, Spinner } from '@posthog/lemon-ui'
-
-import { billingLogic } from 'scenes/billing/billingLogic'
-import { findInboxProduct } from 'scenes/billing/inboxPricing'
-import { PlanChoice } from 'scenes/onboarding/self-driving/components/PlanChoice'
-import { SubscribedState } from 'scenes/onboarding/self-driving/components/SubscribedState'
-
-import { ProductKey } from '~/queries/schema/schema-general'
-
-/**
- * Billing step for the self-driving onboarding, and the last screen before the inbox.
- *
- * The thing being sold here is shipped work: agents watch and report for free, and a PR that lands
- * is what costs money. Every number comes off the billing product (`inbox`) rather than being
- * written down here, so a pricing change lands without a frontend deploy.
- *
- * No flow navigation lives here; the parent shell owns Back/Continue. The only action this step
- * fires is the payment-entry flow, which opens the globally mounted PaymentEntryModal (see
- * layout/GlobalModals) over the card and returns to the same URL.
- */
-export function BillingStep({ onContinue, completing }: { onContinue: () => void; completing: boolean }): JSX.Element {
- const { billing, billingLoading } = useValues(billingLogic)
-
- if (!billing && billingLoading) {
- return (
- <div className="flex items-center justify-center py-12">
- <Spinner className="text-2xl text-muted size-8" />
- </div>
- )
- }
-
- // Either billing isn't set up on this instance (self-hosted without a license, or local dev) or
- // the request failed. We can't tell them apart from here, and neither is worth blocking setup
- // over, so say what we know and keep the flow moving.
- if (!billing) {
- return (
- <div className="flex flex-col gap-3">
- <p className="text-sm text-muted m-0">
- We couldn't load billing just now. Nothing is blocked. Your agents are set up, and you can pick a
- plan later from billing settings.
- </p>
- <div className="flex items-center justify-between gap-2">
- <LemonButton type="secondary" to="https://posthog.com/pricing" targetBlank>
- See pricing
- </LemonButton>
- <LemonButton type="primary" status="alt" onClick={onContinue} loading={completing}>
- Go to the Inbox
- </LemonButton>
- </div>
- </div>
- )
- }
-
- if (billing.has_active_subscription) {
- return <SubscribedState onContinue={onContinue} completing={completing} />
- }
-
- // Subscribing still activates the whole catalog (billing expands `all_products:` server-side),
- // so the platform product stays the thing we hand the payment flow. The inbox product is what
- // this screen actually talks about, and where its numbers come from.
- const platformProduct =
- billing.products?.find((product) => product.type === ProductKey.PLATFORM_AND_SUPPORT) ?? null
-
- return (
- <PlanChoice
- platformProduct={platformProduct}
- inboxProduct={findInboxProduct(billing.products)}
- products={billing.products}
- onContinue={onContinue}
- completing={completing}
- />
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/InstallStep.tsx b/frontend/src/scenes/onboarding/self-driving/steps/InstallStep.tsx
deleted file mode 100644
index 7179a0c64e1a..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/InstallStep.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { SelfDrivingInstallOptions } from '../components/SelfDrivingInstallOptions'
-
-/**
- * Sync is unconditional here (no `ONBOARDING_WIZARD_SYNC` gate): without it this step is a static
- * command with no feedback, and watching the run is the whole point of the flow. Once the CLI
- * registers a run, the install options swap the command block for the compact tracker.
- */
-export function InstallStep({ onContinue }: { onContinue: () => void }): JSX.Element {
- return <SelfDrivingInstallOptions onContinue={onContinue} />
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/ProductsStep.tsx b/frontend/src/scenes/onboarding/self-driving/steps/ProductsStep.tsx
deleted file mode 100644
index fb1910cc7b07..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/ProductsStep.tsx
+++ /dev/null
@@ -1,130 +0,0 @@
-import { useValues } from 'kea'
-
-import { LemonButton, LemonTag, Link } from '@posthog/lemon-ui'
-
-import { toSentenceCase } from 'scenes/onboarding/shared/utils'
-
-import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { getTreeItemsProducts } from '~/products'
-
-import {
- ADDITIONAL_PRODUCT_DETAILS,
- DOCS_URL_BY_PRODUCT_PATH,
- ONBOARDING_PRODUCTS,
- resolveSetup,
- productIconType,
-} from '../../shared/useCases'
-import { useCaseSelectionLogic } from '../useCaseSelectionLogic'
-
-export function ProductsStep({ onContinue }: { onContinue: () => void }): JSX.Element {
- const { selectedUseCase } = useValues(useCaseSelectionLogic)
-
- const setup = resolveSetup(selectedUseCase)
- const setupProducts = setup.products.map((key) => ONBOARDING_PRODUCTS[key])
- const setupProductKeys = new Set(setupProducts.map((product) => product.productKey))
- const products = [
- ...setupProducts.map((product) => ({
- productKey: product.productKey,
- name: product.displayName ?? product.productPath,
- description: product.benefit,
- docsUrl: DOCS_URL_BY_PRODUCT_PATH[product.productPath],
- iconType: productIconType(product),
- })),
- ...(setup.additionalProducts ?? [])
- .filter((productKey) => !setupProductKeys.has(productKey))
- .map((productKey) => {
- const productItem = getTreeItemsProducts().find((item) => item.intents?.includes(productKey))
- const details = ADDITIONAL_PRODUCT_DETAILS[productKey]
- const product = {
- name: productItem?.path ?? productKey,
- description: details?.description ?? '',
- }
- return {
- productKey,
- name: toSentenceCase(product.name),
- description: product.description,
- docsUrl: details?.docsUrl ?? DOCS_URL_BY_PRODUCT_PATH[product.name],
- iconType: productItem?.iconType ?? 'product_analytics',
- }
- }),
- ]
- // The setup's sidebar extras, resolved the same way the backend populates the sidebar:
- // through the products registry's `intents`. Products already shown above are excluded.
- const shownNames = new Set(products.map((product) => product.name))
- const sidebarExtras = getTreeItemsProducts().filter(
- (item) =>
- item.intents?.some((intent) => setup.sidebarExtras.includes(intent)) &&
- typeof item.path === 'string' &&
- !shownNames.has(item.path)
- )
-
- return (
- <div className="flex flex-col gap-6 py-1">
- <p className="text-secondary text-center m-0">
- These products will feed your agents after setup finishes. You can change them later in settings.
- </p>
- <div className="flex flex-col gap-2">
- {products.map((product) => {
- const iconType = product.iconType
- const colorVar = `var(--color-product-${iconType.replace(/_/g, '-')}-light)`
-
- return (
- <div
- key={product.productKey}
- className="OnboardingProductCard flex items-start gap-4 px-4 rounded-lg"
- >
- <div
- className="size-8 shrink-0 rounded-lg flex items-center justify-center"
- style={{ background: `color-mix(in srgb, ${colorVar} 12%, transparent)` }}
- >
- <div className="flex *:text-xl group/colorful-product-icons colorful-product-icons-true">
- {iconForType(iconType)}
- </div>
- </div>
- <div className="flex-1 flex flex-col gap-1 min-w-0">
- <div className="font-semibold text-base">{product.name}</div>
- <div className="text-sm text-secondary text-balance">{product.description}</div>
- <Link to={product.docsUrl} target="_blank" className="text-sm w-fit">
- Read the docs
- </Link>
- </div>
- </div>
- )
- })}
- </div>
- {sidebarExtras.length > 0 && (
- <div className="flex flex-wrap items-center justify-center gap-2">
- <span className="text-xs text-muted">Also in your sidebar:</span>
- {sidebarExtras.map((item) => {
- const tag = (
- <LemonTag
- icon={
- item.iconType ? (
- <span className="flex group/colorful-product-icons colorful-product-icons-true">
- {iconForType(item.iconType)}
- </span>
- ) : undefined
- }
- >
- {item.path}
- </LemonTag>
- )
- const docsUrl = DOCS_URL_BY_PRODUCT_PATH[item.path]
- return docsUrl ? (
- <Link key={item.path} to={docsUrl} target="_blank">
- {tag}
- </Link>
- ) : (
- <span key={item.path}>{tag}</span>
- )
- })}
- </div>
- )}
- <div className="flex justify-center">
- <LemonButton type="primary" status="alt" onClick={onContinue}>
- Continue
- </LemonButton>
- </div>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/UseCasesStep.test.tsx b/frontend/src/scenes/onboarding/self-driving/steps/UseCasesStep.test.tsx
deleted file mode 100644
index 01f2a4bdf582..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/UseCasesStep.test.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import { cleanup, fireEvent, render, screen } from '@testing-library/react'
-import posthog from 'posthog-js'
-
-import { initKeaTests } from '~/test/init'
-
-import { SELF_DRIVING_ONBOARDING_EVENT_PROPS } from '../../onboardingEventUsageLogic'
-import { productKeysForSetup, resolveSetup } from '../../shared/useCases'
-import { useCaseSelectionLogic } from '../useCaseSelectionLogic'
-import { UseCasesStep } from './UseCasesStep'
-
-describe('UseCasesStep', () => {
- let logic: ReturnType<typeof useCaseSelectionLogic.build>
-
- beforeEach(() => {
- localStorage.clear()
- initKeaTests(false)
- logic = useCaseSelectionLogic()
- logic.mount()
- })
-
- afterEach(() => {
- logic.unmount()
- cleanup()
- })
-
- it('clears the previous use case before continuing without one', () => {
- logic.actions.selectUseCase('find_problems')
- const onSkip = jest.fn()
-
- render(<UseCasesStep onContinue={jest.fn()} onSkip={onSkip} />)
- fireEvent.click(screen.getByText('Continue without choosing a goal'))
-
- expect(logic.values.selectedUseCase).toBeNull()
- expect(onSkip).toHaveBeenCalledTimes(1)
- })
-
- it('reports the selected use case with the self-driving event schema', () => {
- const capture = jest.spyOn(posthog, 'capture')
-
- logic.actions.selectUseCase('find_problems')
-
- expect(capture.mock.calls).toContainEqual([
- 'onboarding use case selected',
- {
- use_case: 'find_problems',
- recommended_products: productKeysForSetup(resolveSetup('find_problems')),
- ...SELF_DRIVING_ONBOARDING_EVENT_PROPS,
- },
- ])
-
- capture.mockRestore()
- })
-})
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/UseCasesStep.tsx b/frontend/src/scenes/onboarding/self-driving/steps/UseCasesStep.tsx
deleted file mode 100644
index df61d5d17174..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/UseCasesStep.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { useActions } from 'kea'
-
-import { IconArrowRight } from '@posthog/icons'
-import { LemonButton } from '@posthog/lemon-ui'
-
-import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-
-import { ONBOARDING_USE_CASES } from '../../shared/useCases'
-import { useCaseSelectionLogic } from '../useCaseSelectionLogic'
-
-export function UseCasesStep({ onContinue, onSkip }: { onContinue: () => void; onSkip: () => void }): JSX.Element {
- const { clearUseCase, selectUseCase } = useActions(useCaseSelectionLogic)
-
- return (
- <div className="flex flex-col gap-4 py-1">
- {/* Use cases */}
- <div className="flex flex-col gap-3">
- {ONBOARDING_USE_CASES.map((useCase) => {
- const iconType = useCase.icon
- const colorVar = `var(--color-product-${iconType.replace(/_/g, '-')}-light)`
-
- return (
- <button
- key={useCase.key}
- type="button"
- onClick={() => {
- selectUseCase(useCase.key)
- onContinue()
- }}
- className="OnboardingProductCard group flex items-center gap-4 p-4 rounded-lg border text-left cursor-pointer transition-all hover:shadow-sm"
- style={{ ['--goal-color' as string]: colorVar }}
- data-attr={`self-driving-goal-${useCase.key}`}
- >
- <div
- className="size-12 shrink-0 rounded-lg flex items-center justify-center"
- style={{ background: `color-mix(in srgb, ${colorVar} 12%, transparent)` }}
- >
- <div className="flex *:text-2xl group/colorful-product-icons colorful-product-icons-true">
- {iconForType(iconType)}
- </div>
- </div>
-
- <div className="flex-1 flex flex-col gap-1 min-w-0">
- <div className="font-semibold text-base">{useCase.title}</div>
- <div className="text-sm text-secondary text-balance">{useCase.description}</div>
- </div>
-
- {/* Pick button */}
- <div className="flex flex-row justify-center">
- <IconArrowRight className="text-xl" />
- </div>
- </button>
- )
- })}
- </div>
-
- {/* Continue button */}
- <div className="flex justify-center">
- <LemonButton
- type="tertiary"
- size="small"
- onClick={() => {
- clearUseCase()
- onSkip()
- }}
- >
- Continue without choosing a goal
- </LemonButton>
- </div>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/steps/WelcomeStep.tsx b/frontend/src/scenes/onboarding/self-driving/steps/WelcomeStep.tsx
deleted file mode 100644
index ed51469a0750..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/steps/WelcomeStep.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import selfDrivingHog from 'public/hedgehog/self-driving-hog.png'
-
-import { RoughMark } from '../RoughMark'
-
-/** The opener: what self-driving is, before we ask anyone to paste a command. */
-export function WelcomeStep(): JSX.Element {
- return (
- <div className="flex flex-col items-center text-center gap-5">
- <img src={selfDrivingHog} alt="A hedgehog riding in a self-driving car" className="w-full rounded-lg" />
- <div className="flex flex-col gap-2">
- {/* Highlight treatments mirror posthog.com's hero: blue mark on the headline
- (Home/Test Headline, blue #2F80FA), amber rough-notation highlight in the body. */}
- <h1 className="text-2xl font-bold m-0">
- Let's make your product{' '}
- {/* A span, not <mark>: the app styles mark with an !important cream highlight. */}
- <span
- className="rounded-md px-1.5"
- style={{ backgroundColor: 'rgba(47, 128, 250, 0.1)', color: '#2F80FA' }}
- >
- self-driving
- </span>
- </h1>
- <p className="text-muted max-w-md mx-auto m-0">
- PostHog runs on your product's context. One command gets it flowing, then agents can start{' '}
- <RoughMark type="highlight" color="rgba(247, 165, 1, 0.15)" strokeWidth={1} multiline delay={400}>
- finding and fixing things
- </RoughMark>
- , with you steering.
- </p>
- </div>
- </div>
- )
-}
diff --git a/frontend/src/scenes/onboarding/self-driving/useCaseSelectionLogic.ts b/frontend/src/scenes/onboarding/self-driving/useCaseSelectionLogic.ts
deleted file mode 100644
index 034aac74b553..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/useCaseSelectionLogic.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { MakeLogicType, actions, connect, kea, listeners, path, reducers } from 'kea'
-
-import { getCurrentTeamIdOrNone } from 'lib/utils/getAppContext'
-
-import { onboardingEventUsageLogic, SELF_DRIVING_ONBOARDING_EVENT_PROPS } from '../onboardingEventUsageLogic'
-import { productKeysForSetup, resolveSetup } from '../shared/useCases'
-import type { OnboardingUseCaseKey } from '../shared/useCases'
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface useCaseSelectionLogicValues {
- selectedUseCase: OnboardingUseCaseKey | null
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface useCaseSelectionLogicActions {
- reportOnboardingUseCaseSelected: (
- useCase: string,
- recommendedProducts: readonly string[],
- properties?: import('lib/utils/eventUsageLogic').OnboardingEventProperties | undefined
- ) => {
- properties: import('lib/utils/eventUsageLogic').OnboardingEventProperties | undefined
- recommendedProducts: readonly string[]
- useCase: string
- } // onboardingEventUsageLogic
- clearUseCase: () => {
- value: true
- }
- selectUseCase: (useCase: OnboardingUseCaseKey) => {
- useCase: OnboardingUseCaseKey
- }
-}
-
-export type useCaseSelectionLogicType = MakeLogicType<useCaseSelectionLogicValues, useCaseSelectionLogicActions>
-
-/** Holds the use case declared on the onboarding's use-case step; the rest of the flow spins off it. */
-export const useCaseSelectionLogic = kea<useCaseSelectionLogicType>([
- path(['scenes', 'onboarding', 'self-driving', 'useCaseSelectionLogic']),
-
- connect(() => ({
- actions: [onboardingEventUsageLogic, ['reportOnboardingUseCaseSelected']],
- })),
-
- actions({
- selectUseCase: (useCase: OnboardingUseCaseKey) => ({ useCase }),
- clearUseCase: true,
- }),
-
- reducers({
- selectedUseCase: [
- null as OnboardingUseCaseKey | null,
- // Persisted so a refresh (or the GitHub OAuth round-trip on the install step) keeps
- // the use-case-conditional steps in the flow.
- { persist: true, prefix: `${getCurrentTeamIdOrNone() ?? 'unknown'}__` },
- {
- clearUseCase: () => null,
- selectUseCase: (_, { useCase }) => useCase,
- },
- ],
- }),
-
- listeners(({ actions }) => ({
- selectUseCase: ({ useCase }) => {
- actions.reportOnboardingUseCaseSelected(
- useCase,
- productKeysForSetup(resolveSetup(useCase)),
- SELF_DRIVING_ONBOARDING_EVENT_PROPS
- )
- },
- })),
-])
diff --git a/frontend/src/scenes/onboarding/self-driving/utils.ts b/frontend/src/scenes/onboarding/self-driving/utils.ts
deleted file mode 100644
index c0075be1b7e9..000000000000
--- a/frontend/src/scenes/onboarding/self-driving/utils.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export const formatUsd = (usd: number): string => (Number.isInteger(usd) ? `$${usd}` : `$${usd.toFixed(2)}`)
-
-export const compact = (value: number): string =>
- Intl.NumberFormat('en', { notation: 'compact', compactDisplay: 'short', maximumFractionDigits: 1 }).format(value)
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.stories.tsx b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.stories.tsx
index 37366a260968..08e036c74b44 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.stories.tsx
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.stories.tsx
@@ -21,10 +21,8 @@ import { WizardInstallOptions } from './WizardInstallOptions'
* Stories for the "open a PR for me" cloud-run option: the block's own states, rendered on their own
* rather than through an onboarding scene.
*
- * In the product the block sits on the legacy install step — the self-driving flow forces the cloud
- * arm off, because its run is interactive and the cloud runner is headless. `Legacy/Install Step`
- * already snapshots the block in that setting, so driving a scene from here would duplicate those
- * snapshots (and, if it drove the self-driving flow, snapshot a step where the block cannot appear).
+ * In the product the block sits on the onboarding install step, and `Install Step` already
+ * snapshots it in that setting, so driving a scene from here would duplicate those snapshots.
* These stories cover what no scene story does: not-connected, repo picking, queued, and the toggle
* back to running it yourself.
*
@@ -88,8 +86,6 @@ const meta: Meta = {
layout: 'fullscreen',
viewMode: 'story',
mockDate: '2023-05-25',
- // Legacy flow, deliberately: the self-driving install step forces the cloud arm off (its run
- // is interactive and the cloud runner is headless), so the block only renders here.
featureFlags: {
[FEATURE_FLAGS.ONBOARDING_WIZARD_CLOUD_RUN]: 'test',
},
@@ -129,9 +125,8 @@ const WAIT_OPTIONS = { timeout: 30000, interval: 200 }
/**
* The block on its own, with a given set of integrations and optionally driven into a later state.
*
- * Deliberately not rendered through an onboarding scene. The block lives on the legacy install step
- * (the self-driving flow forces the cloud arm off — its run is interactive and the cloud runner is
- * headless), and `Legacy/Install Step` already snapshots it in place. Driving a scene from here
+ * Deliberately not rendered through an onboarding scene. The block lives on the onboarding install
+ * step, and `Install Step` already snapshots it in place. Driving a scene from here
* would duplicate those snapshots rather than capture what this file is about: the block's own
* states, which no scene story covers.
*/
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.tsx b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.tsx
index 99ffcd414685..703c91925f78 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.tsx
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardCloudRunBlock.tsx
@@ -4,7 +4,6 @@ import { useEffect, useRef } from 'react'
import { IconCheckCircle, IconChevronDown, IconGithub, IconPullRequest } from '@posthog/icons'
import { LemonBanner, LemonButton } from '@posthog/lemon-ui'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { GitHubRepositoryPicker } from 'lib/integrations/GitHubIntegrationHelpers'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { useWizardCommand } from 'scenes/onboarding/shared/useWizardCommand'
@@ -35,7 +34,6 @@ export function WizardCloudRunBlock({
onRetryLocally?: () => void
}): JSX.Element {
const { isCloudOrDev } = useWizardCommand()
- const syncEnabled = useFeatureFlag('ONBOARDING_WIZARD_SYNC', 'test')
const { githubIntegration, selectedRepository, cloudRunStatus, connectGitHubUrl } = useValues(wizardCloudRunLogic)
const { activeCloudRun } = useValues(activeCloudRunLogic)
const { setSelectedRepository, startCloudRun } = useActions(wizardCloudRunLogic)
@@ -80,28 +78,16 @@ export function WizardCloudRunBlock({
if (cloudRunStatus === 'queued') {
const repoLabel = selectedRepository ? <span className="font-mono">{selectedRepository}</span> : 'your repo'
- // The brief window after kickoff before the run handle settles. With sync on the Installation
- // layer takes over above; without sync we cannot observe the run, so set honest expectations.
+ // The brief window after kickoff before the run handle settles and the Installation layer
+ // takes over above.
return (
<LemonBanner type="info">
<div className="space-y-1" data-attr="wizard-cloud-run-queued">
- {syncEnabled ? (
- <>
- <div className="font-semibold">Starting your cloud run…</div>
- <div className="text-sm text-muted">
- Kicking off the wizard on {repoLabel}. Progress will appear here in a moment and stays
- in the corner as you keep going.
- </div>
- </>
- ) : (
- <>
- <div className="font-semibold">Cloud run queued for {repoLabel}.</div>
- <div className="text-sm text-muted">
- If it succeeds we'll open a pull request in your repo to review. We can't show live
- progress here, so keep an eye on your repository.
- </div>
- </>
- )}
+ <div className="font-semibold">Starting your cloud run…</div>
+ <div className="text-sm text-muted">
+ Kicking off the wizard on {repoLabel}. Progress will appear here in a moment and stays in the
+ corner as you keep going.
+ </div>
</div>
</LemonBanner>
)
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardInstallOptions.tsx b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardInstallOptions.tsx
index 98386130cce1..30882238d93b 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardInstallOptions.tsx
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardInstallOptions.tsx
@@ -14,7 +14,7 @@ import { WizardFrameworkBadges } from './WizardModeShell'
export type WizardInstallMode = 'cloud' | 'local'
export interface WizardInstallOptionsProps {
- /** The local "run it yourself" arm. Variants supply their own command block. */
+ /** The local "run it yourself" arm. Callers supply their own command block. */
localBlock: React.ReactNode
/** Keeps the compact onboarding card free of the wizard hedgehog. */
hideHog?: boolean
@@ -23,9 +23,9 @@ export interface WizardInstallOptionsProps {
/** Instrumentation hook, fired when the user switches between cloud and local. */
onModeSelected?: (mode: WizardInstallMode) => void
/**
- * Force the cloud arm off regardless of the experiment flag. The self-driving flow runs a
- * program the cloud runner cannot execute (it rejects `--ci` and needs an interactive terminal),
- * so offering it there would queue a run that can never succeed.
+ * Force the cloud arm off regardless of the experiment flag. The cloud runner only executes the
+ * base integration program, so offering it for any other program would queue a run that can
+ * never succeed.
*/
offerCloudRun?: boolean
/**
@@ -40,9 +40,9 @@ export interface WizardInstallOptionsProps {
/**
* One wizard, two ways to run it: have us run it and open a PR (the cloud run), or run the CLI
- * yourself. A segmented control switches between them. Shared by both onboarding variants; the
- * cloud path only exists behind ONBOARDING_WIZARD_CLOUD_RUN (the AB test arm) on cloud/dev —
- * elsewhere this collapses to just the caller's local block, so the control arm is unchanged.
+ * yourself. A segmented control switches between them. The cloud path only exists behind
+ * ONBOARDING_WIZARD_CLOUD_RUN (the AB test arm) on cloud/dev. Elsewhere this collapses to just
+ * the caller's local block, so the control arm is unchanged.
*/
export function WizardInstallOptions({
localBlock,
@@ -74,8 +74,8 @@ export function WizardInstallOptions({
setMode('local')
}
- // The frameworks are the same whichever way (and in whichever variant) the wizard runs, so the
- // badge list rides with the options everywhere. Self-hosted gets no wizard, so no badges either.
+ // The frameworks are the same whichever way the wizard runs, so the badge list rides with the
+ // options everywhere. Self-hosted gets no wizard, so no badges either.
const badges = isCloudOrDev && <div className="pb-2">{badgesOverride ?? <WizardFrameworkBadges />}</div>
if (!offerCloud) {
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardModeShell.tsx b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardModeShell.tsx
index 9b3b2dc042df..d99a68ba62b2 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardModeShell.tsx
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardModeShell.tsx
@@ -86,7 +86,7 @@ export function WizardModeShell({
}: {
children: ReactNode
hogCastKey?: number
- /** Drop the hedgehog (e.g. the compact context-first onboarding card has no room for it). */
+ /** Drop the hedgehog for compact placements that have no room for it. */
hideHog?: boolean
'data-attr'?: string
}): JSX.Element {
@@ -101,7 +101,7 @@ export function WizardModeShell({
)}
/>
)}
- {/* With the hog hidden (compact context-first card), center the content at its natural
+ {/* With the hog hidden (compact placement), center the content at its natural
width instead of stretching it full-bleed — so the command block and the GitHub-connect
block sit centered without expanding. With the hog shown, keep the left-aligned column. */}
<div className={cn('flex-1 flex flex-col justify-center gap-3', hideHog && 'items-center text-center')}>
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardSyncFab.tsx b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardSyncFab.tsx
index b7714dff77cd..628458e556de 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/WizardSyncFab.tsx
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/WizardSyncFab.tsx
@@ -1,9 +1,5 @@
import { useActions, useMountedLogic, useValues } from 'kea'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
-import { resolveOnboardingFlowVariant } from 'scenes/onboarding/onboardingVariants'
-
import { activeCloudRunLogic, CloudRunHandle } from './activeCloudRunLogic'
import { finishedLocalRunLogic } from './finishedLocalRunLogic'
import { isStreamLost } from './helpers'
@@ -102,13 +98,8 @@ function WizardSyncLocalGate(): JSX.Element | null {
* one corner widget, never two.
*/
export function WizardSyncFab(): JSX.Element | null {
- const syncFlagEnabled = useFeatureFlag('ONBOARDING_WIZARD_SYNC', 'test')
- const { featureFlags } = useValues(featureFlagLogic)
const { activeCloudRun } = useValues(activeCloudRunLogic)
const { inlineCloudPanelMounted, inlineLocalPanelMounted } = useValues(wizardSyncUiLogic)
- // The self-driving onboarding syncs unconditionally, so its users need the detached widget too
- // once they navigate away from the install step — the sync flag only gates the legacy arm.
- const syncEnabled = syncFlagEnabled || resolveOnboardingFlowVariant(featureFlags) === 'self-driving'
// Deliberately not gated on the cloud-run flag: a persisted handle is proof the run started
// while the user was on the test arm, and a mid-experiment flag change must not strand an
@@ -125,10 +116,5 @@ export function WizardSyncFab(): JSX.Element | null {
if (inlineLocalPanelMounted || (activeCloudRun && inlineCloudPanelMounted)) {
return null
}
- if (syncEnabled) {
- return <WizardSyncLocalGate />
- }
- // Same reasoning as the cloud handle: a persisted finished run is proof it happened under the
- // test arm, and it must stay dismissible if the flag flips mid-experiment.
- return <WizardSyncFinishedLocalFab />
+ return <WizardSyncLocalGate />
}
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic.ts b/frontend/src/scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic.ts
index 035cea789caa..448e7265ba99 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic.ts
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic.ts
@@ -3,9 +3,6 @@ import { subscriptions } from 'kea-subscriptions'
import posthog from 'posthog-js'
import { ApiError } from 'lib/api-error'
-import type { FeatureFlagsSet } from 'lib/logic/featureFlagLogic'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
-import { resolveOnboardingFlowVariant } from 'scenes/onboarding/onboardingVariants'
import { projectLogic } from 'scenes/projectLogic'
import { userLogic } from 'scenes/userLogic'
@@ -15,7 +12,7 @@ import { userLogic } from 'scenes/userLogic'
import { wizardSessionsLatestRetrieve } from 'products/wizard/frontend/generated/api'
import type { WizardSessionDTOApi } from 'products/wizard/frontend/generated/api.schemas'
-import { POSTHOG_INTEGRATION_WORKFLOW_ID, SELF_DRIVING_WORKFLOW_ID } from './workflows'
+import { POSTHOG_INTEGRATION_WORKFLOW_ID } from './workflows'
/** Always watched: the SDK install is what the app-wide FAB and nav button exist for. */
const WORKFLOW_ID = POSTHOG_INTEGRATION_WORKFLOW_ID
@@ -115,7 +112,6 @@ export function isSessionActive(session: WizardSessionDTOApi | null | undefined)
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface wizardActiveSessionDetectorLogicValues {
- featureFlags: FeatureFlagsSet // featureFlagLogic
currentProjectId: number | null // projectLogic
activeWorkflowId: string | null
consecutivePollFailures: number
@@ -172,7 +168,7 @@ export interface wizardActiveSessionDetectorLogicActions {
export interface wizardActiveSessionDetectorLogicMeta {
__keaTypeGenInternalSelectorTypes: {
hasActiveSession: (activeWorkflowId: string | null) => boolean
- watchedWorkflows: (extraWorkflowCounts: Record<string, number>, featureFlags: FeatureFlagsSet) => string[]
+ watchedWorkflows: (extraWorkflowCounts: Record<string, number>) => string[]
shouldStream: (hasActiveSession: boolean) => boolean
}
}
@@ -203,7 +199,7 @@ export type wizardActiveSessionDetectorLogicType = MakeLogicType<
export const wizardActiveSessionDetectorLogic = kea<wizardActiveSessionDetectorLogicType>([
path(['scenes', 'onboarding', 'wizardActiveSessionDetectorLogic']),
connect(() => ({
- values: [projectLogic, ['currentProjectId'], featureFlagLogic, ['featureFlags']],
+ values: [projectLogic, ['currentProjectId']],
})),
actions({
check: true,
@@ -307,17 +303,10 @@ export const wizardActiveSessionDetectorLogic = kea<wizardActiveSessionDetectorL
(activeWorkflowId: string | null): boolean => activeWorkflowId !== null,
],
watchedWorkflows: [
- (s) => [s.extraWorkflowCounts, s.featureFlags],
- (extraWorkflowCounts: Record<string, number>, featureFlags: FeatureFlagsSet): string[] => {
- // Self-driving users are watched from the start, not only once an install-progress
- // instance registers: otherwise reloading any page mid-run loses the widget, because
- // nothing would be polling the program that is actually running.
- const base =
- resolveOnboardingFlowVariant(featureFlags) === 'self-driving'
- ? [WORKFLOW_ID, SELF_DRIVING_WORKFLOW_ID]
- : [WORKFLOW_ID]
- return [...new Set([...base, ...Object.keys(extraWorkflowCounts)])]
- },
+ (s) => [s.extraWorkflowCounts],
+ (extraWorkflowCounts: Record<string, number>): string[] => [
+ ...new Set([WORKFLOW_ID, ...Object.keys(extraWorkflowCounts)]),
+ ],
],
shouldStream: [(s) => [s.hasActiveSession], (hasActiveSession: boolean): boolean => hasActiveSession],
}),
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/wizardCloudRunLogic.ts b/frontend/src/scenes/onboarding/shared/wizard-sync/wizardCloudRunLogic.ts
index 5e678772cf5d..d246f4439b5f 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/wizardCloudRunLogic.ts
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/wizardCloudRunLogic.ts
@@ -11,12 +11,11 @@ import { IntegrationType, OnboardingStepKey } from '~/types'
import type { ProductKey } from '../../../../queries/schema/schema-general'
import type { SDK } from '../../../../types'
-// Deliberate shared → legacy imports: onboardingLogic is the onboarding state machine both variants
-// run on (step key for the GitHub-connect return URL), and sdksLogic carries the user's manual SDK
-// pick (the cloud wizard's skill hint). Both no-op gracefully in flows that don't set them.
-import { onboardingLogic } from '../../legacy/onboardingLogic'
-import { sdksLogic } from '../../legacy/sdks/sdksLogic'
import { onboardingEventUsageLogic } from '../../onboardingEventUsageLogic'
+// onboardingLogic gives the step key for the GitHub-connect return URL, and sdksLogic carries the
+// user's manual SDK pick (the cloud wizard's skill hint). Both no-op gracefully outside onboarding.
+import { onboardingLogic } from '../../onboardingLogic'
+import { sdksLogic } from '../../sdks/sdksLogic'
import { activeCloudRunLogic } from './activeCloudRunLogic'
export type CloudRunStatus =
diff --git a/frontend/src/scenes/onboarding/shared/wizard-sync/workflows.ts b/frontend/src/scenes/onboarding/shared/wizard-sync/workflows.ts
index 5298a51a82c3..c6b847d8df69 100644
--- a/frontend/src/scenes/onboarding/shared/wizard-sync/workflows.ts
+++ b/frontend/src/scenes/onboarding/shared/wizard-sync/workflows.ts
@@ -10,7 +10,7 @@
/** The SDK install — what the app-wide sync surfaces watch by default. */
export const POSTHOG_INTEGRATION_WORKFLOW_ID = 'posthog-integration'
-/** `wizard self-driving` — the program the self-driving onboarding runs. */
+/** `wizard self-driving`, the program that sets up the self-driving Inbox. */
export const SELF_DRIVING_WORKFLOW_ID = 'self-driving'
/**
diff --git a/frontend/src/scenes/onboarding/shared/wizardHog.tsx b/frontend/src/scenes/onboarding/shared/wizardHog.tsx
index 2bcdfa75c2d2..8a27311b31f6 100644
--- a/frontend/src/scenes/onboarding/shared/wizardHog.tsx
+++ b/frontend/src/scenes/onboarding/shared/wizardHog.tsx
@@ -2,5 +2,5 @@ import * as wizardPng from '@posthog/brand/hoggies/png/wizard-1'
import { pngHoggie } from 'lib/brand/hoggies'
-/** The wizard hedgehog, shared across onboarding variants and wizard-flavored surfaces. */
+/** The wizard hedgehog, shared across onboarding and wizard-flavored surfaces. */
export const WizardHog = pngHoggie(wizardPng)
diff --git a/frontend/src/scenes/onboarding/legacy/sharedSteps.tsx b/frontend/src/scenes/onboarding/sharedSteps.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/sharedSteps.tsx
rename to frontend/src/scenes/onboarding/sharedSteps.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/stepProviderRegistry.test.ts b/frontend/src/scenes/onboarding/stepProviderRegistry.test.ts
similarity index 97%
rename from frontend/src/scenes/onboarding/legacy/stepProviderRegistry.test.ts
rename to frontend/src/scenes/onboarding/stepProviderRegistry.test.ts
index 0ce73b74910c..f89e4b52d897 100644
--- a/frontend/src/scenes/onboarding/legacy/stepProviderRegistry.test.ts
+++ b/frontend/src/scenes/onboarding/stepProviderRegistry.test.ts
@@ -1,7 +1,7 @@
import { ProductKey } from '~/queries/schema/schema-general'
import { OnboardingStepKey } from '~/types'
-import { availableOnboardingProducts } from '../shared/utils'
+import { availableOnboardingProducts } from './shared/utils'
import { onboardingProviderRegistry } from './stepProviderRegistry'
import { INSTALL_DEDUP_KEYS, type OnboardingFlowContext } from './types'
diff --git a/frontend/src/scenes/onboarding/legacy/stepProviderRegistry.ts b/frontend/src/scenes/onboarding/stepProviderRegistry.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/stepProviderRegistry.ts
rename to frontend/src/scenes/onboarding/stepProviderRegistry.ts
diff --git a/frontend/src/scenes/onboarding/legacy/types.ts b/frontend/src/scenes/onboarding/types.ts
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/types.ts
rename to frontend/src/scenes/onboarding/types.ts
diff --git a/frontend/src/scenes/onboarding/legacy/web-analytics/OnboardingWebAnalyticsAuthorizedDomainsStep.tsx b/frontend/src/scenes/onboarding/web-analytics/OnboardingWebAnalyticsAuthorizedDomainsStep.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/web-analytics/OnboardingWebAnalyticsAuthorizedDomainsStep.tsx
rename to frontend/src/scenes/onboarding/web-analytics/OnboardingWebAnalyticsAuthorizedDomainsStep.tsx
diff --git a/frontend/src/scenes/onboarding/legacy/web-analytics/OnboardingWebAnalyticsPathCleaningStep.tsx b/frontend/src/scenes/onboarding/web-analytics/OnboardingWebAnalyticsPathCleaningStep.tsx
similarity index 100%
rename from frontend/src/scenes/onboarding/legacy/web-analytics/OnboardingWebAnalyticsPathCleaningStep.tsx
rename to frontend/src/scenes/onboarding/web-analytics/OnboardingWebAnalyticsPathCleaningStep.tsx
diff --git a/frontend/src/scenes/sceneLogic.tsx b/frontend/src/scenes/sceneLogic.tsx
index e3ea52175607..0f0722beef70 100644
--- a/frontend/src/scenes/sceneLogic.tsx
+++ b/frontend/src/scenes/sceneLogic.tsx
@@ -57,7 +57,7 @@ import { AccessControlLevel } from '~/types'
import { handleLoginRedirect } from './authentication/login/loginLogic'
import { parseCouponCampaign } from './coupons/utils'
-import { isOnboardingRedirectSuppressed } from './onboarding/legacy/onboardingDelegationState'
+import { isOnboardingRedirectSuppressed } from './onboarding/onboardingDelegationState'
import { organizationLogic } from './organizationLogic'
import { preflightLogic } from './PreflightCheck/preflightLogic'
import { isPathOpenWhileProjectPendingDeletion, projectLogic } from './projectLogic'
diff --git a/products/ai_observability/frontend/onboarding/steps.tsx b/products/ai_observability/frontend/onboarding/steps.tsx
index 67117810d289..070629d8be9f 100644
--- a/products/ai_observability/frontend/onboarding/steps.tsx
+++ b/products/ai_observability/frontend/onboarding/steps.tsx
@@ -2,16 +2,16 @@ import { SetupTaskId } from 'lib/components/ProductSetup'
import {
AIObservabilitySDKInstructions,
AIObservabilitySDKTagOverrides,
-} from 'scenes/onboarding/legacy/sdks/ai-observability/AIObservabilitySDKInstructions'
-import { VERIFY_AI_EVENTS } from 'scenes/onboarding/legacy/sdks/hooks/useInstallationComplete'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+} from 'scenes/onboarding/sdks/ai-observability/AIObservabilitySDKInstructions'
+import { VERIFY_AI_EVENTS } from 'scenes/onboarding/sdks/hooks/useInstallationComplete'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
import { AnthropicLogo } from 'scenes/onboarding/shared/logos/AnthropicLogo'
import geminiImage from 'scenes/onboarding/shared/logos/gemini.svg'
import { LangChainLogo } from 'scenes/onboarding/shared/logos/LangChainLogo'
import { OpenAILogo } from 'scenes/onboarding/shared/logos/OpenAILogo'
import { OpenRouterLogo } from 'scenes/onboarding/shared/logos/OpenRouterLogo'
import type { WizardBadgeItem } from 'scenes/onboarding/shared/wizard-sync/WizardModeShell'
+import { type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/conversations/frontend/onboarding/steps.tsx b/products/conversations/frontend/onboarding/steps.tsx
index e16e7e573d8c..daa3abc97afa 100644
--- a/products/conversations/frontend/onboarding/steps.tsx
+++ b/products/conversations/frontend/onboarding/steps.tsx
@@ -1,4 +1,4 @@
-import { type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
// Support has no product-specific onboarding screen worth showing: enabling the product and
diff --git a/products/data_warehouse/frontend/onboarding/steps.tsx b/products/data_warehouse/frontend/onboarding/steps.tsx
index 60edf645d231..2265db224ad0 100644
--- a/products/data_warehouse/frontend/onboarding/steps.tsx
+++ b/products/data_warehouse/frontend/onboarding/steps.tsx
@@ -1,5 +1,5 @@
-import { OnboardingDataWarehouseSourcesStep } from 'scenes/onboarding/legacy/data-warehouse/OnboardingDataWarehouseSourcesStep'
-import { type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { OnboardingDataWarehouseSourcesStep } from 'scenes/onboarding/data-warehouse/OnboardingDataWarehouseSourcesStep'
+import { type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/error_tracking/frontend/onboarding/steps.tsx b/products/error_tracking/frontend/onboarding/steps.tsx
index 65e74051a569..1d5749bed377 100644
--- a/products/error_tracking/frontend/onboarding/steps.tsx
+++ b/products/error_tracking/frontend/onboarding/steps.tsx
@@ -1,12 +1,12 @@
import { SetupTaskId } from 'lib/components/ProductSetup'
-import { OnboardingErrorTrackingAlertsStep } from 'scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingAlertsStep'
-import { OnboardingErrorTrackingSourceMapsStep } from 'scenes/onboarding/legacy/error-tracking/OnboardingErrorTrackingSourceMapsStep'
+import { OnboardingErrorTrackingAlertsStep } from 'scenes/onboarding/error-tracking/OnboardingErrorTrackingAlertsStep'
+import { OnboardingErrorTrackingSourceMapsStep } from 'scenes/onboarding/error-tracking/OnboardingErrorTrackingSourceMapsStep'
import {
ErrorTrackingSDKDocsLinkOverrides,
ErrorTrackingSDKInstructions,
-} from 'scenes/onboarding/legacy/sdks/error-tracking/ErrorTrackingSDKInstructions'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+} from 'scenes/onboarding/sdks/error-tracking/ErrorTrackingSDKInstructions'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/experiments/frontend/onboarding/steps.tsx b/products/experiments/frontend/onboarding/steps.tsx
index 078d91b67d43..b9db50215d3d 100644
--- a/products/experiments/frontend/onboarding/steps.tsx
+++ b/products/experiments/frontend/onboarding/steps.tsx
@@ -1,6 +1,6 @@
-import { ExperimentsSDKInstructions } from 'scenes/onboarding/legacy/sdks/experiments/ExperimentsSDKInstructions'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { ExperimentsSDKInstructions } from 'scenes/onboarding/sdks/experiments/ExperimentsSDKInstructions'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { ProductKey } from '~/queries/schema/schema-general'
import { OnboardingStepKey } from '~/types'
diff --git a/products/feature_flags/frontend/onboarding/steps.tsx b/products/feature_flags/frontend/onboarding/steps.tsx
index e16830a6f69c..89284ec7d821 100644
--- a/products/feature_flags/frontend/onboarding/steps.tsx
+++ b/products/feature_flags/frontend/onboarding/steps.tsx
@@ -1,6 +1,6 @@
-import { FeatureFlagsSDKInstructions } from 'scenes/onboarding/legacy/sdks/feature-flags/FeatureFlagsSDKInstructions'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { FeatureFlagsSDKInstructions } from 'scenes/onboarding/sdks/feature-flags/FeatureFlagsSDKInstructions'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/logs/frontend/onboarding/steps.tsx b/products/logs/frontend/onboarding/steps.tsx
index 8b09d00d5ad8..4ccd0475fd81 100644
--- a/products/logs/frontend/onboarding/steps.tsx
+++ b/products/logs/frontend/onboarding/steps.tsx
@@ -1,7 +1,7 @@
import { SetupTaskId } from 'lib/components/ProductSetup'
-import { LogsSDKInstructions } from 'scenes/onboarding/legacy/sdks/logs/LogsSDKInstructions'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { LogsSDKInstructions } from 'scenes/onboarding/sdks/logs/LogsSDKInstructions'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/mcp_analytics/frontend/onboarding/steps.tsx b/products/mcp_analytics/frontend/onboarding/steps.tsx
index ee9b335d9c36..f6f292db55d9 100644
--- a/products/mcp_analytics/frontend/onboarding/steps.tsx
+++ b/products/mcp_analytics/frontend/onboarding/steps.tsx
@@ -1,10 +1,10 @@
import { useActions, useValues } from 'kea'
import { useEffect } from 'react'
-import { onboardingLogic } from 'scenes/onboarding/legacy/onboardingLogic'
-import { OnboardingStep } from 'scenes/onboarding/legacy/OnboardingStep'
-import { type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { onboardingLogic } from 'scenes/onboarding/onboardingLogic'
+import { OnboardingStep } from 'scenes/onboarding/OnboardingStep'
import { availableOnboardingProducts } from 'scenes/onboarding/shared/utils'
+import { type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/metrics/frontend/onboarding/steps.tsx b/products/metrics/frontend/onboarding/steps.tsx
index 5423e29852a8..7802cce2a492 100644
--- a/products/metrics/frontend/onboarding/steps.tsx
+++ b/products/metrics/frontend/onboarding/steps.tsx
@@ -1,6 +1,6 @@
-import { MetricsSDKInstructions } from 'scenes/onboarding/legacy/sdks/metrics/MetricsSDKInstructions'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { MetricsSDKInstructions } from 'scenes/onboarding/sdks/metrics/MetricsSDKInstructions'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
+import { type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/product_analytics/frontend/onboarding/steps.tsx b/products/product_analytics/frontend/onboarding/steps.tsx
index c0f41ee750f3..97e7d3f7f12b 100644
--- a/products/product_analytics/frontend/onboarding/steps.tsx
+++ b/products/product_analytics/frontend/onboarding/steps.tsx
@@ -2,15 +2,15 @@ import { useValues } from 'kea'
import { SetupTaskId } from 'lib/components/ProductSetup'
import { newDashboardLogic } from 'scenes/dashboard/newDashboardLogic'
-import { OnboardingProductConfiguration } from 'scenes/onboarding/legacy/OnboardingProductConfiguration'
-import { type ProductConfigOption } from 'scenes/onboarding/legacy/onboardingProductConfigurationLogic'
-import { OnboardingSessionReplayConfiguration } from 'scenes/onboarding/legacy/OnboardingSessionReplayConfiguration'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
+import { OnboardingProductConfiguration } from 'scenes/onboarding/OnboardingProductConfiguration'
+import { type ProductConfigOption } from 'scenes/onboarding/onboardingProductConfigurationLogic'
+import { OnboardingSessionReplayConfiguration } from 'scenes/onboarding/OnboardingSessionReplayConfiguration'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
import {
ProductAnalyticsSDKInstructions,
ProductAnalyticsSDKTagOverrides,
-} from 'scenes/onboarding/legacy/sdks/product-analytics/ProductAnalyticsSDKInstructions'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+} from 'scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/session_replay/frontend/onboarding/steps.tsx b/products/session_replay/frontend/onboarding/steps.tsx
index 27bc9c5e58cb..1cbd08c952ed 100644
--- a/products/session_replay/frontend/onboarding/steps.tsx
+++ b/products/session_replay/frontend/onboarding/steps.tsx
@@ -2,14 +2,14 @@ import { useValues } from 'kea'
import { SetupTaskId } from 'lib/components/ProductSetup'
import { SESSION_REPLAY_MINIMUM_DURATION_OPTIONS } from 'lib/constants'
-import { OnboardingProductConfiguration } from 'scenes/onboarding/legacy/OnboardingProductConfiguration'
-import { type ProductConfigOption } from 'scenes/onboarding/legacy/onboardingProductConfigurationLogic'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
+import { OnboardingProductConfiguration } from 'scenes/onboarding/OnboardingProductConfiguration'
+import { type ProductConfigOption } from 'scenes/onboarding/onboardingProductConfigurationLogic'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
import {
SessionReplaySDKDocsLinkOverrides,
SessionReplaySDKInstructions,
-} from 'scenes/onboarding/legacy/sdks/session-replay/SessionReplaySDKInstructions'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+} from 'scenes/onboarding/sdks/session-replay/SessionReplaySDKInstructions'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { getMaskingConfigFromLevel, getMaskingLevelFromConfig } from 'scenes/session-recordings/utils'
import { teamLogic } from 'scenes/teamLogic'
import { urls } from 'scenes/urls'
diff --git a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.ts b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.ts
index cc907d5e9f7d..0efff715d724 100644
--- a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.test.ts
@@ -193,7 +193,6 @@ describe('inboxOnboardingLogic', () => {
const base: WizardStateInputs = {
hasResolvedSessionState: false,
watchedWorkflows: [SELF_DRIVING_WORKFLOW_ID],
- receivedFeatureFlags: true,
verdictWaitExpired: false,
}
@@ -203,15 +202,10 @@ describe('inboxOnboardingLogic', () => {
// Not watching the self-driving program: the detector's verdict could never flip
// `isWizardRunning`, so waiting on it would cost every inbox user a hold for nothing.
['not watching the self-driving program', { watchedWorkflows: [] }, true],
- // The shortcut above needs flags in hand — without them every user reads as the control
- // arm, which would show the takeover to someone mid-run and then snatch it back.
- ['not watching, but flags not in yet', { watchedWorkflows: [], receivedFeatureFlags: false }, false],
// Watching and unsettled is the one case that genuinely has no answer yet.
['watching, detector still pending', {}, false],
- // The backstop. Without it, a flag payload an ad blocker drops or a detector whose polls
- // keep erroring hides the only prompt to set self-driving up, for the whole session.
+ // The backstop. Without it, a detector whose polls keep erroring hides the only prompt to set self-driving up, for the whole session.
['deadline elapsed with no verdict', { verdictWaitExpired: true }, true],
- ['deadline elapsed with no flags either', { receivedFeatureFlags: false, verdictWaitExpired: true }, true],
])('%s', (_label, overrides, expected) => {
expect(resolveWizardState({ ...base, ...overrides })).toBe(expected)
})
diff --git a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts
index c344068aac90..00a3c7a9775e 100644
--- a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts
@@ -2,7 +2,6 @@ import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, redu
import { router } from 'kea-router'
import { subscriptions } from 'kea-subscriptions'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { wizardActiveSessionDetectorLogic } from 'scenes/onboarding/shared/wizard-sync/wizardActiveSessionDetectorLogic'
import { SELF_DRIVING_WORKFLOW_ID } from 'scenes/onboarding/shared/wizard-sync/workflows'
import { teamLogic } from 'scenes/teamLogic'
@@ -105,9 +104,8 @@ export interface InboxOnboardingDecision {
export interface WizardStateInputs {
/** The detector reached a verdict: a poll settled, a stream reported in, or polling was killed. */
hasResolvedSessionState: boolean
- /** Programs the detector polls. Derived from the onboarding variant, so it needs flags in hand. */
+ /** Programs the detector polls. */
watchedWorkflows: string[]
- receivedFeatureFlags: boolean
/** The deadline above elapsed with no verdict, so waiting longer only withholds the prompt. */
verdictWaitExpired: boolean
}
@@ -115,28 +113,20 @@ export interface WizardStateInputs {
/**
* Whether `isWizardRunning === false` can be acted on.
*
- * Trivially true when the detector isn't watching the self-driving program (control variant, no
- * surface registered): its verdict could never flip `isWizardRunning`, so waiting on it — or polling
- * eagerly for it — would cost every inbox user something for nothing. That shortcut needs flags in
- * hand though: `watchedWorkflows` is derived from the onboarding variant, and before the flags land
- * it reads as the control arm for everyone, which would let the takeover render for a user whose run
- * is mid-flight and then flicker back out once the flags arrive.
+ * Trivially true when the detector isn't watching the self-driving program (no surface registered):
+ * its verdict could never flip `isWizardRunning`, so waiting on it, or polling eagerly for it, would
+ * cost every inbox user something for nothing.
*
- * The deadline is the backstop for the case where neither of those ever resolves. A takeover that
- * flickers is a worse first second than one that waits; a takeover that never renders is worse than
- * both, and it is the only failure of the three a user can't recover from by waiting.
+ * The deadline is the backstop for a detector that never answers. A takeover that waits is a worse
+ * first second than one that renders at once, but a takeover that never renders is the only failure
+ * a user can't recover from by waiting.
*/
export function resolveWizardState({
hasResolvedSessionState,
watchedWorkflows,
- receivedFeatureFlags,
verdictWaitExpired,
}: WizardStateInputs): boolean {
- return (
- hasResolvedSessionState ||
- (receivedFeatureFlags && !watchedWorkflows.includes(SELF_DRIVING_WORKFLOW_ID)) ||
- verdictWaitExpired
- )
+ return hasResolvedSessionState || !watchedWorkflows.includes(SELF_DRIVING_WORKFLOW_ID) || verdictWaitExpired
}
export interface OnboardingModeInputs {
@@ -278,7 +268,6 @@ export function computeIsSelfDrivingSetUp(
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface inboxOnboardingLogicValues {
- receivedFeatureFlags: boolean // featureFlagLogic
pullsCount: number | null // reportListLogic
pullsCountLoading: boolean // reportListLogic
reportsCount: number | null // reportListLogic
@@ -365,7 +354,6 @@ export interface inboxOnboardingLogicMeta {
isWizardStateResolved: (
hasResolvedSessionState: boolean,
watchedWorkflows: string[],
- receivedFeatureFlags: boolean,
verdictWaitExpired: boolean
) => boolean
isRefetching: (
@@ -448,8 +436,6 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([
// Already mounted app-wide by the sync widget; connecting here just reads its verdict.
wizardActiveSessionDetectorLogic,
['activeWorkflowId', 'hasResolvedSessionState', 'watchedWorkflows'],
- featureFlagLogic,
- ['receivedFeatureFlags'],
teamLogic,
['currentTeamId'],
router,
@@ -578,19 +564,9 @@ export const inboxOnboardingLogic = kea<inboxOnboardingLogicType>([
(activeWorkflowId: string | null): boolean => activeWorkflowId === SELF_DRIVING_WORKFLOW_ID,
],
isWizardStateResolved: [
- (s) => [s.hasResolvedSessionState, s.watchedWorkflows, s.receivedFeatureFlags, s.verdictWaitExpired],
- (
- hasResolvedSessionState: boolean,
- watchedWorkflows: string[],
- receivedFeatureFlags: boolean,
- verdictWaitExpired: boolean
- ): boolean =>
- resolveWizardState({
- hasResolvedSessionState,
- watchedWorkflows,
- receivedFeatureFlags,
- verdictWaitExpired,
- }),
+ (s) => [s.hasResolvedSessionState, s.watchedWorkflows, s.verdictWaitExpired],
+ (hasResolvedSessionState: boolean, watchedWorkflows: string[], verdictWaitExpired: boolean): boolean =>
+ resolveWizardState({ hasResolvedSessionState, watchedWorkflows, verdictWaitExpired }),
],
// A config or count request is in flight. While true, the verdict must not commit to the
// takeover: the wizard may just have finished, and the loaded values are about to change.
diff --git a/products/surveys/frontend/onboarding/steps.tsx b/products/surveys/frontend/onboarding/steps.tsx
index 8768bf36a020..d72bae6cdb0c 100644
--- a/products/surveys/frontend/onboarding/steps.tsx
+++ b/products/surveys/frontend/onboarding/steps.tsx
@@ -1,6 +1,6 @@
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { SurveysSDKInstructions } from 'scenes/onboarding/legacy/sdks/surveys/SurveysSDKInstructions'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
+import { SurveysSDKInstructions } from 'scenes/onboarding/sdks/surveys/SurveysSDKInstructions'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/web_analytics/frontend/onboarding/steps.tsx b/products/web_analytics/frontend/onboarding/steps.tsx
index d713227c3991..790dc26df3e3 100644
--- a/products/web_analytics/frontend/onboarding/steps.tsx
+++ b/products/web_analytics/frontend/onboarding/steps.tsx
@@ -1,12 +1,12 @@
import { SetupTaskId } from 'lib/components/ProductSetup'
import { FEATURE_FLAGS } from 'lib/constants'
-import { OnboardingProductConfiguration } from 'scenes/onboarding/legacy/OnboardingProductConfiguration'
-import { type ProductConfigOption } from 'scenes/onboarding/legacy/onboardingProductConfigurationLogic'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
-import { WebAnalyticsSDKInstructions } from 'scenes/onboarding/legacy/sdks/web-analytics/WebAnalyticsSDKInstructions'
-import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
-import { OnboardingWebAnalyticsAuthorizedDomainsStep } from 'scenes/onboarding/legacy/web-analytics/OnboardingWebAnalyticsAuthorizedDomainsStep'
-import { OnboardingWebAnalyticsPathCleaningStep } from 'scenes/onboarding/legacy/web-analytics/OnboardingWebAnalyticsPathCleaningStep'
+import { OnboardingProductConfiguration } from 'scenes/onboarding/OnboardingProductConfiguration'
+import { type ProductConfigOption } from 'scenes/onboarding/onboardingProductConfigurationLogic'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
+import { WebAnalyticsSDKInstructions } from 'scenes/onboarding/sdks/web-analytics/WebAnalyticsSDKInstructions'
+import { INSTALL_DEDUP_KEYS, type ProductOnboardingProvider } from 'scenes/onboarding/types'
+import { OnboardingWebAnalyticsAuthorizedDomainsStep } from 'scenes/onboarding/web-analytics/OnboardingWebAnalyticsAuthorizedDomainsStep'
+import { OnboardingWebAnalyticsPathCleaningStep } from 'scenes/onboarding/web-analytics/OnboardingWebAnalyticsPathCleaningStep'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'
diff --git a/products/workflows/frontend/onboarding/steps.tsx b/products/workflows/frontend/onboarding/steps.tsx
index 020aef2a3367..5e9119edb585 100644
--- a/products/workflows/frontend/onboarding/steps.tsx
+++ b/products/workflows/frontend/onboarding/steps.tsx
@@ -1,13 +1,13 @@
import { LemonBanner, Link } from '@posthog/lemon-ui'
import { CodeSnippet, Language } from 'lib/components/CodeSnippet'
-import { OnboardingInstallStep } from 'scenes/onboarding/legacy/sdks/OnboardingInstallStep'
+import { OnboardingInstallStep } from 'scenes/onboarding/sdks/OnboardingInstallStep'
import {
WorkflowsSDKInstructions,
WorkflowsSDKTagOverrides,
-} from 'scenes/onboarding/legacy/sdks/workflows/WorkflowsSDKInstructions'
-import { type ProductOnboardingProvider } from 'scenes/onboarding/legacy/types'
+} from 'scenes/onboarding/sdks/workflows/WorkflowsSDKInstructions'
import { useWizardCommand } from 'scenes/onboarding/shared/useWizardCommand'
+import { type ProductOnboardingProvider } from 'scenes/onboarding/types'
import { urls } from 'scenes/urls'
import { ProductKey } from '~/queries/schema/schema-general'