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.

feat(navigation): make the simple sidebar the only sidebar (#117250)

Rafael Audibertd92e0ceedfd5
diff --git a/common/storybook/storybook-timings.json b/common/storybook/storybook-timings.json
index cf7ad57c0999..b9796a3a31b3 100644
--- a/common/storybook/storybook-timings.json
+++ b/common/storybook/storybook-timings.json
@@ -31,10 +31,6 @@
"chromium": 28.015,
"webkit": 3.879
},
- "frontend/src/layout/panel-layout/ProjectTree/ProjectTree.stories.tsx": {
- "chromium": 12.629,
- "webkit": 3.461
- },
"frontend/src/lib/brand/Logo.stories.tsx": {
"chromium": 1.693,
"webkit": 1.142
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index e799f9017a6a..745fb7de6490 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -693,9 +693,9 @@ snapshots:
components-command-k-search--chip-and-value-suggestions--light:
hash: v1.k794b7964.1f156fcb62177c54eddaf141565a293f383d79ced9443ad570108215f5d68627.xvKPM445SeJQj5XOeZcMd3YTDywIpPVgQ5g4kZew9O8
components-command-k-search--empty--dark:
- hash: v1.k794b7964.458b55fd345ec31873d513d00258ebe6f6f6e9b1e91c4504ad4f0c16046f5151.wfpwrARigE_uao91HNDgU7NeZN24s2vP9Q3H4W4mEX4
+ hash: v1.k794b7964.2d887418923c0c8f617c8999faad1bb337a0f005b87d47ae6cab1e4995825531.VwoW0u8G36xRYT50W5q7arAiWy64oE-4jQFLxBWo8Xc
components-command-k-search--empty--light:
- hash: v1.k794b7964.16a8fc2aa9fe572f42c756f561dec1d929c15e01d0cf52f699cfd8eb2213a117.dQLxyVraHzdQpjon_SuAJml5zKhCoFXSJb8t4odcbj8
+ hash: v1.k794b7964.1d930eddcafd3da1dc745697ec13131f7c23c8e85d45c33dd7ec05572af9e099.ehdkX2oD0RewNHgJMCACOTqlWclPPF68BZVoa99w9nU
components-compact-list--compact-list--dark:
hash: v1.k794b7964.59d9b22dc4c1fabb38cfa1c8072b3f6e3e4140bfddef6160e568f935c0ba7f29.aeZmv2PM9H27yaixZr0lFX-5hBEr1ET0-8F-DJP_QS4
components-compact-list--compact-list--light:
@@ -2545,21 +2545,21 @@ snapshots:
components-sample-data-tag--default--light:
hash: v1.k794b7964.8ebad648dbf23b4ccf50c7b2543d02e9429c2f5c67446cee8823fc06fc98a97d.MSu4A4yz_nNpo8sN007sucqXSdbb7pJQExT5Z2ki0Ys
components-search--default--dark:
- hash: v1.k794b7964.da49a8420c703e68e52fc9091f69cbe6f9b145bbdae11bef03d31e3523168cac.iQUGfMwL8k8_L-SfZAShZ6S6gLXnlrhUWMVZf01c16M
+ hash: v1.k794b7964.e02bbbdf3b5e7c127c50dfd8a8b37f2de2f7f23a2e168b0fd2d13aaeaa44c88e.X7tFtyBFjd0owneYHrHkMXGyTTfUpyv3ZSK4jVhZAPQ
components-search--default--light:
- hash: v1.k794b7964.5dbfa04b132aca2440e6313e0a33ad1d5d4f6f198dc32fa2993fd4ccf7c315f2.CKazXNEZ5uXgKxm86E-IlDhLwkAH96PSYDyrH5a-u4g
+ hash: v1.k794b7964.3420591fdb738826c4e0e26f2409e1d03b93e5ae9629ff93e6e688b4d1b162c3.-cabrwpKPTBpJBfmgQtynN4vhxoATGoOZfVsymBWV0U
components-search--no-recents--dark:
- hash: v1.k794b7964.c7f787a5f26698ee8f82fe1b90260a2a33d1c705fced19156577d9ab74f0a885.R9HYxWqks9vhwakV2LQ_sAG8bMA8NuxBnpcU_augT9M
+ hash: v1.k794b7964.b168e4ad14397a720a1e45e6b446552fb9ea78e40b25cc2e3074310b52a5dff6.q6X85q0o2uVqkASgia96VyNCZAlzZ2Q2HFISdsFXzw0
components-search--no-recents--light:
- hash: v1.k794b7964.e0a751dae9feb832ccd176945bb33042d101bdf0bfb9ecbf10525e58d1e2cbcc.keQcC9FXf8jd5ubJrXpPv6_LaXPOkngEsTVyDN1LxAo
+ hash: v1.k794b7964.ae1ddd9214e27e7567fdc898f5f0e41412f34288a81ed50e90ab28864d76c531.EZU79H9z28tXUACiqIupE2mb5Mv1JNcn-mFDellqV44
components-search--product-recents-and-starred--dark:
hash: v1.k794b7964.614b22a128f415535fbb21f8a81368d14c3f1bf7ddafdae6629c82726ebbe42a.MTE--SBuwsAWaNIRH67s1jt1RfBZr1Oz9HvG_WVxI8s
components-search--product-recents-and-starred--light:
hash: v1.k794b7964.45213063c3c767175033b9c3ff72d94df2e3ffc9ffe46398bc78c45c3708f1b5.X_mXo_erMw09YXsaZY6-sc_9vQx8VtriGVHZgr_wJmw
components-search--searching--dark:
- hash: v1.k794b7964.cae6339e14f76af2b60030a293477675e99b941ad1266eea767528222326e0f8.jgP9e0SCqn7kGGS7b0lzTemWbdIfcf9wcCjEKQYow4I
+ hash: v1.k794b7964.b11085dbd5acd09f8b47d7dc9df20ba350fbaf8fe6b638639f98f9237dc36603.lLNJyKVqKi0QDg5-9kfZhBmgTZPugrSjcmZZDpm-Yck
components-search--searching--light:
- hash: v1.k794b7964.a3ffd85061bbad0385b169397c834d95d5f3cddc62ea98a9f7daecc1f955fbad.YZMreRcQfPAOFieMvlMYyCC3Ua3rctfJ7V1hi38Fzoo
+ hash: v1.k794b7964.cd816b51b6094ea4f05af3633b79015937e1cbe9dfc65b195bbf2656b3a131fd.uzSjzewNRi9bvX16C2yBqAauO2Bm_Kf9gLRllqHs-so
components-sentencelist--full-sentence--dark:
hash: v1.k794b7964.7e8e5dd2e09d246cc3668f362f2391fe67618bd1143aa393832297f5dc30e558.yptEWKc5RAUY613Fwd5cQ0VIinMvpdoI6cuKgagAGxk
components-sentencelist--full-sentence--light:
@@ -4240,10 +4240,6 @@ snapshots:
hash: v1.k794b7964.33dac53a2c2f3c8945bb52917b010f00a24b8d8b213106939af1037022d4ed5e.QNBv_MCq5SJyqzj3G7AuQxGF1qLYQLIQotnO3MfqpRE
insights-worldmap--default--light:
hash: v1.k794b7964.a4f523dbe2e78f12ddf6c95d6e1e0b1da4457008aa42a9b83fb5e21bc4519915.sRV9jpfMOemd-Hss7Y7z4hMMwHYzM7l8Dq9i4uoJBiE
- layout-flat-nav-browse--default--dark:
- hash: v1.k794b7964.df655c95b188c65a31c1c2a23c83140bc5f8868e1ba32bd1b4c56e95635064f0.UtGqJPi8g0kmOTagK70OahTICvY2qDWwJioVmqzd9ec
- layout-flat-nav-browse--default--light:
- hash: v1.k794b7964.d37726e2e2377a5486f9dd35d7577fe19a3d228847072240633d87d5bbbea62b.eHQIZcnhBCHKgbobYuA_Qz8gNf_IIxq3USUsfZqLmZQ
layout-impersonation-reason-modal--loading--dark:
hash: v1.k794b7964.56bc03177fcbe93f212232c9025d90ec672e9043881ce4e9a3dbbb612b501066.mkYeZ8C0UhPLy7CKjURxERYeFMjyvXrOyEpykdHmmrM
layout-impersonation-reason-modal--loading--light:
@@ -4272,10 +4268,6 @@ snapshots:
hash: v1.k794b7964.dea67e50d4956ed1865124e7dba12c5deeb0703b19cac0513c82facb069e6a60.gkkPUZ2bAqgN4OxaM6W5sfI8m4O2uxsHh7xqL1PLsg4
layout-navigation-eventingestionrestrictiondetails--whole-project--light:
hash: v1.k794b7964.56e91dee845e8cae758c631b29733ddb23d0bd46c4669cd904032f3f668c8dd9.lrp6-51HhFOiy6Rqy1o5KlQamvWmozjUVC8EQnCPhrU
- layout-navigation-sidebar--density-comparison--dark:
- hash: v1.k794b7964.d4e69a3d1504fadf1b4056c6b7f84dd8e94a1a44d9cc83ae46d2c023f9b5788a.1wbkpRs6-VqVJGd9C-utXO-kA7rQN7JPvJ_SZ6W9cAc
- layout-navigation-sidebar--density-comparison--light:
- hash: v1.k794b7964.1ce2fdf015cbe4fefcaabc64af3bd2d8e671b8d502b3cf96bd07afea725d9fd1.zybM8RjBCVWcX5OYJ9MyNfMiwuu7HL9EgySs48INc_U
layout-navigation-sidebar-posthog-team-cohort-banner--collapsed--dark:
hash: v1.k794b7964.3ba80798b00d6b9a48ddcd8134bdcba754412fb34017a5497688f1c3dc9bb7a4.W9JGvxWo3Sgl8WDUqJaoDzkpZIhqM79UxeivhoBfFcc
layout-navigation-sidebar-posthog-team-cohort-banner--collapsed--light:
@@ -4293,37 +4285,37 @@ snapshots:
layout-products-and-files--collapsed--light:
hash: v1.k794b7964.e7d8f5b94607d6626a434328a7d3b09f6b896b0b8b1069a519e7f147c6a9a0ff.by7DXbMATATWtZjbLK1xoXtHypya157EapE7anGY6bo
layout-products-and-files--customize-sidebar--dark:
- hash: v1.k794b7964.1fba9c5ebd3bbcddf1d99340a9fcf5ce7ec1d9f87ddf22269b6ed7a2a4bad506.7F_dBNJCrhSGvpugQSLyfbXcKHQwVSZVLZMV27CvE8o
+ hash: v1.k794b7964.2f749714be377957375b3ddd2e7a6aaf003e68d09703903b6eea9cd541b177ce.8-iRAG1mbaVmpNQ81qio8ls9u4S7WRLgqqabXdfxWYw
layout-products-and-files--customize-sidebar--light:
- hash: v1.k794b7964.03e58d6287d435ac506a948e2fc9ce6aae5513448203ab656d1549966f73e15b.k7nrKGr2Tcz0VJFrKr4s54twkeODgVUdT6Q_04LP_3A
+ hash: v1.k794b7964.803bb9f9a96edb3b753f50437b21195bfa3e28eee9c8b8b5d4a5b52e32291ab1.IR7hj5UwyaoOvft353k4u_h3tDFhU6BgREpxuKy2DeI
layout-products-and-files--customize-sidebar-dark--dark:
- hash: v1.k794b7964.b2f4a581819cbc3638ba7db926844c42e71be205aad22e3f02645a33bb16a882.3tGvf5WQgcgVt3BJkjFpVOAfcPav_nfdn5R8PJLxYno
+ hash: v1.k794b7964.d9bbf6d8af9961d0cf2caaca2453ef9e3b0066103605970ee798050e40d0f7a4.vexhc31yEVHfmD1qlkJ1d35_oZLvHLSpxW9pUcwX7VU
layout-products-and-files--customize-sidebar-dark--light:
- hash: v1.k794b7964.2c4537595b499ab5d3208a5aa7e355220401e03474d08f08da6c98e6d01bb210.v27Rtm3FNgGn_kN3QolFS5wPPX3CpClkBZKRMqYzbEM
+ hash: v1.k794b7964.c1c2175898388b295a8941c1db37d1e2257da42ff81028c1aba622e9e177f024.CHXsHBHsQXmut5zvgIX9g-zllyQr6DL2G2E6alnhB1Q
layout-products-and-files--customize-sidebar-narrow--dark:
- hash: v1.k794b7964.095c90506553382548950f74838853c6947b6bc981b02d9f4e3c631196b6edd1.iu1ndLSh35pf1MeFeGMhs-q4RBNR37cNVIjXWy0QcTo
+ hash: v1.k794b7964.ccb9e82afeb4ff42fbfb5453d9933ad9c99a602b906c8d12b1c13508a548a029.lQFetVJ3TH074LnVa2l-LfACWiFaKFP7-vNlCVi3w_Q
layout-products-and-files--customize-sidebar-narrow--light:
- hash: v1.k794b7964.8ea9526d99b7c5798e53655662ae500869ecd80d6330f21b50e3375c06e87cf3.qpmjY7z6nd9fYOI1YBpp0qSn__TZvgjJe_pLmKe2pdI
+ hash: v1.k794b7964.dc66472a112fcdc67ef26efaf51e6bdcf8856e94cf5fa30f1a35ddba92637ece.hySCxRmyIeU009Pcf0q2VEE5O9NKnBXC_GrEWDD0LPw
layout-products-and-files--customize-sidebar-no-matches--dark:
- hash: v1.k794b7964.b6db74b233715262d370e8391e0918cd7767a035c4a6943a6cede592b8012bf2.dwlYr4IfQ5fMDjwgNqpoIc8qGEcbtSiAopCQ-ghSKI8
+ hash: v1.k794b7964.66da71ab7879064791894577f2eb2e8589c9bc3e4573b7486b156f58123e9a9c.8KwDx1P3SPwu--AGn1mOgfG_prZ1t2vZ_5604Sr_7Ns
layout-products-and-files--customize-sidebar-no-matches--light:
- hash: v1.k794b7964.5cfec5be295dbde7e9176d3e59509a2a6b1155242937d6657859d129f2f996fe.HwmcWiHbnF4ggtAFBFQ_-_SQp3T9Iymw_oD-3p_V9vQ
+ hash: v1.k794b7964.cce37c4e244b83a3bceb46281ef613d756d5bba82fec7f7abb0d7a76a67e4914.E8BAIJ3_yY_PnU3gnZt83hRXUt50OyQTJe1WNwev4Ds
layout-products-and-files--customize-sidebar-ranked--dark:
- hash: v1.k794b7964.b2f4a581819cbc3638ba7db926844c42e71be205aad22e3f02645a33bb16a882.cyjOHJm80FcGJZ6ktTZjwrmCFQTJmSIWeDIFCylD9cQ
+ hash: v1.k794b7964.d9bbf6d8af9961d0cf2caaca2453ef9e3b0066103605970ee798050e40d0f7a4.r5roV3-gp3FpCWhklJ0mKDeeBLYD2F4dL9rS_kM9Efc
layout-products-and-files--customize-sidebar-ranked--light:
- hash: v1.k794b7964.2c4537595b499ab5d3208a5aa7e355220401e03474d08f08da6c98e6d01bb210.7XJiV4jVnMN150-n6wbWLca9v07fot8X3clFdFx3frg
+ hash: v1.k794b7964.c1c2175898388b295a8941c1db37d1e2257da42ff81028c1aba622e9e177f024.BiJ4KBPu1QmZw9oaeH2duOwRSdOVDWzeenW1O7xxH54
layout-products-and-files--customize-sidebar-save-failure--dark:
hash: v1.k794b7964.9af1aba9e2be1e99320fa4220a2d2e25826e106f1021fa88bc8718d039d0f049.7QDFJSL11xqPkC593iwnaVzIJta2SzlWApSpGG2fNYg
layout-products-and-files--customize-sidebar-save-failure--light:
hash: v1.k794b7964.5b597969c1bdddac573a471156fac566162b2e4323b62872e687e6dd1536c087.uFw2D1TupXhFlwf85N42ddhWKpmWXlUpTatq0rNHeug
layout-products-and-files--customize-sidebar-unavailable--dark:
- hash: v1.k794b7964.1ff47308880933d46fc35e4f867fb6f7eb82ea165a8d0cf6a92a73fd111c31d9.cPl5c_2JGK9UNQ1DKkkqa859JvEVq3JdaP4kn2HwQa0
+ hash: v1.k794b7964.6e3eefbb325baa7677d1e5eed93186c76c6f0708a5de418155ec13871fe9f89a.A-wuvvKQe8M5_hUPQ5EuFIwiKi4jpv8mOuy0V_Fb6mc
layout-products-and-files--customize-sidebar-unavailable--light:
- hash: v1.k794b7964.44dd4c087d59cacc0063243632f316b79f6ed883bf7efb92820c817f72816ff3.t4gW3U5Dh-_4Zwpno3q-N-AfMdPHnu30b0SzGDmVjOY
+ hash: v1.k794b7964.208bf3c34e85247078b4e867deb252816c0f5e93b8943af0ba78dfb48297cf7f.U_yuAiLAQpzhVrb2YCMj3Qvv8Q1pM_YTYzhJRB1wn-E
layout-products-and-files--customize-sidebar-without-ai-consent--dark:
- hash: v1.k794b7964.3022b64b90246497259b0f6bf8cb08c193db8030b2f2faff738f44886b73420b.i_8HFGpJaWmk8FlIIfU_JTA4-mbl9Q6hcMNx1D4N-vY
+ hash: v1.k794b7964.aa99f7f4e4a87b8c75a23cfeb96b886f003d124715ad4010611b3ccfc4cc8688.JYmhxiCDvCTS8EHCJG4852OdA2PIcsXoWSE2NUxpT28
layout-products-and-files--customize-sidebar-without-ai-consent--light:
- hash: v1.k794b7964.044d51b974969d8034cbf16a816b3cc100611e559cdd8fb40fd6f12829da41dd.vamtoHfXGWs8axmxXah2jQBvvWOqdHIU5tSIQXSS5-c
+ hash: v1.k794b7964.623e2fccd7383b02d6a5117dd74432b04ac7d54351565ae511152a8909cd61c3.ANrsCTq3alfZaFZx2yMLGQA3vmYGaGkwFVKJ5E-GmD4
layout-products-and-files--dark--dark:
hash: v1.k794b7964.8c43e5be0f0904e0df4bb674c2b7af6c013544c688b8c1204418aef5c97db85e.a4X3ArwEsw_l2RSh8C51XQaCV3Jzn180VFzPRXf3YGo
layout-products-and-files--dark--light:
@@ -4388,22 +4380,6 @@ snapshots:
hash: v1.k794b7964.3be4e389e533b30185c7932e6ef078afb11dc250dd858e56d94878b3ba9891af.k_I31Dc7O-O0ZxREAcQlKMJbd24q7qBsn9jap9WkE98
layout-products-and-files--files-search--light:
hash: v1.k794b7964.e6096eac8e226d90e36e144cd638f7118d55c751fe15d816f7626a8e8427d19a.I9K5ir7sdgq5WpM-1kSnIgR9_7zoftF7kIVkJJ_049g
- layout-products-and-files--flag-off--dark:
- hash: v1.k794b7964.e8e26209cb3f0d0341652ceb3faa804a8e297782ef168f564237f99d0e5572f4.ayq8VvLG_E1-ePC1GiNQSw6qCBCQdXyk1u8umelhxLQ
- layout-products-and-files--flag-off--light:
- hash: v1.k794b7964.60e7426834b7b67d7bfcc485a21e42a37538810ca0b6f0fb16f93ae7e2e4a742.3AiDJo4nRxAiq1oZdbi3wpjo6IRxWl8-90JvD4_vBQg
- layout-products-and-files--flag-off-after-files--dark:
- hash: v1.k794b7964.e8e26209cb3f0d0341652ceb3faa804a8e297782ef168f564237f99d0e5572f4.Fyn_tvZXy5U0XOFi6nuhGGr1sGizcBe6opk6zxQYfiA
- layout-products-and-files--flag-off-after-files--light:
- hash: v1.k794b7964.60e7426834b7b67d7bfcc485a21e42a37538810ca0b6f0fb16f93ae7e2e4a742._gv1O0ZCAHAS_9Jg6ITbCx_4PNduE7wmFmc_3GawvGY
- layout-products-and-files--flag-off-collapsed--dark:
- hash: v1.k794b7964.d6afb3e4a9cb6549b97b74fae1be4bb9573a02ef08694137012a5af092454acb.o4Wl2vtPBhRZkd38dYWiEoGtlcdBObNzrbkfaN0cyb4
- layout-products-and-files--flag-off-collapsed--light:
- hash: v1.k794b7964.3ea4f9115eeb0c26070c6a8b6ef85679a6b15433c00a5f1660e73589af48852c.EFFDotzlPgOnB7IfUpUnccs4XdKcKMh_hJHgGyh1ck8
- layout-products-and-files--flag-off-flat-nav--dark:
- hash: v1.k794b7964.741c678a65b7a9fd8fba9b287139b090b7dfc0cb9242fb6ab0759b32247a9bf6.9GDgJH2M_OffccgLFcncZdH0VglA1u8OEhWCNEKdsgs
- layout-products-and-files--flag-off-flat-nav--light:
- hash: v1.k794b7964.58bd050e6237f472e90016f997b7d6f68f6650ab35545a91cadd7d519fadbdc7.kcMUzUgt6_2NA7vLY9Gt50iZD0MF6Ja5Z2i19ku68Iw
layout-products-and-files--narrow--dark:
hash: v1.k794b7964.b42e9be696c8595bb60c689cada0c8773384f38b33c0ff17ccba2a85259920d4.jGdXRfU9EnU1Za1BNEDmDtjpnILLBh1BeMYRLNpkZEk
layout-products-and-files--narrow--light:
@@ -4460,18 +4436,6 @@ snapshots:
hash: v1.k794b7964.52ba01b050e579d7c600df08497a2dfab2dba9cf670553e032afce3819d6d00d.LyBXA3cHKCseZ9iQlkxWCe3p-NdCLASJsrkWYe1dg8Q
layout-products-product-tooltip--sql--light:
hash: v1.k794b7964.417a2d56a0422336f9efc43030a7cdae3f122cf78e3fbbad82601aef1cf74ad4.JG4EGMsAS7rihSzbd3tcBnku6eJQQ3_kL1V7TKFLgWo
- layout-project-tree--all-products--dark:
- hash: v1.k794b7964.56c94e9f8ba1c0396eb7fe3e985479f36e30f5493d51f36672c21940d6c8579a.Aiyxwte5mXG2LnVFmU7nJB7pu1jw663e72mBS_kaN0I
- layout-project-tree--all-products--light:
- hash: v1.k794b7964.0948dd5f0ae164d02fdaa41c510d4647789e187a67a64733c778800a0c31d7bf.ng-dx3QJ8BVl_eiAZAcn031HFJ3GSazL_OB0zHo19LE
- layout-project-tree--default--dark:
- hash: v1.k794b7964.d82a55db4673668477d27b0ce520ef462930fedf17033cef7083460a87649d3b.dCmEwQtiQfK5faRYZh-fUj_FNcXNVvSvxe8uG0vasb0
- layout-project-tree--default--light:
- hash: v1.k794b7964.59c0d512404b47cb773aedb47fe5e574971ee0af34c16fe52ec76864cda25063.XlLwUxbKH43NgQEYJpeX3r_SI9FqpeaATzjbh2gUoTc
- layout-project-tree--narrow-size--dark:
- hash: v1.k794b7964.106b9131644135238ef85f042aadee8b9fd1d507b8958fb2907a324c85a25b74.f4xilJOOfSLX2JGlwqDu7umVnRpcHClILRxR_WUiQMQ
- layout-project-tree--narrow-size--light:
- hash: v1.k794b7964.b7ea83ef6bab1ad9a52822aae2eacea1189ef301756cf7798bcd8c910ec9027d.utHYOQM8EcqNb-lSfLiRST8aXSve05jZtoyWKhjPF7o
lemon-ui-code-snippet--compact-with-long-text--dark:
hash: v1.k794b7964.24ef8dbf676262fd459d035788973a4f00794e9f44094a50fa75d3b290e16614.HctoklkKb9cteQHNOAmiWzf2u1pie4IMoEMnn8ih3WE
lemon-ui-code-snippet--compact-with-long-text--light:
@@ -8175,9 +8139,9 @@ snapshots:
products-workflows-editor-graph--support-sla-routing--light:
hash: v1.k794b7964.3d22d5ac12b872c65e76d8cb3016af896f27d70217660206d5d0c5e6e4628983.Px1gNL6PZui6RROgdBff52KgJUSB7dwj6YyfkfdkQUY
products-workflows-editor-graph--with-navigation--dark:
- hash: v1.k794b7964.478e096c6795fc3dccbac6fea8a8237934f5c5db25e419fbc5896ae4621dcfb6.xZ3tzq2ap9BML8znxrA91SbLDNc3HGRQVzdkAKrt0HQ
+ hash: v1.k794b7964.0590cc85707ce7d8e466d1e92e5fea40c211a2a9b80cb8e008a8c4b04afaceb5.ZPRwDwwDci0jedMxzPEm_aEzhgbvhvx295wh_WskwNM
products-workflows-editor-graph--with-navigation--light:
- hash: v1.k794b7964.d9fb7ad8933449c9e9800c008410570daa9e250318ee2d503382086ba3fa9e62.LG9Vw9455ydASd20G_Z1TkAYc4DWF4rngWe9lnAxbGo
+ hash: v1.k794b7964.0b1b1527d0d914c17db9d127f0a35ee2e72300788add70c8c35fa556ca4fbd99.IWeZjFffmCzn1xoAOeJVotI-pJ5g7eLVWlzs06qJv8s
products-workflows-editor-tree--add-on-promotion-emails--dark:
hash: v1.k794b7964.fcd4181778003e8a8e5a5840f8799a422a4a0d0497e4168992b23456368c1246.uz3S-W5OMu5lVP1KadmuGbEfnlob_jsGfoTXsA9GZco
products-workflows-editor-tree--add-on-promotion-emails--light:
@@ -9455,17 +9419,17 @@ snapshots:
scenes-app-businessknowledge-knowledgesourcenamecell--user-text--light:
hash: v1.k794b7964.fba04716b8f344e21fa3bb2ec69e627bd9836ff2161986538ac2b562973b0edc.Xl-YJ8Poqz1nofU4nIyAfnM4GbZZ1YYtbM37mIzZ4w4
scenes-app-customer-analytics-account-detail--churned-and-ignored--dark:
- hash: v1.k794b7964.9c6436aba85f3a114d4a5d7cec25c188131dfb1963f637f43fa6da973d34ae6c.ofneyf9YQP_TSCsA6KbPXDKXjqEC2xyeHfljSG957Bc
+ hash: v1.k794b7964.bd6961f59d362172d69c265aef7091f99d8308b3e05b479e1104985d17a24166.55-miH8Ic7EJqfzT7xiNrJwaWttr1EWgftEDWBhlMXU
scenes-app-customer-analytics-account-detail--churned-and-ignored--light:
- hash: v1.k794b7964.b059230a0cef776a2ae19b0f0b116fa8598c55f87dc21f5399f93e5e540b56f1.h9vvfcf-nEYaEVSpIv0Q8Oy01Bt4G4LojokghXJ2KgA
+ hash: v1.k794b7964.ee8975c579197df7cbcd726d594466a25f1c6fc222d0ecb470d26041e36dabae.GfyXDzGUBMYgEqhAkpZaz_doeKnrVWAuZjz2bWXHQP8
scenes-app-customer-analytics-account-detail--default--dark:
hash: v1.k794b7964.4a2c8fd1f6e62fadf3a11ec937086d0ab3e97c820541fe568789683d1517124d.TDZuljsH5Uy2rQ4pSkDrrazjA-SlyfGn52R4n9Ix4ac
scenes-app-customer-analytics-account-detail--default--light:
hash: v1.k794b7964.3dc16f08d0f41b7d7cf6b0e84392580fb009090e3bb7fc8ad9ff8c6a4b8b5c0e.hTnJ40qtoFvmt2g1j9aw7zm4mSIulD0osQgS2SjLKI4
scenes-app-customer-analytics-account-detail--edit-status-dates--dark:
- hash: v1.k794b7964.621eb2ecd55d586073ed167a2f727bf3c923ce4057c8880040e0de639ef86991.jpgBJawhros6cJyc_L1cGLCO0JWNZ4HfKRky8hX_TiY
+ hash: v1.k794b7964.a9cf2ee75f8ec986c68daf548c74ff9b2ebb02e1d3ce057b122a637bf7dc9ed4.RWS87p6idZaxSMl6s4pcehPT8Ar28cBoW5pRqwgZoxQ
scenes-app-customer-analytics-account-detail--edit-status-dates--light:
- hash: v1.k794b7964.220e9463403db401ceaf2c4c95be892641d7bda4488a31b192b3e789a5c59756.WAPP_4Co_p5fU9n7q8VRJCmmq4OIF53Q84teairAX2g
+ hash: v1.k794b7964.708dc3a3d5a2bfb827874bfc24c6223ac002a6ead69744609e64e94618f9e5b6.RKv5fJvd6oaViyiJ5sv0DZgA1-AoFft9QWUEz_6VJRU
scenes-app-customer-analytics-account-detail--external-id--dark:
hash: v1.k794b7964.26a93f54f5fe293e17ee0f7315163a5b14c71e1e78e1bb8adc78f09ca04412f3.4gU8PFyIaVQrS8zOPX6Al_eLweeNi9XIAQ9hfr2pzag
scenes-app-customer-analytics-account-detail--external-id--light:
@@ -10095,9 +10059,9 @@ snapshots:
scenes-app-data-warehouse-sql-editor--bi-data-source-picker--light:
hash: v1.k794b7964.4eeb5871a96119890608f584c6f82d59c159b69ffcf2cfb83b809d489882c989.L5Rh7rK7C-esP9pNXkAT41lvr4RO-N2R2mY7wEfRjJk
scenes-app-data-warehouse-sql-editor--bi-drilldown--dark:
- hash: v1.k794b7964.545fdaa87925013ed0dfd98d825ec9f7309e29ac368e795a32fe29b0dd5f1dad.fI7cXrNu0lm9NpAgIeZkwRnslEmbc5MwPrU7O3WDwao
+ hash: v1.k794b7964.68ae5a2217951bbe57ab020a5c2f480c527652f64cd0e7c1569d2f6c3c89e5a2.G7_jPjpNVTuk4_6CVl67UZo6EekgmkQXTrlzz5FYo0Y
scenes-app-data-warehouse-sql-editor--bi-drilldown--light:
- hash: v1.k794b7964.3221643cb9a04fe71da26820a65fa6dad19f1f080d90fc922e0f20d76bacc2e3.uKlqCiMLuLXaVz4nMUJ0vlMRQx61zEb3iQNaw6smkXA
+ hash: v1.k794b7964.51e20f9ed3a5f71042d79308c84e8e8f69e16e9fb08fa0ffffd9d07962d7f7c3.-vKccSWyHN6kWTyUG2uog8aNS0DRBIm8oOxOpcxX-7E
scenes-app-data-warehouse-sql-editor--bi-edit-saved-insight--dark:
hash: v1.k794b7964.f36b0bf584fbbceb8bd969587fbbff7b423ae4e460313014bf2ac20f85946849.hLUzhJxWrWp5aTQt39Imx1_EXEgQVlLaClPf6iPIteE
scenes-app-data-warehouse-sql-editor--bi-edit-saved-insight--light:
@@ -10115,9 +10079,9 @@ snapshots:
scenes-app-data-warehouse-sql-editor--bi-mode-worksheet--light:
hash: v1.k794b7964.d60ca4f154f5b6aa7dfe97f5907d32aeb07d408ef2ccfdd9b86bd8880c17ba6b.m2J3D-2Zw-ub5S6SSZk2MFZf3rAXWA6146N6UMKx2Xo
scenes-app-data-warehouse-sql-editor--bi-named-hierarchy--dark:
- hash: v1.k794b7964.767b0c0fd033909b2a5c1b9d4e3e55677e1574aae943eddc033cde32b01b7667.rdR5M4z_-IMcPVwOMGvIPycXRN-CnJZv1mmmbxggOFk
+ hash: v1.k794b7964.180f3b83cbbf5f1b708ea46d095685e5570df1846efe5d450c7b2434edda5ae1.De74xaLyCoJRi295g5ChO00yqaKxf0j2HVNagioDRs4
scenes-app-data-warehouse-sql-editor--bi-named-hierarchy--light:
- hash: v1.k794b7964.d6959b2e6ec22afa09a76e85d29eba63a693b9674e174fa3f9ba67b5564171c9.TPdZWIYfmaxK28hhZQIOYX3I_1XpPJtaK_jEk_6gCIQ
+ hash: v1.k794b7964.9874234c76d2c58ad97cdf71da93b03f6fedb482c0978185e6ad1602aeb42249.nzTwYRAxxTDrANQu-17ktAwKi1IAx8R8YEWiDAU1usY
scenes-app-data-warehouse-sql-editor--bi-numeric-bins--dark:
hash: v1.k794b7964.cabae245ff0e0d2def8041d8f927d377a0d3b058b175cc6a89660d2011b55e74.8pC3w5r2NMav84LvZJoMtgyhz6p3OawsN7T_kEXJZYw
scenes-app-data-warehouse-sql-editor--bi-numeric-bins--light:
@@ -10215,7 +10179,7 @@ snapshots:
scenes-app-engineering-analytics-ci-explorer--activity--light:
hash: v1.k794b7964.e1dc01cfa887b479b7d727311b722a2449a6d202678422222115406182676832.mYk-7fx7SArg0GTT8RhZVOqvlf--_HgAXY1hyIpP070
scenes-app-engineering-analytics-ci-explorer--overview--dark:
- hash: v1.k794b7964.5dfa7a3e5bf7314de5a6bf2fa1bd9b7181000fb538b77a8e7f4a06d16757e4b8.LEKZfQdDvbhVvZQK7uSeKO0R1lm9HCQpyXSjhKHkb28
+ hash: v1.k794b7964.e55c3845dd83185037fef7da5644c78de183c141d693103d56913f74784c164d.jzxFe3VyrN4lhfX637rmwZ6mxXosyvfcWgT3LZt3vPc
scenes-app-engineering-analytics-ci-explorer--overview--light:
hash: v1.k794b7964.754465b57e875b46d4b88facf2fbc60b7d36e5a560f5ccb990dcb0f5292b68b1.fIh6qm-tpvb9zbT6zDG6u7GyCsXt6axcPvwzVeRpPnQ
scenes-app-engineering-analytics-delivery-pipeline--all-stages--dark:
@@ -14438,10 +14402,6 @@ snapshots:
hash: v1.k794b7964.199bdfbeb1306a1136590674838b1ace855bdf727ed269fb303d6c9c3c8c13d3.ahpMr0R7FDPjv2mclgIztiqNOOUN5LcmTtFceGyAFRw
scenes-app-settings-user--settings-user-danger-zone--light:
hash: v1.k794b7964.aa21e966bebeddda6d5e572e2fbdd55c3700d74dccd9afca5124b099324dd6d7.27weAmO2tDo7xcy2EBk7B6i0Y5v4Z18ab5CQ1hKKHys
- scenes-app-settings-user--settings-user-navigation--dark:
- hash: v1.k794b7964.7f23332163fcd3a352302da3c51e030697e3cab6ce3fe6e3c733eb65b7bf3606.J2T_xVNaltRYkg89ufzsQfBX0ds2Dze5-KWi56HW-yM
- scenes-app-settings-user--settings-user-navigation--light:
- hash: v1.k794b7964.a9dd8af9b416c2d8a1c70913c7ea232609ea0c1fc9f779402d8de6a78ffb1b5d.9yi1ULCkJCmYLH3hyYurF9MvWWVxabq4mQIN2ImI99o
scenes-app-settings-user--settings-user-notifications--dark:
hash: v1.k794b7964.7ff881d5b3744cbe47fb402143301668b5fb624da10619a6b4c47eedf8c548b9.s75CAbF-SofJ_Af38F2iWb2VNc6XC73HtkIywqwqqHU
scenes-app-settings-user--settings-user-notifications--light:
@@ -14463,37 +14423,37 @@ snapshots:
scenes-app-settings-user--settings-user-reminders-modal--light:
hash: v1.k794b7964.c380a3a96ed2ad37cc6034993b714bb928f90324e0b5ca719be7577beb5a1aa7.BS9c-d0xxlqhEujX62hbuX4cWwwNVde5IlrlKxn6V-A
scenes-app-sidepanels--side-panel-access-control--dark:
- hash: v1.k794b7964.cde211ffacaa6094bdd1287c1518b614db47847807f8d0657fd2a17bed79bbc4.ZHgX_KskdNRu66iyKIFsK48AXBW2YgfbWKoR0QgJ_N4
+ hash: v1.k794b7964.d260eec9f61fba1a7a085c209102199c9cf9049328b1c1c3c29fbca33fcc1f07.ty8VuRHijfClENMg0QtYDAXkdtuXe5OZFWB2ftwDhKw
scenes-app-sidepanels--side-panel-access-control--light:
- hash: v1.k794b7964.fa0e2871bf7be5e76d6f57d18343ddf65c900c9b064025275608391e108eddb8.eDvUJ3XRZ063KQLbaqCtIxL-Wzveyp4ObaxsPh4NCds
+ hash: v1.k794b7964.426503c915a9ed0dcad0608bbb7cd06573989c4b2a9a512f12a7fb9262310386.NYphLFCGrmyjAvLeMyMrHU7QiKd6sE2kobmtx1vtBpo
scenes-app-sidepanels--side-panel-activity--dark:
- hash: v1.k794b7964.34660fdd8a13a962c61d1a70c83efeafb5506193fb66e55a52c3adb677c5e023.d_Hyz_dP-vWS1bMc42qUslBiaWAGudKNRXzpChCRtW8
+ hash: v1.k794b7964.9547519f91d50c8ea40093b5aa97875219024b7244444a6045e9d73cbbb23989.vi6aU92mFFkmLX8exl6O8QuO7IuW0s6a4zJxKv7-u2c
scenes-app-sidepanels--side-panel-activity--light:
- hash: v1.k794b7964.869e366f1f78c48d94168cb630269fc02413f305eb7894bd61cb7a5412bc0948.ar2nQN6oSk4m53MG0vKdRp7SGzmn01XkRTH1Us5YMfo
+ hash: v1.k794b7964.f3a00c709e6946919c01843e2719c576b205470004b85d3af55caee3e649725e.BG8hLTlUOW-vWrfGKKB8C36uq2PCSoAXRm3aDFC0QTY
scenes-app-sidepanels--side-panel-discussion--dark:
- hash: v1.k794b7964.9d7549b20c9ed5a5e40b774ced309d9a579130128ebb8b76bf30b87ad5ca30c9._m_XzZ5r6AM9eoAuooBRLKo5Y8BlOr9Dtly-hmM3ZTg
+ hash: v1.k794b7964.076644a6be1e0420f840212cfe178531ce55d8c7620be1a5e112c9c7d86c91de.713h2YnuVfj6I1RQaeyeRIvXP9SBK4tyqURnvt5BffE
scenes-app-sidepanels--side-panel-discussion--light:
- hash: v1.k794b7964.a62988fbf27d646f2fdd6ef7c0c1a954a9818de0c261450a7ea6cfb2b4f6ecde.A1hxA8jQNNCz_ajgIi2iV7XJRkJCO0f7KsLqVSGRU2U
+ hash: v1.k794b7964.4d6c996e9011752062679fe56c34f11199c733da5985441f751c4a467c6840c4.kylKOSHfn-dBqvaukBiMHn5LtbCTnaUAyRmXkY4L8dE
scenes-app-sidepanels--side-panel-exports--dark:
- hash: v1.k794b7964.8fa7aa72f3d6d4b7aeeee008d6e8fae5d494540aaa845650bfc4b2451684e4ba.3OdXP1Nl4BoO95kO_nR5p6Wh2fea57KykU6XXRQB3Qw
+ hash: v1.k794b7964.74ff17c316e5ea1c8c7b236476ebb98215a95c8a08ef1c9056f687a80aeab51e.1yKIYVrWOraHNJoS2mtbOWnPfpcCLWpecupy5LMcynI
scenes-app-sidepanels--side-panel-exports--light:
- hash: v1.k794b7964.918d3215cc5901ca73a755c93bcd746aacc38b77d7ea95e59733860d855386c4.wpKfFZagQI9V6_dTf_ONSqMldVTSttCAHQQsm734dJs
+ hash: v1.k794b7964.4fdc1c9aee75afdc96a6d737aec11b60b42c10325ea801ff4c0b82537f5e06d0.azd8MZYLuTjwICwFdVsgdnY3YPOXqqY0tvhUp5fItGg
scenes-app-sidepanels--side-panel-info--dark:
- hash: v1.k794b7964.23f3871d2a08f3d2c1d86506cad9e5ef5c61fe3cf63d99b54970221ce85b3e92.ooyWeLX1caf_SJbEuVVKGn9SbMh6T5tQIvq4HQpdOn4
+ hash: v1.k794b7964.aee9d6a9a6dcb50f55af641379fbc62c1243b1bc3533daa5365a73ba7d3bfcf1.0X-yeCk6Ooacu0FsgPeeAZvrj6zendqzGPr21_qtE0o
scenes-app-sidepanels--side-panel-info--light:
- hash: v1.k794b7964.7c91500a5f41b83e6d2961df7b3ffdfb616589ebf3dd14f6e1f6f5e698e85a20.5gaUtEn8goiAxCqTiokwWeb8vWn1IXdyyoIHIZjhHak
+ hash: v1.k794b7964.f82f1787dd9f3a222d20b068103b9f6e33f1a0e74ec694ed55a3f79f302fe701.PVPqEJUYH5dloPG9sGu7XS2pNE_JRWH5j7H_XlAxpmM
scenes-app-sidepanels--side-panel-max--dark:
- hash: v1.k794b7964.ff16988d4fb22f10d8f3271e7d1731b7aef494362723094600d0b960350a7782.47b2FlHiByqS3U3ScU05j1YswfK3ZnWfCnihjw6tM6g
+ hash: v1.k794b7964.96d0201fad9907ad2eac2f26762ca7211a615bd16eeaf37d9683db1394fda7e6.DxAHFslh2VmGbYrgkcBeB2RzTVuDbcIqp2lj-fbEdIs
scenes-app-sidepanels--side-panel-max--light:
- hash: v1.k794b7964.91cf2555ae4cffdd1ba1a90a7529d96d475b4b3e57702a6a7566f1cfeee6ddc7.W8ADP-FB4FsGzCAfK8XAGNDlv3Hva6v6lYlEdJLgZb4
+ hash: v1.k794b7964.e3c81ee5f0c02244f0b8bb85b88fe25d1fbbb71143543b154b62916db1320c05.cGRba6rNjTG1BqdFT7QJ9DsweXE0PJCwJmhAV3SrFa4
scenes-app-sidepanels--side-panel-notebooks--dark:
- hash: v1.k794b7964.d09af750ec686ef9be3f11a174297d38e54e64e01079362565a8b82982032a82.g9LaJxg483ewZIBefQ_Gce7DL6T7RNbzIkJafM5ZHu0
+ hash: v1.k794b7964.f8c192979e5a156fe045767ff48ac95100e1338aa0e6a1ba1f0ce73b3260573e.qnqLb88UfxTVuZaQn1TYTKa_bt9TXK8t1pXJa6hlqDk
scenes-app-sidepanels--side-panel-notebooks--light:
- hash: v1.k794b7964.78994c6dfde97cb3fa443230a4e2aa0053ea32e15beaa254cde6976b59a1a7e1.FSb1vF5Dk3dLdN0RF5sIdeYTBAO-UshC88tnBJiDtoY
+ hash: v1.k794b7964.124163ac66638db875968db7e2a5b03a4b905b4b9393e94c2245e55f9e0c19ce.DowGjlVTTf6-XnogxVpnRK__KJwljd7lzeQR-YBEc-o
scenes-app-sidepanels--side-panel-support--dark:
- hash: v1.k794b7964.a1d4f34402e18a5e7389f431dafeec3e929eeb49aa2f57a3ee31e30b0aab3d24.mj5wtEaAETRBBvjp2__uvauNOkWPs0WRuBiCm55tu0A
+ hash: v1.k794b7964.05d430059549ad1e6a8f9bf4d927e68588ecbc6cf47c07b88f953ff574ef09cd.J3i91P176siajAPtDF6AmjffKW9P0BvwHUzcVIebV3w
scenes-app-sidepanels--side-panel-support--light:
- hash: v1.k794b7964.da242d934624a8b7f8e992539f26569d84b2310d0ffa6e47574ed481a2df062f.BqtuyJYfWEFLJnU9yY770EIyD0xT1WxIrQ_BDMlQw8k
+ hash: v1.k794b7964.200f122ada2a370bc33a3ed9322c947742d37a207f0fd1b0becf29620e75dc3b.UYbFt7Mg9fJL1YvlRWlpODVoED5h49s9f_wZ13_H30o
scenes-app-signals-artefactloglist--check-lifecycle--dark:
hash: v1.k794b7964.19c992f77d56b064d5196570d7ed96b44b8b716ed149c79cee4992751ec2f11e.pQV4XQtKFXBQNrPKy95ZzZ6Q_RF7u8CDnqSF90tOXRQ
scenes-app-signals-artefactloglist--check-lifecycle--light:
@@ -14831,13 +14791,13 @@ snapshots:
scenes-app-terminal--dock-disabled--light:
hash: v1.k794b7964.891bf3ada6a624920719ba31575d24296fdbac96657776d322615600db7df3e0.xLoghAOv2AtP_GoCq7nc5noj4I6Vvz1PPtDpGFXbkOM
scenes-app-terminal--docked--dark:
- hash: v1.k794b7964.487b5ca8750693c3b977603f4878cd1f8afdcf1ba2d32985710f96e78562e53b.K-7DE__AN3egkFbusdj40Zr_R6b6_zOLUmUn17IYXzA
+ hash: v1.k794b7964.857a25d1839cd74aa758baab9b3d4ee70afda29aac47d744e8ca5e975a6d6fa4.zeemHfUZdpPTVeXBpCWUu8-HBK8iUx0A4vicBg6HmgI
scenes-app-terminal--docked--light:
- hash: v1.k794b7964.e86cd50d24bc426e47c8d761c8fb0cc4b600f935b3182db676035e8bb2fcd037.IIWpw3gniy9IIqdOG29xlKadFO3d-Au8a0eFCseZOOo
+ hash: v1.k794b7964.084a181e642c951177395b8ab49be211bae58ccb1f154a8068686b54044894de.6GDMN3WXaTtoto3mv58GvB32eII9xez2AjWtofKD8Mw
scenes-app-terminal--docked-wide--dark:
- hash: v1.k794b7964.5f2e682452ed1b8fa7aa5846e517a89aee3fb4f1329e8bbfff1f48c0bff848cd.IBuyEMhKNSXJgfcoiaSU3qKDF4QtGqRpKRxaSv-7mc8
+ hash: v1.k794b7964.275a1877c66aef1cd146ce7678b5e63bab12682fcc48a277d75d440ff512d6b5.oDkaekc8-avjE5aaC1OX75CNXoXY2Gn_9cPCP-yZpnY
scenes-app-terminal--docked-wide--light:
- hash: v1.k794b7964.fc8c109a8464dd378572e721227828d5f3ff2ed64e1009311650804a6384c4d5.G4YFt0Djj5ZokrnO9S8pA7WlZnag9npwjiMXBnxOizU
+ hash: v1.k794b7964.1a0dd35ba1875b0d17fa89de20ad546187bd93eaeb3eeb1f6981a0de5cfb83d9.kWPmIiK1HVBV5rlgn_wFNJ3QPXZv6UAwUvqbQJXsOE0
scenes-app-terminal--framebuffer--dark:
hash: v1.k794b7964.52141d09fbc4787a3bc750eccbd63b990ea4a4c0b764534626ff23fd4909e33b.rG8e19jjQlcoMWnS29Ty3UNZmH9al2gXoSPgJyki70E
scenes-app-terminal--framebuffer--light:
@@ -14907,13 +14867,13 @@ snapshots:
scenes-app-visual-review-run--tracking-only-merge-queue-run--light:
hash: v1.k794b7964.a3a1aaa87471fb8e9992f64e51be9a51aa12c9be25391f26e77bf3e591cbb4b5.OxPRm-RWdZ9Cyq9v2B8-XC0AF2OxDxyftKHtsMx0WZ0
scenes-app-web-analytics--web-analytics-dashboard--dark:
- hash: v1.k794b7964.d633e702e43e79c58f10610a823818f7d79717d49a670e6c85c6410d894b7d58.cegK9GTI0OfzEn0BkTrnAKcM5Q6u1KpT53hyljMVPBU
+ hash: v1.k794b7964.d522f198d74f8c9fbaf0c25c5176132ff75d30f64f20357e0849175250b9cb26.R7euJxX5kbwExzhw8hBK31rYk5LDRWU2qNOYgGe9qN4
scenes-app-web-analytics--web-analytics-dashboard--light:
- hash: v1.k794b7964.3fea77fc4a9a5e675d02ba2626a0f5dab9bcca49888d5eebedf81ecba1c11573.sPsSbpCHVz5-EIg3XhHBDJQZ2vLoUVIA9pZiHmn1CRk
+ hash: v1.k794b7964.befdbc519e3ff09485f0d4177536175e2b3aa1b39feffd51aca75005807402bd.GbnV7MrgWBUFA7L62Je-umrLfrLo6asS9XxBe-Iyb4w
scenes-app-web-analytics--web-analytics-dashboard-loading--dark:
- hash: v1.k794b7964.7631c17826109d6ea1be6fe1d8ad4b0d3d61c8977cbdf28ffa5602ffc0edaf04.M-zasXuYAmbo-PJzRo2iv6VXeSrsaUW85wwFfU2k0Oo
+ hash: v1.k794b7964.25e962900314737d523f1b0db48ac5a2743fcf2c24d9cd3edc5228da894d5a83.fuKDK8ZE7I_efYYfTe6xAj5tOREKE6yGEcunvIu8hBE
scenes-app-web-analytics--web-analytics-dashboard-loading--light:
- hash: v1.k794b7964.348c15c7348431008d2a1613528ca4568e43e58789788d04e9791e52e414240e.IqKTupL4PWq-BKsMSvreA_xZOFxYgpUu7NR88XeQYoQ
+ hash: v1.k794b7964.3dcd8e8c39b738b3ee6762427b2d5240d87181b10d817d5f66d7bad794736f7c.mnE8t8cm7RTS2fs-f3AqKpfAnCgv-iULQL_YQr72cGY
scenes-app-web-analytics--web-analytics-dashboard-narrow--dark:
hash: v1.k794b7964.a453e294b06044d2c1ccc56c1aa2f64812eeec41cc123cbb447f5e3d374f74a3.tyN50cGCbe5FOv1k5HK6SGRtFoSv7v9nZKOIs71Zerc
scenes-app-web-analytics--web-analytics-dashboard-narrow--light:
@@ -14923,9 +14883,9 @@ snapshots:
scenes-app-web-analytics--web-analytics-dashboard-tile-header-v-2-medium--light:
hash: v1.k794b7964.f8f97cc21497f54ec83588f3c7ad255a620bbed5ed87894b479da0ebf7b41f45.munrb5-Ht1Chj4LcLQdaiXO8PUo3ABYQkY01itaSL4c
scenes-app-web-analytics--web-analytics-dashboard-tile-header-v-2-wide--dark:
- hash: v1.k794b7964.672abc9ec1a595549ae1f386e04a96d71567a3f6a400da748bdc9931bc12ff28.kgDu_ryc9lqgI6ec9LAkIp79vr8FqYQBkg9MGDw1yVw
+ hash: v1.k794b7964.202120905466974d2e660b424a9a326867e403ca25e02913a5703ea0a939a570.1ufHz79zAxPhZjXRxdjH2kw86oHVDYwSSK2Uuxz6MAk
scenes-app-web-analytics--web-analytics-dashboard-tile-header-v-2-wide--light:
- hash: v1.k794b7964.4f9c946f04fbe48e34a8e29f827db78b2d9e752643c4595ce1e1f7bcbfa59582.MbbLIeBTOHsbFp7N5atc5AE7ohy3X8UQcJGKkzDMyno
+ hash: v1.k794b7964.a4376f46192f8b3e951b314a2393f6d404b66b618da433d7570b1b748b7ffaba.lUJtnxBClLx91IxAOnhtfZfYmJTVfqlBUhG1Sfyw1AQ
scenes-app-web-analytics--web-analytics-empty-onboarding-narrow--dark:
hash: v1.k794b7964.605caa854b816f8f47b5ef23cebca23dd5f2b516af151a7df08c9337663b3964.nHXW-vmDopWvz5x29U-iyNWGv9qxfOx64AqB8sykTpo
scenes-app-web-analytics--web-analytics-empty-onboarding-narrow--light:
@@ -14951,29 +14911,29 @@ snapshots:
scenes-app-web-analytics-achievements--weekly-only-arm--light:
hash: v1.k794b7964.eb042d165752cd9ff0145ee3b49f0769671244ca00e931c8ece93ec0d01a9a6f.YlQzVwE6qBKZs4cKyA1-lYowaxlhGEGt_K4jt076OSE
scenes-app-web-analytics-agent-analytics--agent-analytics-issue-detail--dark:
- hash: v1.k794b7964.79420572dc365f5b997e30b62aba48e23dd33a6b3102950d659e061f769c7801.PCRVaAefRYQYIpPCcYlnc8b4iKhVaesWiFTyTgPDqBE
+ hash: v1.k794b7964.1385ea619d530e707e9cec9e5b78e5767b1cb9999970d3104b3e9742a00d6cf3.zBK2CiWoetAZikENGHKaiC3y4AAHpGQlQODaQZYUw0o
scenes-app-web-analytics-agent-analytics--agent-analytics-issue-detail--light:
- hash: v1.k794b7964.9b8f80f0cc651b0ec1f315615b0ef8c5b47dd1556acfa08716a3470f869501bf.1w_blJ6pjkl-oUbmpS8E2iQ4fBmklhpHqFhFxprdv5Q
+ hash: v1.k794b7964.f0fbe8e4a0bc8b6d113410fcda0c7682bc923bf25899f6a01112eaec8ec7fd60.TtKE2CVFeXapDoxTGNc-G9HS_DYnOXWJS7mKuV42zmw
scenes-app-web-analytics-agent-analytics--agent-analytics-issues--dark:
- hash: v1.k794b7964.eb13895dffa25476bd1eed70a5877cf94381b969c9eb44bcf67a6f0d44ae1263.ZifLGlpXrtP7DLUwioyoCtGcSohVnCGJJToL9fJhqBE
+ hash: v1.k794b7964.53db8606145c6f8f7fe4e40a0e77368aec9f11c71de841dce9becf63b6490380.LBcPTDVunnGRGwmXbFOmxsyVBFskrEdSFkNeuhu8RJk
scenes-app-web-analytics-agent-analytics--agent-analytics-issues--light:
- hash: v1.k794b7964.4acf0572ce57348b47f6f169a085b954df3811ce3858424bfe5642e226f278db.OeEurnXKXiegWypEMMB9Nst8eqkKUGLcPZRa90HEZC0
+ hash: v1.k794b7964.64028e7db1ab8e7693080df1e421f68fd9fc43c5dfbfb5906fe8ebbd9f831dd6.MksxERY6_EjE2v7t2RvFq7yngjbXJiel4JYJc2eZYyM
scenes-app-web-analytics-agent-analytics--agent-analytics-journey-detail--dark:
- hash: v1.k794b7964.6d0c2b79d13364268ec02cc7e214cb68a25767c029d95929819ea8cc42f82490.4INEPuqOUr8BNsfG_qhtlxbjngNU3SZwFPJMk7tBt6c
+ hash: v1.k794b7964.045518647e2df4926cc510f096e37c98b0b3fb9cd7b36852301f4a0311b20be8.63UoMn-kOz39_WZUmdBPZEx5OFZ7NNG574S0Gdcy9Z0
scenes-app-web-analytics-agent-analytics--agent-analytics-journey-detail--light:
- hash: v1.k794b7964.ef647b4a0c9ce0912d5b417b28cf1c967ba184d2fba11b42bd4f8478d7d991d1.gtj-LVXfEMIoQM9W215G2_RUW0lVHxPsEv7ipWg6nng
+ hash: v1.k794b7964.a00489eb549d34bc8e2b7f686c04382bdad287a7d3f2bc828200a3c729edfd59.9ewRbyFnnhlXkl_fj1YPCzB63-UV9EkivsHcnUO2K8Q
scenes-app-web-analytics-agent-analytics--agent-analytics-journeys--dark:
- hash: v1.k794b7964.f7c6f79e3b126e58d43a8d07c5dbcc34e524f1934833eab1783219ae71173b4f.R1HQS845YmTn7zslALTYxMWSubsThe1Pn0zEvEYKCiw
+ hash: v1.k794b7964.fb1bb5bfb1ede2db4b2c43c3c221d7ca322f0a410db9b1834231729037eaa9b9.0JxMU1RG-K3bP3_54TulfRfCYisMYsyEdHOcWCIlkqU
scenes-app-web-analytics-agent-analytics--agent-analytics-journeys--light:
- hash: v1.k794b7964.ee64dfcbee5163f2c4c6aa02ee501fc20ed4c201dcfdd7419b5d5dfffc15ba9f.5IPlGMWsg1I5DDxtrRdRdfko5m7RYp5wrqivc6Y8NJ0
+ hash: v1.k794b7964.2d3c06d577194223f26a6060885c426a365fa0b5fbffe980f99597a5d07c3215.R78oU4fgbHpq9YqvbMmgMZ9hJEX6OuzL8z5AdFCZWq4
scenes-app-web-analytics-agent-analytics--agent-analytics-overview--dark:
- hash: v1.k794b7964.464d662d37cfa021dbc2bc37209582b735a92a9094b5bf1f038152a80665fcf7.f2m2NO1NC8DS4gAFvgDJGTUC_3OuQRcFC0y8U3f9-CI
+ hash: v1.k794b7964.0ad9fe058ef0270e2c720b25b1a369e067c86a943f2c4ef69f1e6f9d57014722.Qc-XbTDO5vRGkOWnGjwRa177RjpGv3wwqkTbXDbObDE
scenes-app-web-analytics-agent-analytics--agent-analytics-overview--light:
- hash: v1.k794b7964.d1d65210cb615139ff327577ba0809ff979bb12f62f7647e82e696b1e8c3b905.WTcF8O4Cv1e9Zuj4EtFrWKQTG7vkmyMtIBiSQFkW834
+ hash: v1.k794b7964.8f24574373be679d34e4e579833f72d3bd77bee71bb4f88e3976901faae40721.V-XJ-ECB1SnVFduS3lG0oBWoG_YBafJixPyKrHMXEuI
scenes-app-web-analytics-agent-analytics--agent-analytics-readiness--dark:
- hash: v1.k794b7964.b16a320bbd3daa2e72183f0c5a0d9d7d338b6aa079ba6317211240ebfa4ef480.mcV4a4NvToiPFGb7X_3V8cbZ2z6k-g9ysYGYrpOc2q8
+ hash: v1.k794b7964.bf32384b77429ad669bf7fe4d67162859cfd7e1ea8831348bda869ba724e641e.n0iHP25BaODsAl9sR23VLL7kl8DB1G995lZCjclSKFE
scenes-app-web-analytics-agent-analytics--agent-analytics-readiness--light:
- hash: v1.k794b7964.908ec798f1ad3be9a24ab75305c0d9906b2ba7d6dec72f565de48f23f721a61e.3mkria5lKDRRcoJ7qEJLXmQiLsoFCd8ksJWi7I3kB5Q
+ hash: v1.k794b7964.15cfb6e753384b2ec2ae2b8fe1de129506db1240578f3e497270b1029341ff67.eyGcF8J1UxcaL4a6JrJlBJb8qlPW3ortFjhzl7a2JWQ
scenes-app-web-analytics-livemetricscharts--bot-events-per-minute--dark:
hash: v1.k794b7964.933ca8aa37de16e55b07b9be45e8784e14b6a9aa8d7119882340e8858c5f9afd.FWPAiDTJNN-96zh7GPc5h6lH7TSlCDPeLmG0lk3YW1I
scenes-app-web-analytics-livemetricscharts--bot-events-per-minute--light:
@@ -15011,17 +14971,17 @@ snapshots:
scenes-app-web-analytics-pageperformancemetriccard--without-sparkline--light:
hash: v1.k794b7964.e7ebd4a413d617f5c6e38419027f3affa40cd1da68af95d686ccc152860dbb5b.Fq3Sz8vrvMYKZQk1yKdN-t5SvImO0L7rvFjFf0ZyfFc
scenes-app-web-analytics-search-ai--marketing-page-visibility--dark:
- hash: v1.k794b7964.6d33115ef459774bf5f109b755ba773cfda8bf09ea6ac41f9b2339cac2c2ed5c.PqiH4jQsEiQH_w85-TRPo82EP6k368_1fTaFou3jmj0
+ hash: v1.k794b7964.9d2a4328a633d99cd36f372075097876ee63442f26f6bd99989154fbead648a4.eDi62-RfC2Klyg6ka9LB3FWEqnWuV7_5eSdQ5sSlaPs
scenes-app-web-analytics-search-ai--marketing-page-visibility--light:
- hash: v1.k794b7964.d19622713bb48815acce2bdb61a8afbaac263d82da4089488cf02618992ed7bc.zuoGdz0tQ448fECemrW-CuH0ixoSES1SqXsKmYyb5qc
+ hash: v1.k794b7964.49d2b18381388fc172ec35ead6730dc7df25977f5e0d62ca61a56cc7090f9e60.0uC7NjwGA9p2v_ZB9ECxxxbiLvjZLaOFmNNWWbWhnC4
scenes-app-web-analytics-search-ai--web-analytics-page-performance--dark:
- hash: v1.k794b7964.61dd68cbd71ed32136c7744edcac87f8d481d61f942695a0beaac397a39ee860.m6CTbnHNOU_9FtzycJqx7D-PjxTN7l_ZnbRh6uJQ-VE
+ hash: v1.k794b7964.a1d227732d38e137de94f3d3ecd4bff68a157354afe9699d3fd6ae02f7e8c64c.2NMYhx_jnA8WQO_YQxseSzP8hHOKY8I-NOXbqjF_lKw
scenes-app-web-analytics-search-ai--web-analytics-page-performance--light:
- hash: v1.k794b7964.d2ef38611d98a7ec806d879839c53bd7f8ccae8a0aaf35ba6e2018179bd0f5aa.n4vXKUNB4Pd5oRkIs85ZsJpY9hRbpiSyln8vf6z2lr4
+ hash: v1.k794b7964.b90fb09495821098e81abed876ef05e9363ebdbe16f41a6ab64fee5a88260748.YBckKXZ5HLghiGTWmANW4w5q8JFxAw5Hz3hTQPoJQdU
scenes-app-web-analytics-search-ai--web-analytics-page-performance-no-ai-traffic--dark:
- hash: v1.k794b7964.0a0eceabe5ed4e327febf6d19e410bf65b945b1aa55fdd057acd2afd73195838.5-00NVrl3g5s8TpwBpJHDPayh5dtMZHs2A1yNpKmUCY
+ hash: v1.k794b7964.0aac0e8cbc130e5cdf4a4296f26c50f7824cad3d8d01246ca2ff0020eb823d1c.efDftUn0t-XHEPlgcx-uyOUc37AC8to7QWk8GcW557Y
scenes-app-web-analytics-search-ai--web-analytics-page-performance-no-ai-traffic--light:
- hash: v1.k794b7964.8650d3e8e89a0855cea0cbcf0a5f1c01e8fe79d9516bf1301af76658d4b7ce9a.EHuIy7ceogDlT8o8jvTdpAZX0ebR1pBqe-GaXT7brVY
+ hash: v1.k794b7964.140e24fbeeb98c6466629ee0171ac41b7632269a1dda267d44b7cbc31faa465b.hNouHLpKF6109lZ87zm6HBI8YG-M1Be8PoW11cdu9_Y
scenes-app-workflows-createaitaskconnectors--no-approved-tools--dark:
hash: v1.k794b7964.21192b03ef6f65ad46bd4fc88738669fc7b2902dcbce0db252a3d2417e10172b.lhKBZM-VPET3_AhQCAUubBUu7qAu8KlducA4WUsWhOM
scenes-app-workflows-createaitaskconnectors--no-approved-tools--light:
diff --git a/frontend/src/layout/GlobalModals.tsx b/frontend/src/layout/GlobalModals.tsx
index 90cdd24fd71a..276afb3eeb35 100644
--- a/frontend/src/layout/GlobalModals.tsx
+++ b/frontend/src/layout/GlobalModals.tsx
@@ -29,8 +29,6 @@ import { logsViewerModalLogic } from 'products/logs/frontend/components/LogsView
import { traceDialogLogic } from 'products/tracing/frontend/components/TraceDialog/traceDialogLogic'
import { globalModalsLogic } from './globalModalsLogic'
-import { navigationLogic } from './navigation/navigationLogic'
-import { ConfigureHomeModal } from './scenes/ConfigureHomeModal'
// The session player modal anchors the entire replay player graph; loading it only when a
// recording is opened keeps that graph out of the chunk every logged-in page downloads.
@@ -75,8 +73,6 @@ export function GlobalModals(): JSX.Element {
const { isInviteModalShown } = useValues(inviteLogic)
const { hideInviteModal } = useActions(inviteLogic)
const { superpowersEnabled } = useValues(superpowersLogic)
- const { isConfigureHomeModalOpen } = useValues(navigationLogic)
- const { hideConfigureHomeModal } = useActions(navigationLogic)
return (
<>
@@ -109,7 +105,6 @@ export function GlobalModals(): JSX.Element {
<LinkToModal />
<ItemSelectModal />
{superpowersEnabled && <SuperpowersModal />}
- <ConfigureHomeModal isOpen={isConfigureHomeModalOpen} onClose={hideConfigureHomeModal} />
<MaybeWelcomeDialog />
<MaybeProductPushWelcome />
<MaybePhaiOnboarding />
diff --git a/frontend/src/layout/navigation/navigationLogic.ts b/frontend/src/layout/navigation/navigationLogic.ts
index aa6d76e111e9..cda5ca32f0df 100644
--- a/frontend/src/layout/navigation/navigationLogic.ts
+++ b/frontend/src/layout/navigation/navigationLogic.ts
@@ -1,42 +1,18 @@
-import { MakeLogicType, actions, kea, path, reducers } from 'kea'
+import { MakeLogicType, kea, path } from 'kea'
import { windowValues } from 'kea-window-values'
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface navigationLogicValues {
fullscreen: boolean
- isConfigureHomeModalOpen: boolean
mobileLayout: boolean
}
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface navigationLogicActions {
- hideConfigureHomeModal: () => {
- value: true
- }
- showConfigureHomeModal: () => {
- value: true
- }
-}
-
-export type navigationLogicType = MakeLogicType<navigationLogicValues, navigationLogicActions>
+export type navigationLogicType = MakeLogicType<navigationLogicValues, {}>
export const navigationLogic = kea<navigationLogicType>([
path(['layout', 'navigation', 'navigationLogic']),
- actions({
- showConfigureHomeModal: true,
- hideConfigureHomeModal: true,
- }),
windowValues(() => ({
fullscreen: (window: Window) => !!window.document.fullscreenElement,
mobileLayout: (window: Window) => window.innerWidth < 992, // Sync width threshold with Sass variable $lg!
})),
- reducers({
- isConfigureHomeModalOpen: [
- false,
- {
- showConfigureHomeModal: () => true,
- hideConfigureHomeModal: () => false,
- },
- ],
- }),
])
diff --git a/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.stories.tsx b/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.stories.tsx
deleted file mode 100644
index 151047a36e60..000000000000
--- a/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.stories.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import type { Meta, StoryObj } from '@storybook/react'
-
-import { FEATURE_FLAGS } from 'lib/constants'
-
-import { ProjectTree, ProjectTreeProps } from './ProjectTree'
-
-type StoryProps = ProjectTreeProps & {
- enableCustomProductsFlag?: boolean
-}
-
-type Story = StoryObj<(props: StoryProps) => JSX.Element>
-
-const meta: Meta<(props: StoryProps) => JSX.Element> = {
- title: 'Layout/Project Tree',
- parameters: {
- layout: 'padded',
- viewMode: 'story',
- featureFlags: [
- FEATURE_FLAGS.CUSTOMER_ANALYTICS,
- FEATURE_FLAGS.DATA_WAREHOUSE_SCENE,
- FEATURE_FLAGS.WEB_ANALYTICS_MARKETING,
- FEATURE_FLAGS.PRODUCT_TOURS,
- ],
- },
- render: (props: StoryProps) => {
- return (
- <div className="w-[280px] h-[600px] border rounded bg-surface-primary overflow-hidden">
- <div className="p-2 border-b text-sm font-semibold text-secondary">Custom Products Sidebar</div>
- <div className="h-[calc(100%-40px)] overflow-auto group/colorful-product-icons colorful-product-icons-true">
- <ProjectTree root="custom-products://" onlyTree {...props} />
- </div>
- </div>
- )
- },
-}
-
-export default meta
-
-export const Default: Story = {
- args: {},
-}
-
-// Story with narrow size (collapsed nav)
-export const NarrowSize: Story = {
- args: {
- enableCustomProductsFlag: true,
- treeSize: 'narrow',
- },
-}
-
-// Story showing the products sidebar (non-custom)
-export const AllProducts: Story = {
- render: () => {
- return (
- <div className="w-[280px] h-[600px] border rounded bg-surface-primary overflow-hidden">
- <div className="p-2 border-b text-sm font-semibold text-secondary">All Products Sidebar</div>
- <div className="h-[calc(100%-40px)] overflow-auto group/colorful-product-icons colorful-product-icons-true">
- <ProjectTree root="products://" onlyTree />
- </div>
- </div>
- )
- },
-}
diff --git a/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsx b/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsx
index 8e8cbce27af7..58364a92f080 100644
--- a/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsx
+++ b/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsx
@@ -18,13 +18,7 @@ import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableSh
import { dayjs } from 'lib/dayjs'
import { useLocalStorage } from 'lib/hooks/useLocalStorage'
import { LemonTag } from 'lib/lemon-ui/LemonTag'
-import {
- LemonTree,
- LemonTreeRef,
- LemonTreeSelectMode,
- LemonTreeSize,
- TreeDataItem,
-} from 'lib/lemon-ui/LemonTree/LemonTree'
+import { LemonTree, LemonTreeRef, LemonTreeSize, TreeDataItem } from 'lib/lemon-ui/LemonTree/LemonTree'
import { TreeNodeDisplayIcon } from 'lib/lemon-ui/LemonTree/LemonTreeUtils'
import { ProfilePicture } from 'lib/lemon-ui/ProfilePicture/ProfilePicture'
import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
@@ -69,12 +63,6 @@ interface ProjectTreeBaseProps {
searchPlaceholder?: string
treeSize?: LemonTreeSize
disableScroll?: boolean
- /** Override the select mode from the internal logic */
- selectModeOverride?: LemonTreeSelectMode
- /** Override the checked items from the internal logic */
- checkedItemsOverride?: Record<string, boolean>
- /** Override the onItemChecked handler from the internal logic */
- onItemCheckedOverride?: (id: string, checked: boolean) => void
/**
* Runs in addition to the tree's own click handling, not instead of it. A caller that renders
* the tree inside a larger surface uses this to report the click in that surface's own terms.
@@ -113,9 +101,6 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
searchPlaceholder,
treeSize = 'default',
showRecents,
- selectModeOverride,
- checkedItemsOverride,
- onItemCheckedOverride,
onItemClicked,
isActiveInPanel,
} = props
@@ -137,7 +122,7 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
scrollTargetId,
editingItemId,
sortMethod: projectSortMethod,
- selectMode: projectTreeSelectMode,
+ selectMode,
sortMethod,
} = useValues(projectTreeLogic(projectTreeLogicProps))
const {
@@ -149,7 +134,7 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
setExpandedFolders,
setExpandedSearchFolders,
loadFolder,
- onItemChecked: projectTreeOnItemChecked,
+ onItemChecked,
moveCheckedItems,
clearScrollTarget,
setEditingItemId,
@@ -157,9 +142,6 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
setSelectMode,
} = useActions(projectTreeLogic(projectTreeLogicProps))
- const selectMode = selectModeOverride ?? projectTreeSelectMode
- const onItemChecked = onItemCheckedOverride ?? projectTreeOnItemChecked
-
const { resetPanelLayout } = useActions(panelLayoutLogic)
const { mainContentRef } = useValues(panelLayoutLogic)
const treeRef = useRef<LemonTreeRef>(null)
@@ -173,18 +155,7 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
const showFilterDropdown = root === 'project://'
const showSortMenuItems = root === 'project://'
- let treeData: TreeDataItem[] = withHomeFolderEmptyState([...fullFileSystemFiltered], currentHomeFolder)
-
- // Apply checked items override for external control (e.g. product selection)
- if (checkedItemsOverride) {
- const applyChecked = (items: TreeDataItem[]): TreeDataItem[] =>
- items.map((item) => ({
- ...item,
- checked: checkedItemsOverride[item.id] ?? false,
- children: item.children ? applyChecked(item.children) : undefined,
- }))
- treeData = applyChecked(treeData)
- }
+ const treeData: TreeDataItem[] = withHomeFolderEmptyState([...fullFileSystemFiltered], currentHomeFolder)
if (fullFileSystemFiltered.length <= 5) {
if (
@@ -452,9 +423,7 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
}
const showDropdownMenu =
- root === 'products://' ||
- root === 'custom-products://' ||
- (root === 'shortcuts://' && !!getSidebarProduct(item.record?.href))
+ root === 'products://' || (root === 'shortcuts://' && !!getSidebarProduct(item.record?.href))
const menuButtonIcon = showDropdownMenu ? PRODUCT_MENU_BUTTON_ICONS[item.name] : undefined
if (menuButtonIcon) {
@@ -492,12 +461,7 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
}
const nameNode: JSX.Element = <span className="font-semibold">{item.displayName}</span>
- if (
- root === 'products://' ||
- root === 'data://' ||
- root === 'persons://' ||
- root === 'custom-products://'
- ) {
+ if (root === 'products://' || root === 'data://' || root === 'persons://') {
const key = item.record?.sceneKey
return (
@@ -523,7 +487,7 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
return <>Create a new {nameNode}</>
}
- if (root === 'data-and-people://' || root === 'project://' || root === 'shortcuts://') {
+ if (root === 'project://' || root === 'shortcuts://') {
const key = item.record?.sceneKey
const description = sceneConfigurations[key]?.description
if (description) {
@@ -558,7 +522,6 @@ export function ProjectTree(props: ProjectTreeProps): JSX.Element {
}
// A shortcut's created_at is when it was starred, not when the item was created.
const isNew =
- root !== 'custom-products://' &&
root !== 'shortcuts://' &&
item.record?.created_at &&
dayjs().diff(dayjs(item.record?.created_at), 'minutes') < 3
diff --git a/frontend/src/layout/panel-layout/ProjectTree/defaultTree.tsx b/frontend/src/layout/panel-layout/ProjectTree/defaultTree.tsx
index 49dd54b6c856..a3b962edebb0 100644
--- a/frontend/src/layout/panel-layout/ProjectTree/defaultTree.tsx
+++ b/frontend/src/layout/panel-layout/ProjectTree/defaultTree.tsx
@@ -645,11 +645,6 @@ export function withProductShortcutHref(entry: FileSystemEntry): FileSystemEntry
export const getDefaultTreeGames = (): FileSystemImport[] =>
[...getTreeItemsGames()].sort((a, b) => a.path.localeCompare(b.path, undefined, { sensitivity: 'accent' }))
-export const getDefaultTreeDataAndPeople = (): FileSystemImport[] =>
- [...getDefaultTreeData(), ...getDefaultTreePersons()].sort((a, b) =>
- a.path.localeCompare(b.path, undefined, { sensitivity: 'accent' })
- )
-
export const getDefaultTreePersons = (): FileSystemImport[] => [
{
path: 'Persons',
diff --git a/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.test.tsx b/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.test.tsx
index 2e5a3270bc5f..9a8e5d867ff2 100644
--- a/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.test.tsx
+++ b/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.test.tsx
@@ -19,7 +19,6 @@ describe('MenuItems', () => {
beforeEach(() => {
initKeaTests()
- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.SIMPLE_SIDEPANEL], {})
jest.spyOn(api.fileSystem, 'list').mockResolvedValue({ count: 0, results: [], users: [] })
jest.spyOn(api.fileSystem, 'unfiled').mockResolvedValue(null)
jest.spyOn(api.fileSystemShortcuts, 'list').mockResolvedValue({ count: 0, results: [] })
diff --git a/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsx b/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsx
index fe86a0cf61e8..b33f30c76305 100644
--- a/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsx
+++ b/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsx
@@ -15,7 +15,6 @@ import {
import { linkToLogic } from 'lib/components/FileSystem/LinkTo/linkToLogic'
import { moveToLogic } from 'lib/components/FileSystem/MoveTo/moveToLogic'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { TreeDataItem } from 'lib/lemon-ui/LemonTree/LemonTree'
import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
import {
@@ -44,7 +43,6 @@ import { FileSystemEntry } from '~/queries/schema/schema-general'
import { NewMenu } from '../../menus/NewMenu'
import { panelLayoutLogic } from '../../panelLayoutLogic'
-import { customProductsLogic } from '../customProductsLogic'
import { getSidebarProduct } from '../defaultTree'
import { projectTreeDataLogic } from '../projectTreeDataLogic'
import { projectTreeLogic } from '../projectTreeLogic'
@@ -76,12 +74,10 @@ export function MenuItems({
showSelectMenuOption = true,
}: MenuItemsProps): JSX.Element {
const [uniqueKey] = useState(() => `project-tree-${counter++}`)
- const { shortcutNonFolderPaths, shortcutData, shortcutEntryIdMap, shortcutDataLoading } =
- useValues(projectTreeDataLogic)
+ const { shortcutData, shortcutEntryIdMap, shortcutDataLoading } = useValues(projectTreeDataLogic)
const { deleteShortcut, addShortcutItem } = useActions(projectTreeDataLogic)
const { groupTypes } = useValues(groupAnalyticsConfigLogic)
const { deleteGroupType } = useActions(groupAnalyticsConfigLogic)
- const { enabledProductPaths: customProductsSelectedPaths } = useValues(customProductsLogic)
const { dockOpen, terminalEnabled } = useValues(terminalDockLogic)
const { openInTerminal } = useActions(terminalDockLogic)
const { location } = useValues(router)
@@ -103,7 +99,6 @@ export function MenuItems({
} = useActions(projectTreeLogic(projectTreeLogicProps))
const { openMoveToModal } = useActions(moveToLogic)
const { openLinkToModal } = useActions(linkToLogic)
- const { setProductEnabled } = useActions(customProductsLogic)
const { resetPanelLayout } = useActions(panelLayoutLogic)
@@ -120,9 +115,7 @@ export function MenuItems({
// Show product menu items if the item is a product, or a starred link to one
const showProductMenuItems =
- root === 'products://' ||
- root === 'custom-products://' ||
- (root === 'shortcuts://' && !!getSidebarProduct(item.record?.href))
+ root === 'products://' || (root === 'shortcuts://' && !!getSidebarProduct(item.record?.href))
// Note: renderMenuItems() is called often, so we're using custom components to isolate logic and network requests
const productMenu =
@@ -164,7 +157,6 @@ export function MenuItems({
</>
) : null
- const isSimpleSidepanelEnabled = useFeatureFlag('SIMPLE_SIDEPANEL')
const isItemAFolder = item.record?.type === 'folder'
const isStarredFolder = isItemAFolder && item.id.startsWith('shortcuts://') && !!item.record?.ref
const newMenuItem = isStarredFolder ? { ...item, record: { ...item.record, path: item.record?.ref } } : item
@@ -176,7 +168,6 @@ export function MenuItems({
(root === 'project://' || item.record?.protocol === 'project://' || isStarredFolder) &&
typeof terminalFolder === 'string'
const itemShortcutPath = joinPath([splitPath(item.record?.path).pop() ?? 'Unnamed'])
- const isItemAlreadyInShortcut = !isItemAFolder && shortcutNonFolderPaths.has(itemShortcutPath)
const shortcutId =
shortcutEntryIdMap.get(item.id) ??
shortcutData.find((entry) =>
@@ -232,7 +223,6 @@ export function MenuItems({
MenuItem={MenuItem}
resetPanelLayout={resetPanelLayout}
/>
- {!isSimpleSidepanelEnabled && <MenuSeparator />}
</>
) : null}
@@ -289,71 +279,6 @@ export function MenuItems({
<MenuSeparator />
</>
) : null}
- {!isSimpleSidepanelEnabled && item.record?.path ? (
- (root === 'shortcuts://' || root === 'custom-products://') &&
- (item.id.startsWith('shortcuts://') || item.id.startsWith('shortcuts/')) ? (
- <MenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- if (item.record) {
- deleteShortcut(item.record?.id)
- }
- }}
- data-attr="tree-item-menu-remove-from-shortcuts-button"
- >
- <ButtonPrimitive menuItem variant="danger" forceVariant>
- <IconStar className="size-4 text-inherit" /> Remove from starred
- </ButtonPrimitive>
- </MenuItem>
- ) : isItemAlreadyInShortcut ? (
- <MenuItem asChild disabled={true} data-attr="tree-item-menu-add-to-shortcuts-disabled-button">
- <ButtonPrimitive menuItem disabled={true}>
- <IconStar className="size-4 text-tertiary" /> Already starred
- </ButtonPrimitive>
- </MenuItem>
- ) : root !== 'custom-products://' ? (
- <MenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- if (item.record) {
- addShortcutItem(item.record as FileSystemEntry)
- }
- }}
- data-attr="tree-item-menu-add-to-shortcuts-button"
- >
- <ButtonPrimitive menuItem>
- <IconStar className="size-4 text-tertiary" /> Add to starred
- </ButtonPrimitive>
- </MenuItem>
- ) : null
- ) : null}
-
- {root === 'custom-products://' && !item.id.startsWith('shortcuts://') ? (
- <MenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- setProductEnabled(item.record!.path as string, false)
- }}
- >
- <ButtonPrimitive menuItem>Remove from sidebar panel</ButtonPrimitive>
- </MenuItem>
- ) : root === 'products://' &&
- item.record?.path &&
- !customProductsSelectedPaths.has(item.record?.path as string) ? (
- <MenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- setProductEnabled(item.record!.path as string, true)
- }}
- >
- <ButtonPrimitive menuItem>Add to sidebar panel</ButtonPrimitive>
- </MenuItem>
- ) : null}
-
{item.id.startsWith('project/') || item.id.startsWith('project://') ? (
<MenuItem
asChild
@@ -503,7 +428,7 @@ export function MenuItems({
<ButtonPrimitive menuItem>Delete group type</ButtonPrimitive>
</MenuItem>
) : null}
- {isSimpleSidepanelEnabled && item.record?.path && (shortcutId || root !== 'custom-products://') ? (
+ {item.record?.path ? (
<>
{(!isItemAFolder || !shortcutEntryIdMap.has(item.id) || checkedItemCountNumeric > 0) && (
<MenuSeparator />
diff --git a/frontend/src/layout/panel-layout/ProjectTree/menus/RecentItemsMenu.tsx b/frontend/src/layout/panel-layout/ProjectTree/menus/RecentItemsMenu.tsx
deleted file mode 100644
index 6e4b502a573f..000000000000
--- a/frontend/src/layout/panel-layout/ProjectTree/menus/RecentItemsMenu.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import { useValues } from 'kea'
-import { useState } from 'react'
-
-import { IconClock } from '@posthog/icons'
-import { Link } from '@posthog/lemon-ui'
-
-import { KeyboardShortcut } from 'lib/components/KeyboardShortcut/KeyboardShortcut'
-import { keybindToKeyboardShortcutProps } from 'lib/components/Shortcuts/Shortcut'
-import { keyBinds } from 'lib/components/Shortcuts/shortcuts'
-import { useShortcut } from 'lib/components/Shortcuts/useShortcut'
-import { Spinner } from 'lib/lemon-ui/Spinner/Spinner'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuGroup,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuTrigger,
-} from 'lib/ui/DropdownMenu/DropdownMenu'
-import { MenuSeparator } from 'lib/ui/Menus/Menus'
-
-import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { splitPath, unescapePath } from '~/layout/panel-layout/ProjectTree/utils'
-import { FileSystemEntry, FileSystemIconType } from '~/queries/schema/schema-general'
-
-import { recentItemsMenuLogic } from './recentItemsMenuLogic'
-
-const getItemName = (item: FileSystemEntry): string => {
- const pathSplit = splitPath(item.path)
- const lastPart = pathSplit.pop()
- return unescapePath(lastPart ?? item.path)
-}
-
-export function RecentItemsMenu(): JSX.Element {
- const { recentItems, recentItemsLoading } = useValues(recentItemsMenuLogic)
- const [isOpen, setIsOpen] = useState(false)
-
- const handleOpenChange = (open: boolean): void => {
- setIsOpen(open)
- }
-
- useShortcut({
- name: 'recent-items-menu',
- keybind: [keyBinds.recentItems],
- intent: 'Open recent items menu',
- interaction: 'function',
- callback: () => setIsOpen(true),
- })
-
- return (
- <DropdownMenu open={isOpen} onOpenChange={handleOpenChange}>
- <DropdownMenuTrigger asChild>
- <ButtonPrimitive
- iconOnly
- size="sm"
- tooltip={
- <>
- Open recent items menu{' '}
- <KeyboardShortcut
- {...keybindToKeyboardShortcutProps(keyBinds.recentItems)}
- className="relative text-xs -top-px"
- />
- </>
- }
- tooltipPlacement="bottom"
- tooltipCloseDelayMs={0}
- data-attr="recent-items-menu-trigger"
- >
- <IconClock className="size-4 text-tertiary" />
- </ButtonPrimitive>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="start" side="bottom" className="min-w-[200px] max-w-[300px]">
- <DropdownMenuGroup>
- <DropdownMenuLabel>Recent items</DropdownMenuLabel>
- <MenuSeparator />
- {recentItemsLoading ? (
- <DropdownMenuItem disabled>
- <ButtonPrimitive menuItem>
- <Spinner className="size-4" />
- <span className="ml-2">Loading...</span>
- </ButtonPrimitive>
- </DropdownMenuItem>
- ) : recentItems.length === 0 ? (
- <DropdownMenuItem disabled>
- <ButtonPrimitive menuItem>No recent items</ButtonPrimitive>
- </DropdownMenuItem>
- ) : (
- recentItems.map((item: FileSystemEntry) => (
- <DropdownMenuItem key={item.id} asChild>
- <Link
- buttonProps={{
- menuItem: true,
- }}
- to={item.href}
- data-attr={`recent-item-${item.id}`}
- >
- {iconForType(item.type as FileSystemIconType)}
- <span className="ml-2 truncate">{getItemName(item)}</span>
- </Link>
- </DropdownMenuItem>
- ))
- )}
- </DropdownMenuGroup>
- </DropdownMenuContent>
- </DropdownMenu>
- )
-}
diff --git a/frontend/src/layout/panel-layout/ProjectTree/menus/recentItemsMenuLogic.ts b/frontend/src/layout/panel-layout/ProjectTree/menus/recentItemsMenuLogic.ts
deleted file mode 100644
index 9f15e28e00dc..000000000000
--- a/frontend/src/layout/panel-layout/ProjectTree/menus/recentItemsMenuLogic.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { MakeLogicType, connect, kea, path, selectors } from 'kea'
-
-import { recentItemsModel } from '~/models/recentItemsModel'
-import { FileSystemEntry } from '~/queries/schema/schema-general'
-
-const RECENT_ITEMS_LIMIT = 10
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface recentItemsMenuLogicValues {
- cachedRecents: FileSystemEntry[] // recentItemsModel
- recentsHasLoaded: boolean // recentItemsModel
- recentItems: FileSystemEntry[]
- recentItemsLoading: boolean
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface recentItemsMenuLogicMeta {
- __keaTypeGenInternalSelectorTypes: {
- recentItems: (cachedRecents: FileSystemEntry[]) => FileSystemEntry[]
- recentItemsLoading: (recentsHasLoaded: boolean) => boolean
- }
-}
-
-export type recentItemsMenuLogicType = MakeLogicType<
- recentItemsMenuLogicValues,
- {},
- Record<string, any>,
- recentItemsMenuLogicMeta
->
-
-export const recentItemsMenuLogic = kea<recentItemsMenuLogicType>([
- path(['layout', 'panel-layout', 'ProjectTree', 'menus', 'recentItemsMenuLogic']),
- connect(() => ({
- values: [recentItemsModel, ['recents as cachedRecents', 'recentsHasLoaded']],
- })),
- selectors({
- recentItems: [
- (s) => [s.cachedRecents],
- (cachedRecents: FileSystemEntry[]): FileSystemEntry[] => cachedRecents.slice(0, RECENT_ITEMS_LIMIT),
- ],
- recentItemsLoading: [(s) => [s.recentsHasLoaded], (recentsHasLoaded: boolean): boolean => !recentsHasLoaded],
- }),
-])
diff --git a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.test.ts b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.test.ts
index 5c78138be1e2..0869f46436de 100644
--- a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.test.ts
+++ b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.test.ts
@@ -13,7 +13,6 @@ import { useMocks } from '~/mocks/jest'
import { initKeaTests } from '~/test/init'
import { panelLayoutLogic } from '../panelLayoutLogic'
-import { customProductsLogic } from './customProductsLogic'
import { MovedItem, projectTreeDataLogic } from './projectTreeDataLogic'
import { projectTreeLogic } from './projectTreeLogic'
@@ -44,22 +43,9 @@ describe('projectTreeDataLogic', () => {
jest.restoreAllMocks()
})
- it('initializes the home folder once when the sidebar flag arrives after mount', async () => {
- const initialize = jest.fn(() => [200, { id: 'home', path: 'Users/Alex' }])
- useMocks({ post: { '/api/projects/:team_id/file_system/home_folder/': initialize } })
- expect(logic.values.homeFolder).toBeNull()
- await expectLogic(logic, () => {
- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.SIMPLE_SIDEPANEL], {
- [FEATURE_FLAGS.SIMPLE_SIDEPANEL]: true,
- })
- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.SIMPLE_SIDEPANEL], {
- [FEATURE_FLAGS.SIMPLE_SIDEPANEL]: true,
- })
- }).toDispatchActions(['loadHomeFolderSuccess'])
- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.SIMPLE_SIDEPANEL], {
- [FEATURE_FLAGS.SIMPLE_SIDEPANEL]: true,
- })
- expect(initialize).toHaveBeenCalledTimes(1)
+ it('follows the home folder after it moves', async () => {
+ useMocks({ post: { '/api/projects/:team_id/file_system/home_folder/': { id: 'home', path: 'Users/Alex' } } })
+ await expectLogic(logic, () => logic.actions.loadHomeFolder()).toDispatchActions(['loadHomeFolderSuccess'])
expect(logic.values.currentHomeFolder).toEqual({ id: 'home', path: 'Users/Alex' })
logic.actions.loadFolderSuccess(
'Research',
@@ -174,22 +160,6 @@ describe('projectTreeDataLogic', () => {
projectTree.unmount()
})
- it('shows only the products the user added, with nothing injected alongside them', () => {
- customProductsLogic.actions.loadCustomProductsSuccess([
- {
- id: 'abc',
- product_path: 'Session replay',
- enabled: true,
- created_at: '2026-01-01T00:00:00Z',
- updated_at: '2026-01-01T00:00:00Z',
- },
- ])
-
- const paths = logic.values.getCustomProductTreeItems('').map((item) => item.record?.path)
-
- expect(paths).toEqual(['Session replay'])
- })
-
it('shows Warehouse properties in Data when its persisted feature flag is enabled', () => {
featureFlagLogic.actions.setFeatureFlags([], { [FEATURE_FLAGS.WAREHOUSE_PERSON_PROPERTIES]: false })
@@ -312,7 +282,7 @@ describe('projectTreeDataLogic', () => {
expect(api.fileSystem.list).toHaveBeenCalledWith({ type: 'insight', ref: 'insight1' })
currentItem.mockReturnValue({ type: 'insight', ref: 'insight2' })
await expectLogic(consumer, () =>
- panelLayoutLogic.actions.setActivePanelIdentifier('Products')
+ panelLayoutLogic.actions.setActivePanelIdentifier('Notifications')
).toFinishAllListeners()
expect(api.fileSystem.list).toHaveBeenCalledWith({ type: 'insight', ref: 'insight2' })
consumer.unmount()
@@ -348,7 +318,7 @@ describe('projectTreeDataLogic', () => {
currentItem.mockReturnValue({ type: 'insight', ref: 'insight2' })
await expectLogic(projectTree, () => {
- panelLayoutLogic.actions.setActivePanelIdentifier('Products')
+ panelLayoutLogic.actions.setActivePanelIdentifier('Notifications')
}).toFinishAllListeners()
expect(api.fileSystem.list).not.toHaveBeenCalledWith(expect.objectContaining({ parent: 'Reports' }))
expect(api.fileSystem.list).not.toHaveBeenCalledWith(expect.objectContaining({ ref: 'insight2' }))
diff --git a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx
index a55933222ecb..554cda33f07b 100644
--- a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx
+++ b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx
@@ -27,7 +27,6 @@ import { FileSystemHomeFolderApi } from '~/generated/core/api.schemas'
import { breadcrumbsLogic } from '~/layout/navigation/Breadcrumbs/breadcrumbsLogic'
import {
getDefaultTreeData,
- getDefaultTreeDataAndPeople,
getDefaultTreeNew,
getDefaultTreePersons,
getDefaultTreeProducts,
@@ -58,9 +57,7 @@ import { UserBasicType } from '~/types'
import type { FeatureFlagsSet } from '../../../lib/logic/featureFlagLogic'
import type { Noun } from '../../../models/groupsModel'
-import type { UserProductListItem } from '../../../queries/schema/schema-general'
import type { GroupType, GroupTypeIndex, ProjectTreeRef, UserType } from '../../../types'
-import { customProductsLogic } from './customProductsLogic'
const MOVE_ALERT_LIMIT = 50
const DELETE_ALERT_LIMIT = 0
@@ -202,7 +199,6 @@ const humanizeFileSystemEntryType = (type?: string): string => {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface projectTreeDataLogicValues {
projectTreeRef: ProjectTreeRef | null // breadcrumbsLogic
- customProducts: UserProductListItem[] // customProductsLogic
featureFlags: FeatureFlagsSet // featureFlagLogic
aggregationLabel: (groupTypeIndex: number | null | undefined, deferToUserWording?: boolean) => Noun // groupsModel
groupTypes: Map<GroupTypeIndex, GroupType> // groupsModel
@@ -213,12 +209,10 @@ export interface projectTreeDataLogicValues {
folderLoadOffset: Record<string, number>
folderStates: Record<string, FolderState>
folders: Record<string, FileSystemEntry[]>
- getCustomProductTreeItems: (searchTerm: string) => TreeDataItem[]
getShortcutTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[]
getStaticTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[]
groupItems: FileSystemImport[]
homeFolder: FileSystemHomeFolderApi | null
- homeFolderLoaded: boolean
homeFolderLoading: boolean
itemsByHref: Record<string, FileSystemEntry>
itemsByPath: Record<string, FileSystemEntry>
@@ -252,13 +246,6 @@ export interface projectTreeDataLogicValues {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface projectTreeDataLogicActions {
- setFeatureFlags: (
- flags: string[],
- variants: Record<string, boolean | string>
- ) => {
- flags: string[]
- variants: Record<string, boolean | string>
- } // featureFlagLogic
locationChanged: ({
method,
pathname,
@@ -634,12 +621,6 @@ export interface projectTreeDataLogicMeta {
getStaticTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[]
) => TreeDataItem[]
shortcutNonFolderPaths: (shortcutData: FileSystemEntry[]) => Set<string>
- getCustomProductTreeItems: (
- customProducts: UserProductListItem[],
- featureFlags: FeatureFlagsSet,
- folderStates: Record<string, FolderState>,
- users: Record<string, UserBasicType>
- ) => (searchTerm: string) => TreeDataItem[]
}
}
@@ -660,12 +641,10 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([
['projectTreeRef'],
groupsModel,
['aggregationLabel', 'groupTypes', 'groupTypesLoading', 'groupsAccessStatus'],
- customProductsLogic,
- ['customProducts'],
userLogic,
['user'],
],
- actions: [featureFlagLogic, ['setFeatureFlags'], router, ['locationChanged']],
+ actions: [router, ['locationChanged']],
})),
actions({
setStarredNavigationRef: (ref: ProjectTreeRef | null, href?: string) => ({ ref, href }),
@@ -1116,7 +1095,6 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([
state?.pathname === removeProjectIdIfPresent(pathname) ? state : null,
},
],
- homeFolderLoaded: [false, { loadHomeFolderSuccess: () => true }],
folders: [
{} as Record<string, FileSystemEntry[]>,
{
@@ -1709,7 +1687,6 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([
['products://', getDefaultTreeProducts()],
['data://', getDefaultTreeData()],
['persons://', [...getDefaultTreePersons(), ...groupItems]],
- ['data-and-people://', [...getDefaultTreeDataAndPeople(), ...groupItems]],
['new://', getDefaultTreeNew()],
]
const staticItems = data.map(([protocol, files]) => ({
@@ -1740,66 +1717,6 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([
(shortcutData: FileSystemEntry[]) =>
new Set(shortcutData.filter((shortcut) => shortcut.type !== 'folder').map((shortcut) => shortcut.path)),
],
- getCustomProductTreeItems: [
- (s) => [s.customProducts, s.featureFlags, s.folderStates, s.users],
- (
- customProducts: import('~/queries/schema/schema-general').UserProductListItem[],
- featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet,
- folderStates: Record<string, FolderState>,
- users: Record<string, UserBasicType>
- ): ((searchTerm: string) => TreeDataItem[]) => {
- return function getCustomProductItems(searchTerm: string): TreeDataItem[] {
- const allProducts = getDefaultTreeProducts()
- const productMap = new Map<string, FileSystemImport>(allProducts.map((p) => [p.path, p]))
- const customProductMap = new Map(customProducts.map((item) => [item.product_path, item]))
- const selectedProductPaths = new Set<string>()
- const orderedSelectedProductPaths: string[] = []
-
- for (const item of customProducts) {
- if (selectedProductPaths.has(item.product_path)) {
- continue
- }
- selectedProductPaths.add(item.product_path)
- orderedSelectedProductPaths.push(item.product_path)
- }
-
- const selectedProducts = orderedSelectedProductPaths
- .map((productPath) => {
- const product = productMap.get(productPath)
- if (!product) {
- return null
- }
- const customProduct = customProductMap.get(productPath)
- return {
- ...product,
- created_at: customProduct?.created_at, // Underscore because it comes from backend if it's an actual `FileSystemImport`
- } as FileSystemImport
- })
- .filter((p): p is FileSystemImport => p !== null)
-
- const imports = selectedProducts
- .filter((f) => isFileSystemImportFlagEnabled(f, featureFlags))
- .map((i) => ({
- ...i,
- protocol: 'custom-products://',
- }))
-
- return convertFileSystemEntryToTreeDataItem({
- root: 'custom-products://',
- imports,
- checkedItems: {},
- folderStates,
- users,
- foldersFirst: false,
- searchTerm,
- // With only a few products pinned, category headers add more noise than structure —
- // list them in sequence instead.
- disableCategories: imports.length <= 5,
- disabledReason: (item) => getProductAccessDisabledReason(item as FileSystemImport),
- })
- }
- },
- ],
}),
listeners(({ actions, values, cache }) => ({
movedItem: ({ item }) => {
@@ -1808,15 +1725,6 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([
actions.loadShortcuts()
}
},
- setFeatureFlags: () => {
- if (
- values.featureFlags[FEATURE_FLAGS.SIMPLE_SIDEPANEL] &&
- !values.homeFolderLoaded &&
- !values.homeFolderLoading
- ) {
- actions.loadHomeFolder()
- }
- },
loadHomeFolderSuccess: () => {
actions.loadShortcuts()
actions.loadFolder('', true)
@@ -2021,11 +1929,9 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([
}
},
})),
- afterMount(({ actions, values }) => {
+ afterMount(({ actions }) => {
actions.loadFolder('')
actions.loadShortcuts()
- if (values.featureFlags[FEATURE_FLAGS.SIMPLE_SIDEPANEL]) {
- actions.loadHomeFolder()
- }
+ actions.loadHomeFolder()
}),
])
diff --git a/frontend/src/layout/panel-layout/ProjectTree/projectTreeLogic.tsx b/frontend/src/layout/panel-layout/ProjectTree/projectTreeLogic.tsx
index 10ab9619a6a8..db2617db4cbf 100644
--- a/frontend/src/layout/panel-layout/ProjectTree/projectTreeLogic.tsx
+++ b/frontend/src/layout/panel-layout/ProjectTree/projectTreeLogic.tsx
@@ -91,7 +91,6 @@ export interface projectTreeLogicValues {
folderLoadOffset: Record<string, number> // projectTreeDataLogic
folderStates: Record<string, FolderState> // projectTreeDataLogic
folders: Record<string, FileSystemEntry[]> // projectTreeDataLogic
- getCustomProductTreeItems: (searchTerm: string) => TreeDataItem[] // projectTreeDataLogic
getStaticTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[] // projectTreeDataLogic
lastNewFolder: string | null // projectTreeDataLogic
loadingPaths: Record<string, boolean> // projectTreeDataLogic
@@ -501,9 +500,7 @@ export interface projectTreeLogicMeta {
recentResultsLoading: boolean,
sortMethod: ProjectTreeSortMethod,
onlyFolders: boolean,
- getStaticTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[], // projectTreeDataLogic
- getCustomProductTreeItems: (searchTerm: string) => TreeDataItem[], // projectTreeDataLogic
- arg: any
+ getStaticTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[] // projectTreeDataLogic
) => TreeDataItem[]
fullFileSystemFiltered: (
fullFileSystem: TreeDataItem[],
@@ -570,7 +567,6 @@ export const projectTreeLogic = kea<projectTreeLogicType>([
'loadingPaths',
'lastNewFolder',
'getStaticTreeItems',
- 'getCustomProductTreeItems',
'shortcutData',
'unfiledItems',
'unfiledItemsLoading',
@@ -1097,8 +1093,6 @@ export const projectTreeLogic = kea<projectTreeLogicType>([
s.sortMethod,
s.onlyFolders,
s.getStaticTreeItems,
- s.getCustomProductTreeItems,
- (_, props) => props.root,
],
(
searchTerm: string,
@@ -1110,14 +1104,8 @@ export const projectTreeLogic = kea<projectTreeLogicType>([
recentResultsLoading: boolean,
sortMethod: ProjectTreeSortMethod,
onlyFolders: boolean,
- getStaticTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[],
- getCustomProductTreeItems: (searchTerm: string) => TreeDataItem[],
- root
+ getStaticTreeItems: (searchTerm: string, onlyFolders: boolean) => TreeDataItem[]
): TreeDataItem[] => {
- if (root === 'custom-products://') {
- return getCustomProductTreeItems(searchTerm)
- }
-
const rootItems: TreeDataItem[] = [
{
id: 'project://',
@@ -1169,9 +1157,7 @@ export const projectTreeLogic = kea<projectTreeLogicType>([
const rootWithProtocol =
rootFolders.length > 0 && rootFolders[0].endsWith(':') && root.startsWith(`${rootFolders[0]}//`)
- // We can skip all of this and consider only the `fullFileSystem` if we're not on the custom products root
- // since we don't need to do any filtering as this is coming from the backend
- if (rootWithProtocol && root !== 'custom-products://') {
+ if (rootWithProtocol) {
const protocol = rootFolders[0] + '//'
const ref = joinPath(rootFolders.slice(1))
const firstFolder = fullFileSystem.find((item) => item.id === protocol)
@@ -1212,8 +1198,8 @@ export const projectTreeLogic = kea<projectTreeLogicType>([
return tree
}
- // no client side filtering under project:// or custom-products://
- if (!searchTerm || !root || root.startsWith('project://') || root.startsWith('custom-products://')) {
+ // no client side filtering under project://
+ if (!searchTerm || !root || root.startsWith('project://')) {
return addRoot(firstFolders)
}
const term = searchTerm.toLowerCase()
@@ -1724,7 +1710,7 @@ export const projectTreeLogic = kea<projectTreeLogicType>([
subscriptions(({ actions, values, props }) => ({
projectTreeRef: (newRef: ProjectTreeRef | null) => {
// Only the project:// tree navigates to breadcrumb-driven items. Other roots
- // (data-and-people, products, shortcuts) don't contain project file-system items,
+ // (products, shortcuts) don't contain project file-system items,
// so subscribing on those instances would fire duplicate api.fileSystem.list calls
// for every navigation when those panels are keep-mounted.
// undefined root means the panel loads the project root (''), so it is project-equivalent.
diff --git a/frontend/src/layout/panel-layout/menus/CreateMenu.tsx b/frontend/src/layout/panel-layout/menus/CreateMenu.tsx
deleted file mode 100644
index 03cdaa282f95..000000000000
--- a/frontend/src/layout/panel-layout/menus/CreateMenu.tsx
+++ /dev/null
@@ -1,201 +0,0 @@
-import { useActions, useValues } from 'kea'
-import { router } from 'kea-router'
-import posthog from 'posthog-js'
-import { ReactNode } from 'react'
-
-import { IconChevronRight, IconSparkles } from '@posthog/icons'
-
-import { TreeDataItem } from 'lib/lemon-ui/LemonTree/LemonTree'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import {
- DropdownMenuGroup,
- DropdownMenuItem,
- DropdownMenuSeparator,
- DropdownMenuSub,
- DropdownMenuSubContent,
- DropdownMenuSubTrigger,
-} from 'lib/ui/DropdownMenu/DropdownMenu'
-import { runBlankDashboardFlow } from 'scenes/dashboard/dashboards/templates/dashboardTemplateCreationFlows'
-import { newDashboardLogic } from 'scenes/dashboard/newDashboardLogic'
-import { maxGlobalLogic } from 'scenes/max/maxGlobalLogic'
-
-import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { projectTreeDataLogic } from '~/layout/panel-layout/ProjectTree/projectTreeDataLogic'
-import { splitPath, unescapePath } from '~/layout/panel-layout/ProjectTree/utils'
-import { FileSystemIconType } from '~/queries/schema/schema-general'
-
-// Products shown first, in this exact order. Anything not listed follows alphabetically.
-const PRIORITY_ORDER = ['Insight', 'Dashboard', 'Notebook', 'Experiment', 'Feature flag']
-
-// Products hidden from the Create menu.
-const HIDDEN = new Set(['Action', 'Cohort', 'Data', 'Early access feature', 'Link', 'Product tour'])
-
-// Icon overrides for group (submenu) triggers, keyed by the stable item key.
-const GROUP_ICONS: Record<string, FileSystemIconType> = {
- Insight: 'product_analytics',
-}
-
-// Stable key for an item, independent of the "New ..." display name the tree assigns.
-function keyOf(item: TreeDataItem): string {
- return item.record?.path ?? item.name ?? item.id
-}
-
-// Clean, sentence-cased label derived from the path (e.g. "Insight/Funnel" -> "Funnel"),
-// avoiding the "New ..." prefix the project tree adds for create links.
-function labelFor(item: TreeDataItem): string {
- const last = splitPath(keyOf(item)).pop()
- return unescapePath(last ?? keyOf(item))
-}
-
-function rankOf(item: TreeDataItem): number {
- const index = PRIORITY_ORDER.indexOf(keyOf(item))
- return index === -1 ? PRIORITY_ORDER.length : index
-}
-
-function sortByPriority(a: TreeDataItem, b: TreeDataItem): number {
- const rankDiff = rankOf(a) - rankOf(b)
- return rankDiff !== 0 ? rankDiff : labelFor(a).localeCompare(labelFor(b), undefined, { sensitivity: 'accent' })
-}
-
-function captureItemClicked(item: string): void {
- posthog.capture('nav create menu item clicked', { item })
-}
-
-function pushHref(item: TreeDataItem): void {
- if (item.record?.href) {
- router.actions.push(
- typeof item.record.href === 'function' ? item.record.href(item.record.ref) : item.record.href
- )
- }
-}
-
-// Records the click and navigates — the shared behavior for every navigational create item.
-function navigateToItem(item: TreeDataItem): void {
- captureItemClicked(keyOf(item))
- pushHref(item)
-}
-
-// Shared submenu scaffold: a trigger row (icon + label + chevron) that expands to `children`.
-function CreateSubMenu({
- item,
- icon,
- children,
-}: {
- item: TreeDataItem
- icon: ReactNode
- children: ReactNode
-}): JSX.Element {
- return (
- <DropdownMenuSub>
- <DropdownMenuSubTrigger asChild>
- <ButtonPrimitive menuItem data-attr={`create-menu-sub-menu-${keyOf(item)}-button`}>
- {icon}
- {labelFor(item)}
- <IconChevronRight className="ml-auto size-3" />
- </ButtonPrimitive>
- </DropdownMenuSubTrigger>
- <DropdownMenuSubContent>
- <DropdownMenuGroup>{children}</DropdownMenuGroup>
- </DropdownMenuSubContent>
- </DropdownMenuSub>
- )
-}
-
-export function CreateMenu(): JSX.Element {
- const { treeItemsNew } = useValues(projectTreeDataLogic)
- const { isLoading } = useValues(newDashboardLogic)
- const { openSidePanelMax } = useActions(maxGlobalLogic)
- const { addDashboard, setIsLoading } = useActions(newDashboardLogic)
-
- const items = treeItemsNew.filter((item) => !HIDDEN.has(keyOf(item))).sort(sortByPriority)
-
- return (
- <DropdownMenuGroup>
- <DropdownMenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- captureItemClicked('Create with AI')
- openSidePanelMax()
- }}
- data-attr="create-menu-with-ai-button"
- >
- <ButtonPrimitive menuItem>
- <IconSparkles className="text-accent" />
- Create with AI
- </ButtonPrimitive>
- </DropdownMenuItem>
- <DropdownMenuSeparator />
- {items.map((item): JSX.Element => {
- const itemKey = keyOf(item)
- if (itemKey === 'Dashboard') {
- return (
- <CreateSubMenu key={item.id} item={item} icon={item.icon}>
- <DropdownMenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- captureItemClicked('Dashboard (blank)')
- runBlankDashboardFlow({ isLoading, setIsLoading, addDashboard })
- }}
- data-attr="create-menu-dashboard-blank"
- >
- <ButtonPrimitive menuItem>Start from scratch</ButtonPrimitive>
- </DropdownMenuItem>
- <DropdownMenuItem
- asChild
- onClick={(e) => {
- e.stopPropagation()
- captureItemClicked('Dashboard (templates)')
- pushHref(item)
- }}
- data-attr="create-menu-dashboard-templates"
- >
- <ButtonPrimitive menuItem>View templates</ButtonPrimitive>
- </DropdownMenuItem>
- </CreateSubMenu>
- )
- }
- if (item.children) {
- const groupIcon = GROUP_ICONS[itemKey]
- return (
- <CreateSubMenu key={item.id} item={item} icon={groupIcon ? iconForType(groupIcon) : item.icon}>
- {item.children.map((child) => (
- <DropdownMenuItem
- key={child.id}
- asChild
- onClick={(e) => {
- e.stopPropagation()
- navigateToItem(child)
- }}
- data-attr={`create-menu-sub-menu-${keyOf(child)}-button`}
- >
- <ButtonPrimitive menuItem>
- {child.icon}
- {labelFor(child)}
- </ButtonPrimitive>
- </DropdownMenuItem>
- ))}
- </CreateSubMenu>
- )
- }
- return (
- <DropdownMenuItem
- key={item.id}
- asChild
- onClick={(e) => {
- e.stopPropagation()
- navigateToItem(item)
- }}
- data-attr={`create-menu-new-${itemKey}-button`}
- >
- <ButtonPrimitive menuItem>
- {item.icon}
- {labelFor(item)}
- </ButtonPrimitive>
- </DropdownMenuItem>
- )
- })}
- </DropdownMenuGroup>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/NavBar.scss b/frontend/src/layout/panel-layout/navbar/NavBar.scss
deleted file mode 100644
index 5be130b04187..000000000000
--- a/frontend/src/layout/panel-layout/navbar/NavBar.scss
+++ /dev/null
@@ -1,27 +0,0 @@
-// Density is set through custom properties rather than overriding rules. Tailwind utilities are
-// !important in this app, so a rule that competes with one loses, but a variable it reads wins.
-[data-nav-density='compact'] {
- --button-height-base: var(--button-height-xs);
-
- // Section and category headers keep the padding of a comfortable row. Once the rows condense,
- // that space reads as a gap instead of as grouping.
- --nav-section-trigger-padding-y: 0.125rem;
- --nav-section-gap: 0.25rem;
- --lemon-tree-category-gap: 0.5rem;
- --lemon-tree-category-padding-y: 0.125rem;
-
- .button-primitive {
- font-size: 0.75rem;
- }
-
- // The search bar is a control, not a list row, so it stays taller than the rows around it.
- // At the compact row height the ⌘K badge fills the box from edge to edge.
- [data-attr='nav-search-bar'] {
- --button-height-base: var(--button-height-sm);
-
- .KeyboardShortcut {
- min-width: 1.125rem;
- height: 1.125rem;
- }
- }
-}
diff --git a/frontend/src/layout/panel-layout/navbar/NavBar.stories.tsx b/frontend/src/layout/panel-layout/navbar/NavBar.stories.tsx
deleted file mode 100644
index 9a0c9fea59ef..000000000000
--- a/frontend/src/layout/panel-layout/navbar/NavBar.stories.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-import './NavBar.scss'
-
-import type { Meta, StoryObj } from '@storybook/react'
-import { useActions } from 'kea'
-
-import { NavSearchBar } from 'lib/components/NavSearchButton/NavSearchButton'
-import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
-
-import { mswDecorator } from '~/mocks/browser'
-import { SidebarDensity } from '~/queries/schema/schema-general'
-
-import { customProductsLogic } from '../ProjectTree/customProductsLogic'
-import { NavTabBrowse } from './tabs/NavTabBrowse'
-
-/** Enough products, across enough categories, for "My products" to show its category headers. */
-const MOCK_PRODUCTS = [
- 'Product analytics',
- 'Web analytics',
- 'Session replay',
- 'Surveys',
- 'Error tracking',
- 'Experiments',
- 'Feature flags',
-].map((productPath, index) => ({
- id: `product-${index}`,
- product_path: productPath,
- enabled: true,
- created_at: '2026-01-01T00:00:00Z',
- updated_at: '2026-01-01T00:00:00Z',
-}))
-
-/**
- * Density comes from `data-nav-density`, which `NavBar` sets from the user's sidebar setting.
- * Setting the attribute here keeps the story independent of the user API.
- */
-function NavSidebar({ density }: { density: SidebarDensity }): JSX.Element {
- const { loadCustomProducts } = useActions(customProductsLogic)
- useOnMountEffect(() => loadCustomProducts())
-
- return (
- <div
- data-nav-density={density}
- className="flex flex-col w-[var(--project-navbar-width)] h-[640px] bg-surface-tertiary border rounded overflow-hidden"
- >
- <div className="px-2 py-1">
- <NavSearchBar toggleCommand={() => {}} />
- </div>
- <NavTabBrowse />
- </div>
- )
-}
-
-/** Both densities together, so a spacing change to one is visible against the other. */
-function NavSidebarDensities(): JSX.Element {
- return (
- <div className="flex gap-4">
- <div className="flex flex-col gap-1">
- <span className="text-xs font-semibold text-secondary">Comfortable</span>
- <NavSidebar density="comfortable" />
- </div>
- <div className="flex flex-col gap-1">
- <span className="text-xs font-semibold text-secondary">Compact</span>
- <NavSidebar density="compact" />
- </div>
- </div>
- )
-}
-
-const meta: Meta<typeof NavSidebarDensities> = {
- title: 'Layout/Navigation sidebar',
- component: NavSidebarDensities,
- parameters: {
- layout: 'padded',
- viewMode: 'story',
- },
- decorators: [
- mswDecorator({
- get: {
- '/api/environments/:team_id/user_product_list': () => [200, { results: MOCK_PRODUCTS }],
- },
- }),
- ],
-}
-export default meta
-
-export const DensityComparison: StoryObj<typeof NavSidebarDensities> = {}
diff --git a/frontend/src/layout/panel-layout/navbar/NavBar.tsx b/frontend/src/layout/panel-layout/navbar/NavBar.tsx
index 3931563e4600..420630133663 100644
--- a/frontend/src/layout/panel-layout/navbar/NavBar.tsx
+++ b/frontend/src/layout/panel-layout/navbar/NavBar.tsx
@@ -1,12 +1,10 @@
-import './NavBar.scss'
-
import { Tabs } from '@base-ui/react/tabs'
import { cva } from 'cva'
import { useActions, useMountedLogic, useValues } from 'kea'
import posthog from 'posthog-js'
import { Suspense, useEffect, useRef } from 'react'
-import { IconApps, IconChat, IconChevronRight, IconFolderOpen } from '@posthog/icons'
+import { IconApps, IconChat, IconFolderOpen } from '@posthog/icons'
import { NewAccountMenu } from 'lib/components/Account/NewAccountMenu'
import { commandLogic } from 'lib/components/Command/commandLogic'
@@ -14,10 +12,7 @@ import { Resizer } from 'lib/components/Resizer/Resizer'
import { ResizerLogicProps, resizerLogic } from 'lib/components/Resizer/resizerLogic'
import { keyBinds } from 'lib/components/Shortcuts/shortcuts'
import { useShortcut } from 'lib/components/Shortcuts/useShortcut'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { Collapsible } from 'lib/ui/Collapsible/Collapsible'
-import { Label } from 'lib/ui/Label/Label'
import { WrappingLoadingSkeleton } from 'lib/ui/WrappingLoadingSkeleton/WrappingLoadingSkeleton'
import { cn } from 'lib/utils/css-classes'
import { lazyWithRetry } from 'lib/utils/retryImport'
@@ -26,21 +21,15 @@ import {
NavExperimentTab,
PANEL_NAVBAR_COLLAPSE_THRESHOLD,
PANEL_NAVBAR_DEFAULT_WIDTH,
- PanelLayoutNavIdentifier,
panelLayoutLogic,
} from '~/layout/panel-layout/panelLayoutLogic'
-import { uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-import { NavSearchBar, NavSearchButton } from '../../../lib/components/NavSearchButton/NavSearchButton'
+import { NavSearchButton } from '../../../lib/components/NavSearchButton/NavSearchButton'
import { navigation3000Logic } from '../../navigation-3000/navigationLogic'
import { NavBarFooter } from './NavBarFooter'
import { PanelLayoutPanels } from './PanelLayoutPanels'
-import { PostHogTeamCohortBanner } from './PostHogTeamCohortBanner'
-import { postHogTeamCohortBannerLogic } from './postHogTeamCohortBannerLogic'
-import { FlatNavBrowse } from './tabs/flat-nav/FlatNavBrowse'
import { navProductsTabLogic } from './tabs/navProductsTabLogic'
import { NavStarredProductsTree } from './tabs/NavStarredProductsTree'
-import { NavTabBrowse } from './tabs/NavTabBrowse'
import { NavTabFiles } from './tabs/NavTabFiles'
import { NavTabProducts } from './tabs/NavTabProducts'
const NavTabChat = lazyWithRetry(() => import('./tabs/NavTabChat').then((m) => ({ default: m.NavTabChat })))
@@ -59,67 +48,18 @@ const navBarStyles = cva({
},
})
-export function SectionTrigger({
- label,
- isCollapsed,
- icon,
-}: {
- label: string
- isCollapsed: boolean
- icon: React.ReactNode
-}): JSX.Element {
- return (
- <Collapsible.Trigger
- className={cn(
- 'flex items-center py-[var(--nav-section-trigger-padding-y,0.25rem)] cursor-pointer group pl-2 sticky top-0 bg-surface-tertiary z-4 -mx-1 px-2 w-[calc(100%+(var(--spacing)*2))] -outline-offset-2',
- isCollapsed && 'mx-0 w-full px-px'
- )}
- >
- <Label
- intent="menu"
- className={cn(
- 'text-xxs text-secondary text-left group-hover:text-primary mr-1',
- isCollapsed && 'text-[7px] m-0 w-full text-center'
- )}
- >
- {icon && !isCollapsed && <span className="size-3 mr-1">{icon}</span>}
- {label}
- </Label>
- </Collapsible.Trigger>
- )
-}
-
-export function PanelIndicatorIcon(): JSX.Element | null {
- const { isLayoutNavCollapsed } = useValues(panelLayoutLogic)
-
- if (!isLayoutNavCollapsed) {
- return null
- }
- return (
- <span className="absolute bottom-3 -right-1.5 size-2">
- <IconChevronRight className="size-2 text-inherit" />
- </span>
- )
-}
-
-const SIMPLE_TAB_CONFIG: { id: NavExperimentTab; label: string; icon: JSX.Element }[] = [
+const TAB_CONFIG: { id: NavExperimentTab; label: string; icon: JSX.Element }[] = [
{ id: 'home', label: 'Apps', icon: <IconApps /> },
{ id: 'files', label: 'Files', icon: <IconFolderOpen /> },
{ id: 'chat', label: 'Chat', icon: <IconChat /> },
]
-const TAB_CONFIG: { id: NavExperimentTab; label: string; icon: JSX.Element }[] = [
- { id: 'home', label: 'Browse', icon: <IconApps /> },
- { id: 'chat', label: 'Chat', icon: <IconChat /> },
-]
-
export function NavBar(): JSX.Element {
useMountedLogic(navProductsTabLogic)
const containerRef = useRef<HTMLDivElement | null>(null)
const {
toggleLayoutNavCollapsed,
setNavExperimentTab,
- setActivePanelIdentifier,
showLayoutPanel,
clearActivePanelIdentifier,
setNavbarWidth,
@@ -129,23 +69,13 @@ export function NavBar(): JSX.Element {
isLayoutPanelVisible,
isLayoutNavCollapsed: isNavCollapsed,
isNavOverlayOpen,
- navExperimentActiveTab,
- activePanelIdentifier,
+ navExperimentActiveTab: activeTab,
visitedNavTabs,
} = useValues(panelLayoutLogic)
const { mobileLayout: isMobileLayout } = useValues(navigation3000Logic)
const { toggleCommand } = useActions(commandLogic)
- const { sidebarDensity } = useValues(uiCustomizationLogic)
- const isSimpleSidepanelEnabled = useFeatureFlag('SIMPLE_SIDEPANEL')
- const { bannerVisible: isCohortBannerVisible } = useValues(postHogTeamCohortBannerLogic)
- const isOverlayOpen = isSimpleSidepanelEnabled && isNavCollapsed && isNavOverlayOpen
+ const isOverlayOpen = isNavCollapsed && isNavOverlayOpen
const isLayoutNavCollapsed = isNavCollapsed && !isOverlayOpen
- const isFlatNavEnabled = useFeatureFlag('FLAT_NAV', 'test')
- const activeTab =
- !isSimpleSidepanelEnabled &&
- (navExperimentActiveTab === 'files' || (isLayoutNavCollapsed && navExperimentActiveTab === 'chat'))
- ? 'home'
- : navExperimentActiveTab
const resizerLogicProps: ResizerLogicProps = {
logicKey: 'panel-layout-navbar',
@@ -177,18 +107,8 @@ export function NavBar(): JSX.Element {
ignoreInEditable: true,
})
- function handlePanelTriggerClick(item: PanelLayoutNavIdentifier): void {
- if (activePanelIdentifier !== item) {
- setActivePanelIdentifier(item)
- showLayoutPanel(true)
- } else {
- clearActivePanelIdentifier()
- showLayoutPanel(false)
- }
- }
-
function openCollapsedTab(tab: NavExperimentTab): void {
- if (isSimpleSidepanelEnabled && isNavCollapsed) {
+ if (isNavCollapsed) {
if (tab === 'chat') {
toggleLayoutNavCollapsed(false)
} else {
@@ -216,10 +136,9 @@ export function NavBar(): JSX.Element {
isMobileLayout,
}),
isLayoutNavCollapsed && 'gap-px',
- isSimpleSidepanelEnabled && '@container/sidebar',
+ '@container/sidebar',
isOverlayOpen && 'absolute top-0 left-0 shadow-lg border-r'
)}
- data-nav-density={sidebarDensity}
data-nav-overlay={isOverlayOpen || undefined}
onKeyDown={(event) => {
if (isOverlayOpen && event.key === 'Escape' && !event.defaultPrevented) {
@@ -237,64 +156,16 @@ export function NavBar(): JSX.Element {
)}
>
<div
- className={cn('flex gap-1 rounded-md w-full px-1 pt-2 pb-1', {
- 'items-center': isSimpleSidepanelEnabled,
- 'flex-col items-center pt-2 pb-0': isLayoutNavCollapsed,
+ className={cn('flex gap-1 items-center rounded-md w-full px-1 pt-2 pb-1', {
+ 'flex-col pt-2 pb-0': isLayoutNavCollapsed,
})}
>
<NewAccountMenu isLayoutNavCollapsed={isLayoutNavCollapsed} />
- {isSimpleSidepanelEnabled ? (
- <NavSearchButton toggleCommand={toggleCommand} showShortcut={!isLayoutNavCollapsed} />
- ) : (
- <>
- {/* Collapsed nav has no room for the search bar, so it keeps the icon-only trigger */}
- {isLayoutNavCollapsed && <NavSearchButton toggleCommand={toggleCommand} />}
-
- {isLayoutNavCollapsed && (
- <ButtonPrimitive
- className="group w-full justify-center"
- data-attr="nav-tab-chat-collapsed"
- iconOnly
- tooltip="Chat"
- tooltipPlacement="right"
- active={activePanelIdentifier === 'Chat'}
- onClick={() => {
- const isOpening = activePanelIdentifier !== 'Chat'
- posthog.capture('nav chat panel toggled', {
- is_open: isOpening,
- })
- handlePanelTriggerClick('Chat')
- }}
- >
- <span
- className={cn(
- 'relative flex size-4 text-secondary group-hover:text-primary opacity-50 group-hover:opacity-100 transition-all duration-50',
- activePanelIdentifier === 'Chat' && 'text-primary opacity-100'
- )}
- >
- <IconChat
- className={cn(
- 'text-secondary group-hover:text-primary',
- activePanelIdentifier === 'Chat' && 'text-primary'
- )}
- />
-
- <PanelIndicatorIcon />
- </span>
- </ButtonPrimitive>
- )}
- </>
- )}
+ <NavSearchButton toggleCommand={toggleCommand} showShortcut={!isLayoutNavCollapsed} />
</div>
</div>
- {!isSimpleSidepanelEnabled && !isLayoutNavCollapsed && (
- <div className="px-2 py-1">
- <NavSearchBar toggleCommand={toggleCommand} />
- </div>
- )}
-
<Tabs.Root
className="z-[var(--z-main-nav)] flex flex-col flex-1 overflow-hidden"
value={activeTab}
@@ -302,21 +173,19 @@ export function NavBar(): JSX.Element {
posthog.capture('nav tab clicked', { tab: value })
setNavExperimentTab(value as NavExperimentTab)
openCollapsedTab(value as NavExperimentTab)
- if (isSimpleSidepanelEnabled) {
- clearActivePanelIdentifier()
- showLayoutPanel(false)
- }
+ clearActivePanelIdentifier()
+ showLayoutPanel(false)
}}
orientation={isLayoutNavCollapsed ? 'vertical' : 'horizontal'}
>
- <div className={cn('p-1', !isSimpleSidepanelEnabled && isLayoutNavCollapsed && 'hidden')}>
+ <div className="p-1">
<Tabs.List
className={cn(
'relative flex items-center gap-1 shrink-0 z-0 p-1 rounded-lg bg-(--color-bg-fill-highlight-50) dark:bg-surface-primary',
- isSimpleSidepanelEnabled && isLayoutNavCollapsed && 'flex-col'
+ isLayoutNavCollapsed && 'flex-col'
)}
>
- {(isSimpleSidepanelEnabled ? SIMPLE_TAB_CONFIG : TAB_CONFIG).map((tab) => (
+ {TAB_CONFIG.map((tab) => (
<Tabs.Tab
key={tab.id}
value={tab.id}
@@ -327,15 +196,13 @@ export function NavBar(): JSX.Element {
className={cn(
'group gap-1 data-[composite-item-active]:bg-surface-tertiary justify-center',
// In the vertical collapsed list, flex-1 would override the button height
- !isSimpleSidepanelEnabled
- ? 'w-1/2'
- : !isLayoutNavCollapsed && 'flex-1 min-w-0'
+ !isLayoutNavCollapsed && 'flex-1 min-w-0'
)}
- iconOnly={isSimpleSidepanelEnabled && isLayoutNavCollapsed}
- tooltip={isSimpleSidepanelEnabled ? tab.label : undefined}
+ iconOnly={isLayoutNavCollapsed}
+ tooltip={tab.label}
aria-label={tab.label}
data-attr={
- isSimpleSidepanelEnabled && isLayoutNavCollapsed && tab.id === 'chat'
+ isLayoutNavCollapsed && tab.id === 'chat'
? 'nav-tab-chat-collapsed'
: `nav-tab-${tab.id}`
}
@@ -354,7 +221,7 @@ export function NavBar(): JSX.Element {
<span
className={cn(
'text-xs',
- isSimpleSidepanelEnabled && '@max-[200px]/sidebar:hidden',
+ '@max-[200px]/sidebar:hidden',
activeTab === tab.id
? 'text-primary'
: 'text-secondary group-hover:text-primary'
@@ -373,24 +240,18 @@ export function NavBar(): JSX.Element {
<div
className={cn(
'flex-1 overflow-hidden relative',
- isSimpleSidepanelEnabled && isLayoutNavCollapsed && '[&>[role=tabpanel]]:hidden'
+ isLayoutNavCollapsed && '[&>[role=tabpanel]]:hidden'
)}
>
- {isSimpleSidepanelEnabled && isLayoutNavCollapsed && (
+ {isLayoutNavCollapsed && (
<div className="absolute inset-0 flex flex-col items-center group/colorful-product-icons colorful-product-icons-true">
<NavStarredProductsTree treeSize="narrow" />
</div>
)}
<Tabs.Panel value="home" className="absolute inset-0 flex flex-col" keepMounted tabIndex={-1}>
- {isSimpleSidepanelEnabled ? (
- <NavTabProducts />
- ) : isFlatNavEnabled ? (
- <FlatNavBrowse />
- ) : (
- <NavTabBrowse />
- )}
+ <NavTabProducts />
</Tabs.Panel>
- {isSimpleSidepanelEnabled && visitedNavTabs.includes('files') && (
+ {visitedNavTabs.includes('files') && (
<Tabs.Panel
value="files"
className="absolute inset-0 flex flex-col"
@@ -431,15 +292,9 @@ export function NavBar(): JSX.Element {
<div className="h-px bg-border-primary " />
</div>
- <div className={cn('p-1', !isSimpleSidepanelEnabled && isLayoutNavCollapsed && 'hidden')}>
+ <div className="p-1">
<NavBarFooter isLayoutNavCollapsed={isLayoutNavCollapsed} />
</div>
- {/* The collapsed nav hides the footer without the simple side panel, so the reminder renders here instead. */}
- {!isSimpleSidepanelEnabled && isLayoutNavCollapsed && isCohortBannerVisible && (
- <div className="flex justify-center p-1">
- <PostHogTeamCohortBanner isCollapsed />
- </div>
- )}
</Tabs.Root>
{!isMobileLayout && !isOverlayOpen && (
<Resizer
diff --git a/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx b/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx
index 9ef5c75fdf80..4eee36bc0353 100644
--- a/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx
+++ b/frontend/src/layout/panel-layout/navbar/NavBarFooter.tsx
@@ -1,5 +1,3 @@
-import { useValues } from 'kea'
-
import { IconGear } from '@posthog/icons'
import { Link } from '@posthog/lemon-ui'
@@ -12,13 +10,10 @@ import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { cn } from 'lib/utils/css-classes'
import { urls } from 'scenes/urls'
-import { uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-
import { PostHogTeamCohortBanner } from './PostHogTeamCohortBanner'
export function NavBarFooter({ isLayoutNavCollapsed }: { isLayoutNavCollapsed: boolean }): JSX.Element {
const isNotificationsEnabled = useFeatureFlag('REAL_TIME_NOTIFICATIONS')
- const { isSidebarItemShown } = useValues(uiCustomizationLogic)
return (
<div className="p-1 flex flex-col gap-px items-start pb-2">
@@ -38,9 +33,7 @@ export function NavBarFooter({ isLayoutNavCollapsed }: { isLayoutNavCollapsed: b
'items-center': isLayoutNavCollapsed,
})}
>
- {isNotificationsEnabled && isSidebarItemShown('notifications') && (
- <NotificationsMenu iconOnly={isLayoutNavCollapsed} />
- )}
+ {isNotificationsEnabled && <NotificationsMenu iconOnly={isLayoutNavCollapsed} />}
<Link
to={urls.settings('project')}
buttonProps={{ menuItem: isLayoutNavCollapsed ? false : true }}
@@ -51,7 +44,7 @@ export function NavBarFooter({ isLayoutNavCollapsed }: { isLayoutNavCollapsed: b
<IconGear />
{!isLayoutNavCollapsed && 'Settings'}
</Link>
- {isSidebarItemShown('help') && <HelpMenu iconOnly={isLayoutNavCollapsed} />}
+ <HelpMenu iconOnly={isLayoutNavCollapsed} />
<PosthogStatusShownOnlyIfNotOperational iconOnly={isLayoutNavCollapsed} />
</div>
</div>
diff --git a/frontend/src/layout/panel-layout/navbar/NavLinkSideActionButton.tsx b/frontend/src/layout/panel-layout/navbar/NavLinkSideActionButton.tsx
deleted file mode 100644
index fdebd89e0f7c..000000000000
--- a/frontend/src/layout/panel-layout/navbar/NavLinkSideActionButton.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import { forwardRef } from 'react'
-
-import { ButtonPrimitive, ButtonPrimitiveProps } from 'lib/ui/Button/ButtonPrimitives'
-import { cn } from 'lib/utils/css-classes'
-
-interface NavLinkSideActionButtonProps extends Omit<ButtonPrimitiveProps, 'children'> {
- icon: React.ReactNode
-}
-
-export const NavLinkSideActionButton = forwardRef<HTMLButtonElement, NavLinkSideActionButtonProps>(
- function NavLinkSideActionButton({ icon, className, ...props }, ref): JSX.Element {
- return (
- <ButtonPrimitive
- ref={ref}
- iconOnly
- isSideActionRight
- tooltipPlacement="right"
- className={cn('-outline-offset-2', className)}
- {...props}
- >
- <span className="flex text-tertiary opacity-70 group-hover/nav-link:text-primary group-hover/nav-link:opacity-100 [&>svg]:size-3">
- {icon}
- </span>
- </ButtonPrimitive>
- )
- }
-)
diff --git a/frontend/src/layout/panel-layout/navbar/NavTabInbox.tsx b/frontend/src/layout/panel-layout/navbar/NavTabInbox.tsx
deleted file mode 100644
index b5ee338f6db2..000000000000
--- a/frontend/src/layout/panel-layout/navbar/NavTabInbox.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-export function NavTabInbox(): JSX.Element {
- return (
- <div className="flex flex-col items-center justify-center h-full text-muted p-4">
- <p className="text-sm mb-0">Inbox coming soon</p>
- </div>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.test.tsx b/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.test.tsx
index caca775a8254..e8ffe3928683 100644
--- a/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.test.tsx
+++ b/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.test.tsx
@@ -13,9 +13,6 @@ jest.mock('../ProjectTree/ProjectTree', () => ({
jest.mock('lib/components/NotificationsMenu/NotificationsPanel', () => ({
NotificationsPanel: () => <div data-attr="mock-notifications" />,
}))
-jest.mock('./tabs/NavTabChat', () => ({
- NavTabChat: () => <div data-attr="mock-chat" />,
-}))
describe('PanelLayoutPanels', () => {
beforeEach(() => {
@@ -31,7 +28,7 @@ describe('PanelLayoutPanels', () => {
}))
}
- it('keeps previously opened panels mounted but hidden when switching', () => {
+ it('keeps the project tree mounted but hidden after switching away from it', () => {
const { container } = render(<PanelLayoutPanels />)
expect(renderedTrees(container)).toEqual([])
@@ -40,17 +37,11 @@ describe('PanelLayoutPanels', () => {
expect(renderedTrees(container)).toEqual([{ root: 'project://', hidden: false, active: true }])
// Switching must not tear down the project tree — it stays in the DOM, hidden.
- act(() => panelLayoutLogic.actions.setActivePanelIdentifier('Products'))
- expect(renderedTrees(container)).toEqual([
- { root: 'project://', hidden: true, active: false },
- { root: 'products://', hidden: false, active: true },
- ])
+ act(() => panelLayoutLogic.actions.setActivePanelIdentifier('Notifications'))
+ expect(renderedTrees(container)).toEqual([{ root: 'project://', hidden: true, active: false }])
act(() => panelLayoutLogic.actions.clearActivePanelIdentifier())
- expect(renderedTrees(container)).toEqual([
- { root: 'project://', hidden: true, active: false },
- { root: 'products://', hidden: true, active: false },
- ])
+ expect(renderedTrees(container)).toEqual([{ root: 'project://', hidden: true, active: false }])
})
it('mounts the notifications panel only while it is the active panel', () => {
diff --git a/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.tsx b/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.tsx
index 8b59063f24d8..96bc0e23e8db 100644
--- a/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.tsx
+++ b/frontend/src/layout/panel-layout/navbar/PanelLayoutPanels.tsx
@@ -1,114 +1,36 @@
-import { useActions, useValues } from 'kea'
-import { Suspense, useCallback, useMemo } from 'react'
+import { useValues } from 'kea'
import { NotificationsPanel } from 'lib/components/NotificationsMenu/NotificationsPanel'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { WrappingLoadingSkeleton } from 'lib/ui/WrappingLoadingSkeleton/WrappingLoadingSkeleton'
-import { lazyWithRetry } from 'lib/utils/retryImport'
-import { PanelLayoutNavIdentifier, panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
+import { panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
import { ProjectTree } from '../ProjectTree/ProjectTree'
import { PROJECT_TREE_KEY } from '../ProjectTree/projectTreeLogic'
-const NavTabChat = lazyWithRetry(() => import('./tabs/NavTabChat').then((m) => ({ default: m.NavTabChat })))
-
-// Renders the currently-active panel (Project tree, Notifications, Chat, etc.). Extracted so the
+// Renders the currently-active panel (Project tree or Notifications). Extracted so the
// same active-panel JSX can be mounted at different positions in the DOM/stacking tree depending
// on layout mode — inside the nav container on desktop, as a fixed sibling on mobile.
export function PanelLayoutPanels(): JSX.Element | null {
const { activePanelIdentifier, visitedPanels } = useValues(panelLayoutLogic)
- const { clearActivePanelIdentifier, showLayoutPanel } = useActions(panelLayoutLogic)
-
- // Stable reference: the chat panel stays mounted now, so a fresh closure here would re-render
- // NavTabChat's memoized internals on every re-render of this component.
- const onChatItemClick = useCallback(() => {
- clearActivePanelIdentifier()
- showLayoutPanel(false)
- }, [clearActivePanelIdentifier, showLayoutPanel])
-
- // Memoized so keep-mounted trees don't re-render on every PanelLayoutPanels re-render.
- // Notifications is deliberately absent: its logic drives unread/read semantics that should
- // only run while the panel is actually open. The keep-mounted set is derived from these
- // keys so adding a panel here automatically opts it in — no second list to keep in sync.
- const panelContent: Partial<Record<PanelLayoutNavIdentifier, JSX.Element>> = useMemo(
- () => ({
- DataAndPeople: (
- <ProjectTree
- panelName="data-and-people"
- root="data-and-people://"
- searchPlaceholder="Search data"
- isActiveInPanel={activePanelIdentifier === 'DataAndPeople'}
- />
- ),
- Project: (
- <ProjectTree
- panelName="project"
- root="project://"
- logicKey={PROJECT_TREE_KEY}
- searchPlaceholder="Search files"
- showRecents
- isActiveInPanel={activePanelIdentifier === 'Project'}
- />
- ),
- Products: (
- <ProjectTree
- panelName="products"
- root="products://"
- searchPlaceholder="Search products"
- isActiveInPanel={activePanelIdentifier === 'Products'}
- />
- ),
- Shortcuts: (
- <ProjectTree
- panelName="shortcuts"
- root="shortcuts://"
- searchPlaceholder="Search starred items"
- isActiveInPanel={activePanelIdentifier === 'Shortcuts'}
- />
- ),
- Chat: (
- <div
- className="pointer-events-auto flex flex-col h-full min-h-0 max-h-full bg-surface-tertiary border-r overflow-hidden w-[var(--project-panel-width)]"
- data-attr="nav-panel-chat"
- >
- <Suspense
- fallback={
- <div className="flex flex-col gap-px px-1 pt-2">
- {Array.from({ length: 15 }).map((_, index) => (
- <WrappingLoadingSkeleton fullWidth key={index}>
- <ButtonPrimitive aria-hidden inert menuItem />
- </WrappingLoadingSkeleton>
- ))}
- </div>
- }
- >
- <NavTabChat inPanel onItemClick={onChatItemClick} />
- </Suspense>
- </div>
- ),
- }),
- // activePanelIdentifier feeds isActiveInPanel so kept trees refocus search on re-activation;
- // it only changes on panel switches, so this memo still shields trees from unrelated re-renders.
- [onChatItemClick, activePanelIdentifier]
- )
-
- // All panel-content keys are keep-mounted (hidden when inactive) so switching panels doesn't
- // tear down and rebuild whole trees on every toggle — that churn was the app's dominant
- // detached-DOM source and also loses scroll/expansion state.
- const keepMountedPanels = Object.keys(panelContent) as PanelLayoutNavIdentifier[]
+ const isProjectActive = activePanelIdentifier === 'Project'
return (
<>
- {keepMountedPanels
- .filter((identifier) => identifier === activePanelIdentifier || visitedPanels.includes(identifier))
- .map((identifier) => (
- // `contents` keeps the wrapper out of layout when active, so each panel's own
- // chrome positions exactly as it did when returned bare from this component.
- <div key={identifier} className={identifier === activePanelIdentifier ? 'contents' : 'hidden'}>
- {panelContent[identifier]}
- </div>
- ))}
+ {/* The project tree stays mounted (hidden) once opened, so closing and reopening it keeps its
+ scroll and expansion state instead of rebuilding the whole tree. */}
+ {(isProjectActive || visitedPanels.includes('Project')) && (
+ <div className={isProjectActive ? 'contents' : 'hidden'}>
+ <ProjectTree
+ panelName="project"
+ root="project://"
+ logicKey={PROJECT_TREE_KEY}
+ searchPlaceholder="Search files"
+ showRecents
+ isActiveInPanel={isProjectActive}
+ />
+ </div>
+ )}
+ {/* Notifications only mounts while open, because its logic marks notifications as read. */}
{activePanelIdentifier === 'Notifications' && <NotificationsPanel />}
</>
)
diff --git a/frontend/src/layout/panel-layout/navbar/ProductsAndFiles.stories.tsx b/frontend/src/layout/panel-layout/navbar/ProductsAndFiles.stories.tsx
index ee65f90ba19d..7db9f567d347 100644
--- a/frontend/src/layout/panel-layout/navbar/ProductsAndFiles.stories.tsx
+++ b/frontend/src/layout/panel-layout/navbar/ProductsAndFiles.stories.tsx
@@ -17,7 +17,7 @@ import { FileSystemEntry } from '~/queries/schema/schema-general'
import { DecideRequestApi } from 'products/ml_inference/frontend/generated/api.schemas'
import { NavExperimentTab, panelLayoutLogic } from '../panelLayoutLogic'
-import { getDefaultTreeDataAndPeople, getDefaultTreeProducts } from '../ProjectTree/defaultTree'
+import { getDefaultTreeData, getDefaultTreePersons, getDefaultTreeProducts } from '../ProjectTree/defaultTree'
import { projectTreeDataLogic } from '../ProjectTree/projectTreeDataLogic'
import { projectTreeLogic } from '../ProjectTree/projectTreeLogic'
import { NavBar } from './NavBar'
@@ -116,12 +116,11 @@ const meta: Meta<typeof SidebarStory> = {
layout: 'fullscreen',
featureFlags: [
...new Set(
- [...getDefaultTreeProducts(), ...getDefaultTreeDataAndPeople()].flatMap((item) =>
+ [...getDefaultTreeProducts(), ...getDefaultTreeData(), ...getDefaultTreePersons()].flatMap((item) =>
item.flag ? [item.flag] : []
)
),
FEATURE_FLAGS.PRODUCT_AUTONOMY,
- FEATURE_FLAGS.SIMPLE_SIDEPANEL,
FEATURE_FLAGS.ML_INFERENCE_DECISIONS,
],
},
@@ -439,17 +438,6 @@ export const FilesLongTree: Story = {
],
}
-export const FlagOff: Story = { parameters: { featureFlags: [] } }
-export const FlagOffAfterFiles: Story = {
- args: { tab: 'files', recentsCollapsed: true },
- parameters: { featureFlags: [] },
-}
-export const FlagOffCollapsed: Story = { args: { collapsed: true }, parameters: { featureFlags: [] } }
-export const FlagOffFlatNav: Story = {
- args: { tab: 'files', recentsCollapsed: true },
- parameters: { featureFlags: [FEATURE_FLAGS.FLAT_NAV] },
-}
-
export const FilesInsightTypes: Story = {
args: { tab: 'files', recentsCollapsed: false },
decorators: [
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/CustomizeSidebarModal.tsx b/frontend/src/layout/panel-layout/navbar/tabs/CustomizeSidebarModal.tsx
index 9ba017889339..6c57bbb264d3 100644
--- a/frontend/src/layout/panel-layout/navbar/tabs/CustomizeSidebarModal.tsx
+++ b/frontend/src/layout/panel-layout/navbar/tabs/CustomizeSidebarModal.tsx
@@ -6,6 +6,7 @@ import { HomepageConfiguration } from '~/layout/scenes/HomepageConfiguration'
import { projectTreeDataLogic } from '../../ProjectTree/projectTreeDataLogic'
import { navProductsTabLogic } from './navProductsTabLogic'
+import { SidebarSuggestionsSetting } from './SidebarSuggestionsSetting'
import { StarredProductsPicker } from './StarredProductsPicker'
import { StarredSetupIntro } from './StarredSetupIntro'
@@ -71,13 +72,16 @@ export function CustomizeSidebarModal(): JSX.Element {
{isStarredSetup ? (
<StarredSetupIntro />
) : (
- <section className="flex flex-col gap-2">
- <div>
- <LemonLabel>Homepage</LemonLabel>
- <p className="text-xs text-secondary mb-0">The page that opens when you select Home.</p>
- </div>
- <HomepageConfiguration />
- </section>
+ <>
+ <section className="flex flex-col gap-2">
+ <div>
+ <LemonLabel>Homepage</LemonLabel>
+ <p className="text-xs text-secondary mb-0">The page that opens when you select Home.</p>
+ </div>
+ <HomepageConfiguration />
+ </section>
+ <SidebarSuggestionsSetting />
+ </>
)}
<StarredProductsPicker />
</div>
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/NavPrimaryLinks.tsx b/frontend/src/layout/panel-layout/navbar/tabs/NavPrimaryLinks.tsx
deleted file mode 100644
index 6af92a4c6ee1..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/NavPrimaryLinks.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import { useActions, useValues } from 'kea'
-import { router } from 'kea-router'
-
-import { IconClock, IconGear, IconHome, IconNotification } from '@posthog/icons'
-
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
-import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
-import { urls } from 'scenes/urls'
-
-import { navigationLogic } from '~/layout/navigation/navigationLogic'
-import { NavLink } from '~/layout/panel-layout/navbar/NavLink'
-import { NavLinkSideActionButton } from '~/layout/panel-layout/navbar/NavLinkSideActionButton'
-import { panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
-import { uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-import { ActivityTab } from '~/types'
-
-export function NavPrimaryLinks(): JSX.Element {
- const { isLayoutNavCollapsed } = useValues(panelLayoutLogic)
- const { isSidebarItemShown, uiCustomizationEnabled } = useValues(uiCustomizationLogic)
- const { showConfigureHomeModal } = useActions(navigationLogic)
- const { reportNavItemClicked } = useActions(eventUsageLogic)
- const isProductAutonomyEnabled = useFeatureFlag('PRODUCT_AUTONOMY')
-
- return (
- <>
- {isSidebarItemShown('home') && (
- <NavLink
- to={urls.projectRoot()}
- label="Home"
- icon={<IconHome />}
- isCollapsed={isLayoutNavCollapsed}
- data-attr="nav-item-home"
- onClick={() => reportNavItemClicked('home', 'primary')}
- sideAction={
- <NavLinkSideActionButton
- icon={<IconGear />}
- tooltip="Configure home"
- data-attr="nav-configure-home"
- onClick={(e) => {
- e.stopPropagation()
- if (uiCustomizationEnabled) {
- router.actions.push(urls.settings('user-navigation', 'homepage'))
- } else {
- showConfigureHomeModal()
- }
- }}
- />
- }
- />
- )}
-
- {isProductAutonomyEnabled && isSidebarItemShown('inbox') && (
- <NavLink
- to={urls.inbox()}
- label="Self-driving"
- icon={<IconNotification />}
- isCollapsed={isLayoutNavCollapsed}
- data-attr="nav-item-inbox"
- onClick={() => reportNavItemClicked('inbox', 'primary')}
- />
- )}
-
- <NavLink
- to={urls.activity(ActivityTab.ExploreEvents)}
- label="Activity"
- icon={<IconClock />}
- isCollapsed={isLayoutNavCollapsed}
- data-attr="nav-item-activity"
- onClick={() => reportNavItemClicked('activity', 'primary')}
- />
- </>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/NavTabBrowse.tsx b/frontend/src/layout/panel-layout/navbar/tabs/NavTabBrowse.tsx
deleted file mode 100644
index d14053567f1f..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/NavTabBrowse.tsx
+++ /dev/null
@@ -1,440 +0,0 @@
-import { useActions, useValues } from 'kea'
-import posthog from 'posthog-js'
-import { Fragment } from 'react'
-
-import {
- IconApps,
- IconCheck,
- IconChevronRight,
- IconClock,
- IconDatabase,
- IconFolder,
- IconFolderOpen,
- IconGear,
- IconPencil,
- IconStar,
-} from '@posthog/icons'
-import { Tooltip } from '@posthog/lemon-ui'
-
-import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows'
-import { Link } from 'lib/lemon-ui/Link'
-import { Spinner } from 'lib/lemon-ui/Spinner/Spinner'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { Collapsible } from 'lib/ui/Collapsible/Collapsible'
-import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator } from 'lib/ui/DropdownMenu/DropdownMenu'
-import { LinkListItem } from 'lib/ui/LinkListItem/LinkListItem'
-import { cn } from 'lib/utils/css-classes'
-import { humanFriendlyDetailedTime } from 'lib/utils/datetime'
-import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
-import { removeProjectIdIfPresent } from 'lib/utils/kea-router'
-import { urls } from 'scenes/urls'
-
-import { PanelLayoutNavIdentifier, panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
-import { customProductsLogic } from '~/layout/panel-layout/ProjectTree/customProductsLogic'
-import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { ProjectTree } from '~/layout/panel-layout/ProjectTree/ProjectTree'
-import { projectTreeDataLogic } from '~/layout/panel-layout/ProjectTree/projectTreeDataLogic'
-import { joinPath, splitPath, unescapePath } from '~/layout/panel-layout/ProjectTree/utils'
-import { SidebarItemKey, uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-import { FileSystemEntry, FileSystemIconType } from '~/queries/schema/schema-general'
-
-import { BrowserLikeMenuItems } from '../../ProjectTree/menus/BrowserLikeMenuItems'
-import { PanelIndicatorIcon, SectionTrigger } from '../NavBar'
-import { editProductsLogic } from './editProductsLogic'
-import { NavPrimaryLinks } from './NavPrimaryLinks'
-import { navRecentsLogic } from './navRecentsLogic'
-
-const panelTriggerItems: {
- identifier: PanelLayoutNavIdentifier
- configKey: SidebarItemKey
- label: string
- icon: React.ReactNode
-}[] = [
- {
- identifier: 'DataAndPeople',
- configKey: 'data',
- label: 'Data',
- icon: <IconDatabase />,
- },
- {
- identifier: 'Project',
- configKey: 'files',
- label: 'Files',
- icon: <IconFolderOpen className="stroke-[1.2]" />,
- },
- {
- identifier: 'Products',
- configKey: 'tools',
- label: 'Products',
- icon: <IconApps />,
- },
- {
- identifier: 'Shortcuts',
- configKey: 'starred',
- label: 'Starred',
- icon: <IconStar />,
- },
-]
-
-function getItemName(item: FileSystemEntry): string {
- const pathSplit = splitPath(item.path)
- const lastPart = pathSplit.pop()
- return unescapePath(lastPart ?? item.path)
-}
-
-function formatRelativeDate(dateStr: string | null | undefined): string {
- if (!dateStr) {
- return ''
- }
- const date = new Date(dateStr)
- if (isNaN(date.getTime())) {
- return ''
- }
- const now = new Date()
- const diffMs = now.getTime() - date.getTime()
- const diffMins = Math.floor(diffMs / 60000)
- if (diffMins < 1) {
- return 'now'
- }
- if (diffMins < 60) {
- return `${diffMins}m`
- }
- const diffHours = Math.floor(diffMins / 60)
- if (diffHours < 24) {
- return `${diffHours}h`
- }
- const diffDays = Math.floor(diffHours / 24)
- if (diffDays < 30) {
- return `${diffDays}d`
- }
- const diffMonths = Math.floor(diffDays / 30)
- return `${diffMonths}mo`
-}
-
-function useStarredState(item: FileSystemEntry): {
- isAlreadyStarred: boolean
- addShortcutItem: (item: FileSystemEntry) => void
-} {
- const { addShortcutItem } = useActions(projectTreeDataLogic)
- const { shortcutNonFolderPaths } = useValues(projectTreeDataLogic)
- const shortcutPath = joinPath([splitPath(item.path).pop() ?? 'Unnamed'])
- return { isAlreadyStarred: shortcutNonFolderPaths.has(shortcutPath), addShortcutItem }
-}
-
-function AddToStarredDropdownAction({ item }: { item: FileSystemEntry }): JSX.Element {
- const { isAlreadyStarred, addShortcutItem } = useStarredState(item)
-
- if (isAlreadyStarred) {
- return (
- <DropdownMenuGroup>
- <BrowserLikeMenuItems MenuItem={DropdownMenuItem} href={item.href ?? ''} />
- <DropdownMenuSeparator />
- <DropdownMenuItem asChild disabled>
- <ButtonPrimitive menuItem disabled>
- <IconStar className="size-4 text-tertiary" />
- Already starred
- </ButtonPrimitive>
- </DropdownMenuItem>
- </DropdownMenuGroup>
- )
- }
-
- return (
- <DropdownMenuGroup>
- <BrowserLikeMenuItems MenuItem={DropdownMenuItem} href={item.href ?? ''} />
- <DropdownMenuSeparator />
-
- <DropdownMenuItem asChild>
- <ButtonPrimitive menuItem onClick={() => addShortcutItem(item)}>
- <IconStar className="size-4 text-tertiary" />
- Add to starred
- </ButtonPrimitive>
- </DropdownMenuItem>
- </DropdownMenuGroup>
- )
-}
-
-export function NavTabBrowse(): JSX.Element {
- const { showLayoutPanel, setActivePanelIdentifier, clearActivePanelIdentifier, toggleNavSection } =
- useActions(panelLayoutLogic)
- const {
- isLayoutPanelVisible,
- isLayoutNavCollapsed,
- expandedNavSections,
- activePanelIdentifier,
- activePanelIdentifierFromUrlAiFirst,
- pathname,
- } = useValues(panelLayoutLogic)
- const { recentItems, recentItemsLoading } = useValues(navRecentsLogic)
- const { isSidebarSectionShown, isSidebarItemShown, uiCustomizationEnabled } = useValues(uiCustomizationLogic)
- const { enabledProductPaths } = useValues(customProductsLogic)
- // Flag-off path: the pre-customization edit mode and home modal.
- const { isEditMode, checkedProducts } = useValues(editProductsLogic)
- const { enterEditMode, saveAndExitEditMode, toggleProduct } = useActions(editProductsLogic)
- const { reportNavItemClicked } = useActions(eventUsageLogic)
- const currentPath = removeProjectIdIfPresent(pathname)
-
- function handlePanelTriggerClick(item: PanelLayoutNavIdentifier): void {
- const isOpening = activePanelIdentifier !== item
- posthog.capture('nav panel trigger clicked', { panel: item, is_open: isOpening })
- if (isOpening) {
- setActivePanelIdentifier(item)
- showLayoutPanel(true)
- } else {
- clearActivePanelIdentifier()
- showLayoutPanel(false)
- }
- }
-
- return (
- <ScrollableShadows
- className="flex-1"
- innerClassName="overflow-y-auto overflow-x-hidden px-2 focus-visible:outline-accent -outline-offset-2"
- direction="vertical"
- styledScrollbars
- >
- <Collapsible
- open={expandedNavSections.project || isLayoutNavCollapsed ? true : false}
- onOpenChange={() => {
- posthog.capture('nav section toggled', {
- section: 'project',
- is_open: !expandedNavSections.project,
- })
- toggleNavSection('project')
- }}
- data-attr="nav-section-project"
- >
- {!isLayoutNavCollapsed && (
- <SectionTrigger icon={<IconFolder />} label="Project" isCollapsed={isLayoutNavCollapsed} />
- )}
- <Collapsible.Panel className={cn('pl-2 pt-1', isLayoutNavCollapsed && 'items-center pl-0')}>
- <NavPrimaryLinks />
-
- <div className={cn('flex flex-col gap-px', isLayoutNavCollapsed && 'items-center')}>
- {panelTriggerItems
- // Starred only joined the trigger list with customization; keep the old layout without it.
- .filter((item) => uiCustomizationEnabled || item.configKey !== 'starred')
- .filter((item) => isSidebarItemShown(item.configKey))
- .map((item) => {
- const isActive =
- activePanelIdentifier === item.identifier ||
- activePanelIdentifierFromUrlAiFirst === item.identifier
- const tooltip = isLayoutNavCollapsed
- ? isLayoutPanelVisible && activePanelIdentifier === item.identifier
- ? `Close ${item.label.toLowerCase()}`
- : `Open ${item.label.toLowerCase()}`
- : undefined
-
- return (
- <Fragment key={item.identifier}>
- <ButtonPrimitive
- active={isActive}
- className="group -outline-offset-2"
- menuItem={!isLayoutNavCollapsed}
- iconOnly={isLayoutNavCollapsed}
- tooltip={tooltip}
- tooltipPlacement="right"
- onClick={() => handlePanelTriggerClick(item.identifier)}
- data-attr={`menu-item-${item.identifier.toLowerCase()}`}
- >
- <span
- className={cn(
- 'relative size-4 text-secondary group-hover:text-primary opacity-50 group-hover:opacity-100 transition-all duration-50',
- isActive && 'text-primary opacity-100'
- )}
- >
- {item.icon}
-
- <PanelIndicatorIcon />
- </span>
- {!isLayoutNavCollapsed && (
- <>
- <span
- className={cn(
- 'truncate text-secondary group-hover:text-primary',
- isActive && 'text-primary'
- )}
- >
- {item.label}
- </span>
- <span className="ml-auto pr-1">
- <IconChevronRight
- className={cn(
- 'size-3 text-secondary opacity-50 group-hover:opacity-100 transition-all duration-50',
- isActive && 'opacity-100'
- )}
- />
- </span>
- </>
- )}
- </ButtonPrimitive>
- </Fragment>
- )
- })}
- </div>
- </Collapsible.Panel>
- </Collapsible>
-
- {!isLayoutNavCollapsed && isSidebarSectionShown('recents') && (
- <Collapsible
- open={expandedNavSections.recents ?? false}
- onOpenChange={() => {
- posthog.capture('nav section toggled', {
- section: 'recents',
- is_open: !expandedNavSections.recents,
- })
- toggleNavSection('recents')
- }}
- className="mt-[var(--nav-section-gap,0.5rem)] group/colorful-product-icons colorful-product-icons-true"
- data-attr="nav-section-recents"
- >
- <SectionTrigger icon={<IconClock />} label="Recents" isCollapsed={isLayoutNavCollapsed} />
- <Collapsible.Panel className="pl-2">
- {recentItemsLoading && recentItems.length === 0 ? (
- <div className="flex items-center justify-center py-2">
- <Spinner className="size-4" />
- </div>
- ) : recentItems.length === 0 ? (
- <span className="text-xs text-tertiary px-2 py-1">No recent items</span>
- ) : (
- recentItems.map((item: FileSystemEntry) => {
- const name = getItemName(item)
- const isActive = item.href ? currentPath === item.href : false
- return (
- <Tooltip title={name} placement="right" key={item.id}>
- <LinkListItem.Root>
- <LinkListItem.Group>
- <Link
- to={item.href}
- buttonProps={{
- menuItem: true,
- active: isActive,
- className: 'group -outline-offset-2 pr-0',
- }}
- data-attr={`nav-recent-item-${item.id}`}
- onClick={() => reportNavItemClicked('recent', 'recents', item.type)}
- >
- <LinkListItem.Content
- icon={iconForType(item.type as FileSystemIconType)}
- title={name}
- meta={
- <span
- title={humanFriendlyDetailedTime(item.last_viewed_at)}
- >
- {formatRelativeDate(item.last_viewed_at)}
- </span>
- }
- />
- </Link>
- <LinkListItem.Trigger />
- </LinkListItem.Group>
- <LinkListItem.Actions>
- <AddToStarredDropdownAction item={item} />
- </LinkListItem.Actions>
- </LinkListItem.Root>
- </Tooltip>
- )
- })
- )}
- </Collapsible.Panel>
- </Collapsible>
- )}
-
- {!isLayoutNavCollapsed && isSidebarSectionShown('my_tools') && (
- <Collapsible
- open={expandedNavSections.tools ?? false}
- onOpenChange={() => {
- posthog.capture('nav section toggled', {
- section: 'tools',
- is_open: !expandedNavSections.tools,
- })
- toggleNavSection('tools')
- }}
- className="mt-[var(--nav-section-gap,0.5rem)] group/colorful-product-icons colorful-product-icons-true"
- data-attr="nav-section-tools"
- >
- <div className="relative">
- <SectionTrigger icon={<IconApps />} label="My products" isCollapsed={isLayoutNavCollapsed} />
- {expandedNavSections.tools &&
- (uiCustomizationEnabled ? (
- <Link
- to={urls.settings('user-navigation')}
- tooltip="Choose which products to show in the sidebar"
- tooltipPlacement="top"
- onClick={() => posthog.capture('nav tools customize clicked')}
- buttonProps={{
- iconOnly: true,
- size: 'xs',
- className:
- 'absolute right-1 top-0 bottom-0 my-auto rounded-[var(--radius)] z-5',
- }}
- data-attr="nav-tools-customize-button"
- >
- <IconGear className="size-3 text-secondary" />
- </Link>
- ) : (
- <ButtonPrimitive
- iconOnly
- size="xs"
- tooltip={isEditMode ? 'Save' : 'Choose which products to show in the sidebar'}
- tooltipPlacement="top"
- onClick={() => {
- if (isEditMode) {
- posthog.capture('nav tools edit saved')
- saveAndExitEditMode()
- } else {
- posthog.capture('nav tools edit toggled', { is_editing: true })
- enterEditMode()
- }
- }}
- data-attr="nav-tools-edit-button"
- className="absolute right-1 top-0 bottom-0 my-auto rounded-[var(--radius)] z-5"
- >
- {isEditMode ? (
- <IconCheck className="size-3 text-primary" />
- ) : (
- <IconPencil className="size-3 text-secondary" />
- )}
- </ButtonPrimitive>
- ))}
- </div>
- <Collapsible.Panel className="-ml-2 pl-3 pr-1 w-[calc(100%+(var(--spacing)*4))]">
- {!(expandedNavSections.tools ?? false) ? null : uiCustomizationEnabled &&
- enabledProductPaths.size === 0 ? (
- // Without this the section header opens onto nothing, reading as broken
- // rather than as "you haven't picked any products yet".
- <span className="text-xs text-tertiary px-2 py-1 block">No products shown</span>
- ) : (
- <ProjectTree
- root={!uiCustomizationEnabled && isEditMode ? 'products://' : 'custom-products://'}
- onItemClicked={(item) => {
- // In edit mode a row click toggles a checkbox, which is not navigation
- if (!uiCustomizationEnabled && isEditMode) {
- return
- }
-
- reportNavItemClicked(item?.record?.path ?? 'unknown', 'tools')
- }}
- onlyTree
- treeSize={isLayoutNavCollapsed ? 'narrow' : 'default'}
- selectModeOverride={!uiCustomizationEnabled && isEditMode ? 'multi' : undefined}
- checkedItemsOverride={
- !uiCustomizationEnabled && isEditMode ? checkedProducts : undefined
- }
- onItemCheckedOverride={
- !uiCustomizationEnabled && isEditMode
- ? (id) => {
- // Tree item IDs for products:// are "products/{path}"
- const productPath = id.replace(/^products\//, '')
- toggleProduct(productPath)
- }
- : undefined
- }
- />
- )}
- </Collapsible.Panel>
- </Collapsible>
- )}
- </ScrollableShadows>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/NavTabChat.tsx b/frontend/src/layout/panel-layout/navbar/tabs/NavTabChat.tsx
index 500606985071..7a37256de30c 100644
--- a/frontend/src/layout/panel-layout/navbar/tabs/NavTabChat.tsx
+++ b/frontend/src/layout/panel-layout/navbar/tabs/NavTabChat.tsx
@@ -167,11 +167,9 @@ function LoadTasksError({ onRetry }: { onRetry: () => void }): JSX.Element {
const ConversationRow = memo(function ConversationRow({
item,
active,
- onItemClick,
}: {
item: Extract<AiHistoryItem, { kind: 'conversation' }>
active: boolean
- onItemClick?: () => void
}): JSX.Element {
const href = AiChatListItem.getHref(item.conversation.id)
return (
@@ -194,7 +192,6 @@ const ConversationRow = memo(function ConversationRow({
onClick={(e) => {
e.preventDefault()
router.actions.push(href)
- onItemClick?.()
}}
>
<AiChatListItem.Content
@@ -216,11 +213,9 @@ const ConversationRow = memo(function ConversationRow({
const TaskRow = memo(function TaskRow({
item,
active,
- onItemClick,
}: {
item: Extract<AiHistoryItem, { kind: 'task' }>
active: boolean
- onItemClick?: () => void
}): JSX.Element {
const href = TaskListItem.getHref(item.task.id)
return (
@@ -243,7 +238,6 @@ const TaskRow = memo(function TaskRow({
onClick={(e) => {
e.preventDefault()
router.actions.push(href)
- onItemClick?.()
}}
>
<TaskListItem.Content task={item.task} />
@@ -258,14 +252,7 @@ const TaskRow = memo(function TaskRow({
)
})
-export function NavTabChat({
- inPanel = false,
- onItemClick,
-}: {
- inPanel?: boolean
- onItemClick?: () => void
-}): JSX.Element {
- // The nav tab and side panel can mount together, so each search input needs a unique id.
+export function NavTabChat(): JSX.Element {
const searchInputId = useId()
const {
conversationHistory,
@@ -336,7 +323,6 @@ export function NavTabChat({
aria-label="Filter chats"
value={inputValue}
onChange={setInputValue}
- autoFocus={inPanel}
fullWidth
data-attr="nav-chat-search"
prefix={
@@ -399,14 +385,12 @@ export function NavTabChat({
!selectedTaskId &&
item.conversation.id === currentConversationId
}
- onItemClick={onItemClick}
/>
) : (
<TaskRow
key={item.key}
item={item}
active={item.task.id === selectedTaskId}
- onItemClick={onItemClick}
/>
)
}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/SidebarSuggestionsSetting.tsx b/frontend/src/layout/panel-layout/navbar/tabs/SidebarSuggestionsSetting.tsx
new file mode 100644
index 000000000000..1d4632e9ff63
--- /dev/null
+++ b/frontend/src/layout/panel-layout/navbar/tabs/SidebarSuggestionsSetting.tsx
@@ -0,0 +1,32 @@
+import { useActions, useValues } from 'kea'
+import posthog from 'posthog-js'
+
+import { LemonSwitch } from '@posthog/lemon-ui'
+
+import { userLogic } from 'scenes/userLogic'
+
+export function SidebarSuggestionsSetting(): JSX.Element {
+ const { user, userLoading } = useValues(userLogic)
+ const { updateUser } = useActions(userLogic)
+
+ return (
+ <section className="flex flex-col gap-2">
+ <LemonSwitch
+ checked={user?.allow_sidebar_suggestions ?? false}
+ loading={userLoading}
+ onChange={(checked) => {
+ posthog.capture('sidebar suggestions toggled', { enabled: checked })
+ updateUser({ allow_sidebar_suggestions: checked })
+ }}
+ label="Suggest products as I use PostHog"
+ bordered
+ fullWidth
+ data-attr="customize-sidebar-suggestions-toggle"
+ />
+ <p className="text-xs text-secondary mb-0">
+ When you start using a product, we star it in your sidebar. We also show suggestions for related
+ products.
+ </p>
+ </section>
+ )
+}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/editProductsLogic.ts b/frontend/src/layout/panel-layout/navbar/tabs/editProductsLogic.ts
deleted file mode 100644
index 932f0009ffa0..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/editProductsLogic.ts
+++ /dev/null
@@ -1,167 +0,0 @@
-import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'
-
-import { lemonToast } from '@posthog/lemon-ui'
-
-import api from 'lib/api'
-
-import { customProductsLogic } from '~/layout/panel-layout/ProjectTree/customProductsLogic'
-import { getItemId } from '~/layout/panel-layout/ProjectTree/utils'
-import { UserProductListItem } from '~/queries/schema/schema-general'
-
-const PRODUCTS_ROOT = 'products://'
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface editProductsLogicValues {
- customProducts: UserProductListItem[] // customProductsLogic
- checkedProducts: Record<string, boolean>
- isEditMode: boolean
- localToggles: Record<string, boolean>
- selectedPaths: Set<string>
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface editProductsLogicActions {
- loadCustomProducts: () => any // customProductsLogic
- loadCustomProductsSuccess: (
- customProducts: UserProductListItem[],
- payload?: any
- ) => {
- customProducts: UserProductListItem[]
- payload?: any
- } // customProductsLogic
- enterEditMode: () => {
- value: true
- }
- saveAndExitEditMode: () => {
- value: true
- }
- setLocalToggles: (toggles: Record<string, boolean>) => {
- toggles: Record<string, boolean>
- }
- toggleProduct: (productPath: string) => {
- productPath: string
- }
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface editProductsLogicMeta {
- __keaTypeGenInternalSelectorTypes: {
- selectedPaths: (customProducts: UserProductListItem[]) => Set<string>
- checkedProducts: (
- customProducts: UserProductListItem[],
- localToggles: Record<string, boolean>
- ) => Record<string, boolean>
- }
-}
-
-export type editProductsLogicType = MakeLogicType<
- editProductsLogicValues,
- editProductsLogicActions,
- Record<string, any>,
- editProductsLogicMeta
->
-
-export const editProductsLogic = kea<editProductsLogicType>([
- path(['layout', 'panel-layout', 'ai-first', 'tabs', 'editProductsLogic']),
- connect(() => ({
- values: [customProductsLogic, ['customProducts']],
- actions: [customProductsLogic, ['loadCustomProducts', 'loadCustomProductsSuccess']],
- })),
- actions({
- enterEditMode: true,
- saveAndExitEditMode: true,
- toggleProduct: (productPath: string) => ({ productPath }),
- setLocalToggles: (toggles: Record<string, boolean>) => ({ toggles }),
- }),
- reducers({
- isEditMode: [
- false as boolean,
- {
- enterEditMode: () => true,
- saveAndExitEditMode: () => false,
- },
- ],
- localToggles: [
- {} as Record<string, boolean>,
- {
- enterEditMode: () => ({}),
- setLocalToggles: (_, { toggles }) => toggles,
- },
- ],
- }),
- selectors({
- selectedPaths: [
- (s) => [s.customProducts],
- (customProducts: UserProductListItem[]): Set<string> =>
- new Set(customProducts.map((item: { product_path: string }) => item.product_path)),
- ],
- checkedProducts: [
- (s) => [s.customProducts, s.localToggles],
- (customProducts: UserProductListItem[], localToggles: Record<string, boolean>): Record<string, boolean> => {
- const result: Record<string, boolean> = {}
- for (const item of customProducts) {
- const id = getItemId({ path: item.product_path, type: '' }, PRODUCTS_ROOT)
- result[id] = true
- }
-
- for (const [productPath, enabled] of Object.entries(localToggles)) {
- const id = getItemId({ path: productPath, type: '' }, PRODUCTS_ROOT)
- result[id] = enabled
- }
-
- return result
- },
- ],
- }),
- listeners(({ actions, values }) => ({
- toggleProduct: ({ productPath }) => {
- const serverState = values.selectedPaths.has(productPath)
- const currentState = productPath in values.localToggles ? values.localToggles[productPath] : serverState
- const newState = !currentState
-
- const localToggles = { ...values.localToggles }
- if (newState === serverState) {
- delete localToggles[productPath]
- } else {
- localToggles[productPath] = newState
- }
- actions.setLocalToggles(localToggles)
- },
- saveAndExitEditMode: async () => {
- const toggles = values.localToggles
- const entries = Object.entries(toggles)
-
- if (entries.length > 0) {
- const now = new Date().toISOString()
- const existingPaths = new Set(values.customProducts.map((item) => item.product_path))
- const updated: UserProductListItem[] = values.customProducts.filter(
- (item) => !(item.product_path in toggles) || toggles[item.product_path]
- )
- for (const [productPath, enabled] of entries) {
- if (enabled && !existingPaths.has(productPath)) {
- updated.push({
- id: '',
- product_path: productPath,
- enabled: true,
- created_at: now,
- updated_at: now,
- })
- }
- }
- actions.loadCustomProductsSuccess(updated)
-
- try {
- await api.userProductList.bulkUpdate(
- entries.map(([productPath, enabled]) => ({ product_path: productPath, enabled }))
- )
- } catch (error) {
- console.error('Failed to save product changes:', error)
- lemonToast.error('Failed to save some changes. Try again?')
- // Only refetch to undo the failed save. Refetching on success would race a
- // later save, reverting it on screen; the placeholder fields are never read.
- actions.loadCustomProducts()
- }
- }
- },
- })),
-])
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.scss b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.scss
deleted file mode 100644
index 44a5d2961655..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-.FlatNavBrowse[data-nav-density='compact'] {
- --button-height-base: var(--button-height-xs);
-
- .button-primitive {
- font-size: 0.75rem;
- }
-}
-
-.FlatNavBrowse .show-scrollbar-on-hover::-webkit-scrollbar {
- width: 6px;
- height: 6px;
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.stories.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.stories.tsx
deleted file mode 100644
index fc57774d4812..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.stories.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import type { Meta, StoryObj } from '@storybook/react'
-
-import { FEATURE_FLAGS } from 'lib/constants'
-
-import { FlatNavBrowse } from './FlatNavBrowse'
-
-type Story = StoryObj<typeof FlatNavBrowse>
-
-const meta: Meta<typeof FlatNavBrowse> = {
- title: 'Layout/Flat Nav Browse',
- component: FlatNavBrowse,
- parameters: {
- layout: 'fullscreen',
- viewMode: 'story',
- featureFlags: { [FEATURE_FLAGS.FLAT_NAV]: 'test' },
- },
- render: () => (
- <div className="h-screen w-[var(--project-navbar-width)] flex flex-col">
- <FlatNavBrowse />
- </div>
- ),
-}
-
-export default meta
-
-export const Default: Story = {}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.tsx
deleted file mode 100644
index 902a3900e48d..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavBrowse.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import './FlatNavBrowse.scss'
-
-import { useValues } from 'kea'
-
-import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows'
-import { cn } from 'lib/utils/css-classes'
-
-import { panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
-import { uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-
-import { NavPrimaryLinks } from '../NavPrimaryLinks'
-import { FlatNavPanelButtons } from './FlatNavPanelButtons'
-import { FlatNavProducts } from './FlatNavProducts'
-import { FlatNavRecents } from './FlatNavRecents'
-
-export function FlatNavBrowse(): JSX.Element {
- const { isLayoutNavCollapsed } = useValues(panelLayoutLogic)
- const { sidebarDensity, isSidebarSectionShown } = useValues(uiCustomizationLogic)
-
- return (
- <div className="FlatNavBrowse flex flex-col flex-1 overflow-hidden" data-nav-density={sidebarDensity}>
- <ScrollableShadows
- className="flex-1"
- innerClassName="overflow-y-auto overflow-x-hidden pl-2 pr-0.5 pt-1 focus-visible:outline-accent -outline-offset-2"
- direction="vertical"
- styledScrollbars
- >
- <div className={cn('flex flex-col gap-px', isLayoutNavCollapsed && 'items-center')}>
- <NavPrimaryLinks />
-
- <FlatNavPanelButtons />
- </div>
-
- {!isLayoutNavCollapsed && isSidebarSectionShown('recents') && <FlatNavRecents />}
- {!isLayoutNavCollapsed && isSidebarSectionShown('my_tools') && <FlatNavProducts />}
- </ScrollableShadows>
- </div>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavPanelButtons.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavPanelButtons.tsx
deleted file mode 100644
index e36125a8fac1..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavPanelButtons.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-import { useActions, useValues } from 'kea'
-import posthog from 'posthog-js'
-
-import { IconApps, IconChevronRight, IconDatabase, IconFolderOpen, IconStar } from '@posthog/icons'
-
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { cn } from 'lib/utils/css-classes'
-
-import { PanelLayoutNavIdentifier, panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
-import { SidebarItemKey, uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-
-import { PanelIndicatorIcon } from '../../NavBar'
-
-const PANEL_TRIGGER_ITEMS: {
- identifier: PanelLayoutNavIdentifier
- configKey: SidebarItemKey
- label: string
- icon: React.ReactNode
-}[] = [
- { identifier: 'DataAndPeople', configKey: 'data', label: 'Data', icon: <IconDatabase /> },
- { identifier: 'Project', configKey: 'files', label: 'Files', icon: <IconFolderOpen className="stroke-[1.2]" /> },
- { identifier: 'Products', configKey: 'tools', label: 'Products', icon: <IconApps /> },
- { identifier: 'Shortcuts', configKey: 'starred', label: 'Starred', icon: <IconStar /> },
-]
-
-export function FlatNavPanelButtons(): JSX.Element {
- const { showLayoutPanel, setActivePanelIdentifier, clearActivePanelIdentifier } = useActions(panelLayoutLogic)
- const { isLayoutPanelVisible, isLayoutNavCollapsed, activePanelIdentifier, activePanelIdentifierFromUrlAiFirst } =
- useValues(panelLayoutLogic)
- const { isSidebarItemShown } = useValues(uiCustomizationLogic)
-
- function handlePanelTriggerClick(item: PanelLayoutNavIdentifier): void {
- const isOpening = activePanelIdentifier !== item
- posthog.capture('nav panel trigger clicked', { panel: item, is_open: isOpening })
- if (isOpening) {
- setActivePanelIdentifier(item)
- showLayoutPanel(true)
- } else {
- clearActivePanelIdentifier()
- showLayoutPanel(false)
- }
- }
-
- return (
- <>
- {PANEL_TRIGGER_ITEMS.filter((item) => isSidebarItemShown(item.configKey)).map((item) => {
- const isActive =
- activePanelIdentifier === item.identifier || activePanelIdentifierFromUrlAiFirst === item.identifier
- const tooltip = isLayoutNavCollapsed
- ? isLayoutPanelVisible && activePanelIdentifier === item.identifier
- ? `Close ${item.label.toLowerCase()}`
- : `Open ${item.label.toLowerCase()}`
- : undefined
-
- return (
- <ButtonPrimitive
- key={item.identifier}
- active={isActive}
- className="group -outline-offset-2"
- menuItem={!isLayoutNavCollapsed}
- iconOnly={isLayoutNavCollapsed}
- tooltip={tooltip}
- tooltipPlacement="right"
- onClick={() => handlePanelTriggerClick(item.identifier)}
- data-attr={`menu-item-${item.identifier.toLowerCase()}`}
- >
- <span
- className={cn(
- 'relative size-4 text-secondary group-hover:text-primary opacity-50 group-hover:opacity-100 transition-all duration-50',
- isActive && 'text-primary opacity-100'
- )}
- >
- {item.icon}
- <PanelIndicatorIcon />
- </span>
- {!isLayoutNavCollapsed && (
- <>
- <span
- className={cn(
- 'truncate text-secondary group-hover:text-primary',
- isActive && 'text-primary'
- )}
- >
- {item.label}
- </span>
- <span className="ml-auto pr-1">
- <IconChevronRight
- className={cn(
- 'size-3 text-secondary opacity-50 group-hover:opacity-100 transition-all duration-50',
- isActive && 'opacity-100'
- )}
- />
- </span>
- </>
- )}
- </ButtonPrimitive>
- )
- })}
- </>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavProducts.test.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavProducts.test.tsx
deleted file mode 100644
index 9ddeaa199007..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavProducts.test.tsx
+++ /dev/null
@@ -1,98 +0,0 @@
-import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'
-
-import { fireEvent, render, waitFor } from '@testing-library/react'
-import { router } from 'kea-router'
-
-import { newDashboardLogic } from 'scenes/dashboard/newDashboardLogic'
-import { urls } from 'scenes/urls'
-
-import { useMocks } from '~/mocks/jest'
-import { UserProductListItem } from '~/queries/schema/schema-general'
-import { initKeaTests } from '~/test/init'
-import { AppContext, TeamType } from '~/types'
-
-import { FlatNavProducts } from './FlatNavProducts'
-
-const productRow = (productPath: string): UserProductListItem => ({
- id: `id-${productPath}`,
- product_path: productPath,
- enabled: true,
- created_at: '2026-01-01T00:00:00Z',
- updated_at: '2026-01-01T00:00:00Z',
-})
-
-function renderedProductRow(container: HTMLElement, slug: string): HTMLElement {
- const row = container.querySelector<HTMLElement>(`[data-attr="flat-nav-tool-${slug}"]`)
- if (!row) {
- throw new Error(`No flat-nav row rendered for "${slug}"`)
- }
- return row
-}
-
-describe('FlatNavProducts', () => {
- beforeEach(() => {
- useMocks({
- get: {
- '/api/projects/:team_id/conversations/tickets/unread_count': () => [200, { count: 3 }],
- },
- })
- // customProductsLogic seeds the picked products from the page context rather than fetching them
- window.POSTHOG_APP_CONTEXT = {
- ...window.POSTHOG_APP_CONTEXT,
- custom_products: [
- productRow('Support'),
- productRow('Feature flags'),
- productRow('Dashboards'),
- productRow('Product analytics'),
- productRow('Session replay'),
- ],
- } as AppContext
- initKeaTests(true, { ...MOCK_DEFAULT_TEAM, conversations_enabled: true } as TeamType)
- })
-
- // customIconRegistry is the only thing that puts Support's unread count in the sidebar. A row
- // that falls back to the static product icon loses the count and shows no other symptom.
- it.each<[string, string | null]>([
- ['support', '3'],
- ['feature-flags', null],
- ])('renders the icon that the %s row resolves to', async (slug, expectedCount) => {
- const { container } = render(<FlatNavProducts />)
-
- await waitFor(() => {
- const row = renderedProductRow(container, slug)
- expect(row.querySelector('.LemonBadge')?.textContent ?? null).toBe(expectedCount)
- expect(row.querySelector('svg')).not.toBeNull()
- })
- })
-
- // The inline menus are keyed by product path, so a path that stops matching silently drops
- // the button from the row
- it.each<[string, string | null]>([
- ['dashboards', 'flat-nav-tool-menu-dashboards'],
- ['product-analytics', 'flat-nav-tool-menu-insight'],
- ['session-replay', 'flat-nav-tool-menu-session-replay'],
- ['feature-flags', null],
- ])('renders the inline menu button the %s row resolves to', async (slug, menuAttr) => {
- const { container } = render(<FlatNavProducts />)
-
- await waitFor(() => {
- const row = renderedProductRow(container, slug)
- const menuButton = row.parentElement?.querySelector('[data-attr^="flat-nav-tool-menu-"]')
- expect(menuButton?.getAttribute('data-attr') ?? null).toBe(menuAttr)
- })
- })
-
- // The dashboards list scene mounts only after the navigation, so the modal opens from the URL alone
- it('opens the new dashboard modal from another page', async () => {
- router.actions.push(urls.currentProject(urls.insights()))
- const { container, findByText } = render(<FlatNavProducts />)
-
- await waitFor(() => renderedProductRow(container, 'dashboards'))
- fireEvent.click(container.querySelector('[data-attr="flat-nav-tool-menu-dashboards"]')!)
- fireEvent.click(await findByText('New dashboard'))
-
- expect(router.values.location.pathname).toBe(urls.currentProject(urls.dashboards()))
- newDashboardLogic.mount()
- expect(newDashboardLogic.values.newDashboardModalVisible).toBe(true)
- })
-})
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavProducts.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavProducts.tsx
deleted file mode 100644
index ba403a9dc83e..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavProducts.tsx
+++ /dev/null
@@ -1,126 +0,0 @@
-import { useActions, useValues } from 'kea'
-import posthog from 'posthog-js'
-import { Fragment } from 'react'
-
-import { IconChevronDown, IconGear, IconPlusSmall } from '@posthog/icons'
-
-import { Link } from 'lib/lemon-ui/Link'
-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'
-import { WrappingLoadingSkeleton } from 'lib/ui/WrappingLoadingSkeleton/WrappingLoadingSkeleton'
-import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
-import { urls } from 'scenes/urls'
-
-import { getCustomIcon } from '~/layout/panel-layout/ProjectTree/customIconRegistry'
-import { ProductIconWrapper, iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-
-import { NavLink } from '../../NavLink'
-import { flatNavLogic } from './flatNavLogic'
-import { FlatNavSection } from './FlatNavSection'
-import { FlatNavDashboardsMenuItems } from './menus/FlatNavDashboardsMenuItems'
-import { FlatNavProductAnalyticsMenuItems } from './menus/FlatNavProductAnalyticsMenuItems'
-import { FlatNavProductMenu } from './menus/FlatNavProductMenu'
-import { FlatNavSessionReplayMenuItems } from './menus/FlatNavSessionReplayMenuItems'
-
-// Keyed by product path, the same key the picked-products list stores
-const PRODUCT_MENUS: Record<string, JSX.Element> = {
- 'Product analytics': (
- <FlatNavProductMenu icon={<IconPlusSmall />} tooltip="New insight" data-attr="flat-nav-tool-menu-insight">
- <FlatNavProductAnalyticsMenuItems />
- </FlatNavProductMenu>
- ),
- Dashboards: (
- <FlatNavProductMenu
- icon={<IconPlusSmall />}
- tooltip="New dashboard and pinned dashboards"
- data-attr="flat-nav-tool-menu-dashboards"
- >
- <FlatNavDashboardsMenuItems />
- </FlatNavProductMenu>
- ),
- 'Session replay': (
- <FlatNavProductMenu
- icon={<IconChevronDown />}
- tooltip="Saved filters and collections"
- data-attr="flat-nav-tool-menu-session-replay"
- >
- <FlatNavSessionReplayMenuItems />
- </FlatNavProductMenu>
- ),
-}
-
-function slugify(path: string): string {
- return path.toLowerCase().replace(/[^a-z0-9]+/g, '-')
-}
-
-export function FlatNavProducts(): JSX.Element {
- const { productGroups, customProductsLoading } = useValues(flatNavLogic)
- const { reportNavItemClicked } = useActions(eventUsageLogic)
-
- return (
- <FlatNavSection
- label="My products"
- action={
- <Link
- to={urls.settings('user-navigation')}
- tooltip="Choose which products to show in the sidebar"
- tooltipPlacement="top"
- onClick={() => posthog.capture('nav tools customize clicked')}
- buttonProps={{ iconOnly: true, size: 'xs' }}
- data-attr="flat-nav-tools-customize-button"
- >
- <IconGear className="size-3 text-secondary" />
- </Link>
- }
- >
- <div className="flex flex-col gap-px group/colorful-product-icons colorful-product-icons-true">
- {customProductsLoading && productGroups.length === 0 ? (
- Array.from({ length: 4 }).map((_, index) => (
- <WrappingLoadingSkeleton fullWidth key={index}>
- <ButtonPrimitive aria-hidden inert menuItem />
- </WrappingLoadingSkeleton>
- ))
- ) : productGroups.length === 0 ? (
- <span className="text-xs text-tertiary px-2 py-1">
- No products selected. Use the gear icon above to pick some.
- </span>
- ) : (
- productGroups.map((group) => (
- <Fragment key={group.category}>
- {group.category && (
- <div className="not-first:mt-3 py-1 px-2 flex items-center">
- <span className="text-xs font-semibold text-tertiary">{group.category}</span>
- </div>
- )}
- {group.items.map((item) => {
- // A product can register an icon that carries live state, such as the
- // support unread counter. iconForType supplies the color wrapper itself,
- // so a registered icon needs that wrapper added around it.
- const CustomIcon = getCustomIcon(item.type, item.href)
- return (
- <NavLink
- key={item.path}
- to={item.href}
- label={item.label}
- icon={
- CustomIcon ? (
- <ProductIconWrapper type={item.iconType} colorOverride={item.iconColor}>
- <CustomIcon />
- </ProductIconWrapper>
- ) : (
- iconForType(item.iconType, item.iconColor)
- )
- }
- isCollapsed={false}
- data-attr={`flat-nav-tool-${slugify(item.path)}`}
- onClick={() => reportNavItemClicked(item.path, 'tools')}
- sideAction={PRODUCT_MENUS[item.path]}
- />
- )
- })}
- </Fragment>
- ))
- )}
- </div>
- </FlatNavSection>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavRecents.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavRecents.tsx
deleted file mode 100644
index 302de316c7bc..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavRecents.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { NavRecentItems } from '../NavRecentItems'
-import { FlatNavSection } from './FlatNavSection'
-
-export function FlatNavRecents(): JSX.Element {
- return (
- <FlatNavSection label="Recents" info="Items you viewed recently, most recent first.">
- <NavRecentItems />
- </FlatNavSection>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavSection.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavSection.tsx
deleted file mode 100644
index b965f6ca0fc3..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/FlatNavSection.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { IconInfo } from '@posthog/icons'
-import { Tooltip } from '@posthog/lemon-ui'
-
-import { Label } from 'lib/ui/Label/Label'
-
-interface FlatNavSectionProps {
- label: string
- /** Short explanation of the section, shown behind an info icon next to the header. */
- info?: string
- /** Optional small control rendered at the right edge of the section header. */
- action?: React.ReactNode
- children: React.ReactNode
-}
-
-export function FlatNavSection({ label, info, action, children }: FlatNavSectionProps): JSX.Element {
- return (
- <div className="flex flex-col gap-px mt-3">
- <div className="flex items-center justify-between pl-2 pr-1 min-h-5">
- <span className="flex items-center gap-1">
- <Label intent="menu" className="text-xxs text-secondary">
- {label}
- </Label>
- {info && (
- <Tooltip title={info} placement="top">
- <IconInfo className="size-3 text-tertiary" />
- </Tooltip>
- )}
- </span>
- {action}
- </div>
- {children}
- </div>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/flatNavLogic.ts b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/flatNavLogic.ts
deleted file mode 100644
index 13ee61bdcd68..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/flatNavLogic.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-import { MakeLogicType, connect, kea, path, selectors } from 'kea'
-
-import { FeatureFlagsSet, featureFlagLogic } from 'lib/logic/featureFlagLogic'
-import { getProductAccessDisabledReason } from 'lib/utils/accessControlUtils'
-import { isFileSystemImportFlagEnabled } from 'lib/utils/fileSystemImportFlags'
-
-import { customProductsLogic } from '~/layout/panel-layout/ProjectTree/customProductsLogic'
-import { getDefaultTreeProducts } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { getCategoryOrder, splitPath, unescapePath } from '~/layout/panel-layout/ProjectTree/utils'
-import { FileSystemIconType, UserProductListItem } from '~/queries/schema/schema-general'
-import { FileSystemIconColor } from '~/types'
-
-export interface FlatNavProductItem {
- path: string
- label: string
- href: string
- type?: string
- iconType?: FileSystemIconType
- iconColor?: FileSystemIconColor
-}
-
-export interface FlatNavProductGroup {
- category: string
- items: FlatNavProductItem[]
-}
-
-const UNCATEGORIZED_ORDER = 9999
-const UNORDERED_VISUAL_ORDER = 9999
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface flatNavLogicValues {
- customProducts: UserProductListItem[] // customProductsLogic
- customProductsLoading: boolean // customProductsLogic
- featureFlags: FeatureFlagsSet // featureFlagLogic
- productGroups: FlatNavProductGroup[]
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface flatNavLogicMeta {
- __keaTypeGenInternalSelectorTypes: {
- productGroups: (customProducts: UserProductListItem[], featureFlags: FeatureFlagsSet) => FlatNavProductGroup[]
- }
-}
-
-export type flatNavLogicType = MakeLogicType<flatNavLogicValues, {}, Record<string, any>, flatNavLogicMeta>
-
-export const flatNavLogic = kea<flatNavLogicType>([
- path(['layout', 'panel-layout', 'navbar', 'tabs', 'flat-nav', 'flatNavLogic']),
- connect(() => ({
- values: [customProductsLogic, ['customProducts', 'customProductsLoading'], featureFlagLogic, ['featureFlags']],
- })),
- selectors({
- productGroups: [
- (s) => [s.customProducts, s.featureFlags],
- (customProducts: UserProductListItem[], featureFlags: FeatureFlagsSet): FlatNavProductGroup[] => {
- const catalog = new Map(getDefaultTreeProducts().map((product) => [product.path, product]))
- const seenPaths = new Set<string>()
- const selected: (FlatNavProductItem & { category: string; sortOrder: number })[] = []
- for (const { product_path: productPath } of customProducts) {
- if (seenPaths.has(productPath)) {
- continue
- }
- seenPaths.add(productPath)
- const product = catalog.get(productPath)
- if (
- !product?.href ||
- !isFileSystemImportFlagEnabled(product, featureFlags) ||
- // Products the user has no access to are hidden instead of shown disabled
- getProductAccessDisabledReason(product)
- ) {
- continue
- }
- selected.push({
- path: product.path,
- label: product.displayLabel || unescapePath(splitPath(product.path).pop() ?? product.path),
- href: product.href,
- type: product.type,
- iconType: product.iconType ?? (product.type as FileSystemIconType | undefined),
- iconColor: product.iconColor,
- category: product.category ?? '',
- sortOrder: product.visualOrder ?? UNORDERED_VISUAL_ORDER,
- })
- }
- selected.sort(
- (a, b) =>
- (a.category ? getCategoryOrder(a.category) : UNCATEGORIZED_ORDER) -
- (b.category ? getCategoryOrder(b.category) : UNCATEGORIZED_ORDER) ||
- a.category.localeCompare(b.category, undefined, { sensitivity: 'accent' }) ||
- a.sortOrder - b.sortOrder ||
- a.label.localeCompare(b.label, undefined, { sensitivity: 'accent' })
- )
-
- const groups: FlatNavProductGroup[] = []
- for (const { category, sortOrder: _, ...item } of selected) {
- const lastGroup = groups[groups.length - 1]
- if (lastGroup && lastGroup.category === category) {
- lastGroup.items.push(item)
- } else {
- groups.push({ category, items: [item] })
- }
- }
-
- return groups
- },
- ],
- }),
-])
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavDashboardsMenuItems.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavDashboardsMenuItems.tsx
deleted file mode 100644
index 13db69ec013c..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavDashboardsMenuItems.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { useActions, useValues } from 'kea'
-
-import { IconPlusSmall } from '@posthog/icons'
-import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, Skeleton } from '@posthog/quill'
-
-import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
-import { urls } from 'scenes/urls'
-
-import { dashboardsModel } from '~/models/dashboardsModel'
-
-import { FlatNavMenuLinkItem } from './FlatNavMenuLinkItem'
-import { FlatNavProductLinkMenuItems } from './FlatNavProductLinkMenuItems'
-
-export function FlatNavDashboardsMenuItems(): JSX.Element {
- const { pinnedDashboards, dashboardsLoading, loadDashboardsFailed } = useValues(dashboardsModel)
- const { loadDashboardsIfNeeded } = useActions(dashboardsModel)
-
- useOnMountEffect(() => {
- loadDashboardsIfNeeded()
- })
-
- return (
- <>
- <DropdownMenuGroup>
- {/* The same link search uses. The dashboards scene reads the hash when it mounts, so the modal opens from any page */}
- <FlatNavMenuLinkItem
- to={`${urls.dashboards()}#newDashboard=modal`}
- icon={<IconPlusSmall />}
- data-attr="flat-nav-dashboards-menu-new-dashboard"
- >
- New dashboard
- </FlatNavMenuLinkItem>
- </DropdownMenuGroup>
- <DropdownMenuSeparator />
- <DropdownMenuGroup>
- <DropdownMenuLabel>Pinned dashboards</DropdownMenuLabel>
- {/* A failed load leaves dashboardsLoading true for good, so it has to be read first */}
- {loadDashboardsFailed ? (
- <DropdownMenuItem disabled>Couldn't load dashboards</DropdownMenuItem>
- ) : dashboardsLoading ? (
- <Skeleton className="mx-2 my-1 h-4" />
- ) : pinnedDashboards.length === 0 ? (
- <DropdownMenuItem disabled>No pinned dashboards</DropdownMenuItem>
- ) : (
- pinnedDashboards.map((dashboard) => (
- <FlatNavMenuLinkItem
- key={dashboard.id}
- to={urls.dashboard(dashboard.id)}
- data-attr="flat-nav-dashboards-menu-pinned-dashboard"
- >
- {dashboard.name}
- </FlatNavMenuLinkItem>
- ))
- )}
- </DropdownMenuGroup>
- <DropdownMenuSeparator />
- <FlatNavProductLinkMenuItems productPath="Dashboards" href={urls.dashboards()} />
- </>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavMenuLinkItem.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavMenuLinkItem.tsx
deleted file mode 100644
index a13153113780..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavMenuLinkItem.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Button, DropdownMenuItem } from '@posthog/quill'
-
-import { LinkPrimitive } from 'lib/lemon-ui/Link'
-
-interface FlatNavMenuLinkItemProps {
- to?: string
- icon?: React.ReactNode
- 'data-attr'?: string
- children: React.ReactNode
-}
-
-export function FlatNavMenuLinkItem({
- to,
- icon,
- 'data-attr': dataAttr,
- children,
-}: FlatNavMenuLinkItemProps): JSX.Element {
- return (
- <DropdownMenuItem render={<Button size="row" left render={<LinkPrimitive to={to} />} />} data-attr={dataAttr}>
- {icon}
- <span className="truncate">{children}</span>
- </DropdownMenuItem>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductAnalyticsMenuItems.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductAnalyticsMenuItems.tsx
deleted file mode 100644
index 16e89b4593d9..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductAnalyticsMenuItems.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { useValues } from 'kea'
-
-import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel } from '@posthog/quill'
-
-import { projectTreeDataLogic } from '~/layout/panel-layout/ProjectTree/projectTreeDataLogic'
-
-import { FlatNavMenuLinkItem } from './FlatNavMenuLinkItem'
-
-export function FlatNavProductAnalyticsMenuItems(): JSX.Element {
- const { treeItemsNew } = useValues(projectTreeDataLogic)
-
- const insightTypes = [...(treeItemsNew.find(({ name }) => name === 'Insight')?.children ?? [])].sort(
- (a, b) => (a.visualOrder ?? 0) - (b.visualOrder ?? 0)
- )
-
- return (
- <DropdownMenuGroup>
- <DropdownMenuLabel>Create new insight type</DropdownMenuLabel>
- {insightTypes.length === 0 ? (
- <DropdownMenuItem disabled>No insight types available</DropdownMenuItem>
- ) : (
- insightTypes.map((insightType) => (
- <FlatNavMenuLinkItem
- key={insightType.id}
- to={insightType.record?.href}
- icon={insightType.icon}
- data-attr="flat-nav-insight-menu-new-insight"
- >
- {insightType.name}
- </FlatNavMenuLinkItem>
- ))
- )}
- </DropdownMenuGroup>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductLinkMenuItems.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductLinkMenuItems.tsx
deleted file mode 100644
index 3fd8de87a4a7..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductLinkMenuItems.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { useActions } from 'kea'
-
-import { DropdownMenuGroup, DropdownMenuItem } from '@posthog/quill'
-
-import { copyToClipboard } from 'lib/utils/copyToClipboard'
-import { urls } from 'scenes/urls'
-
-import { customProductsLogic } from '~/layout/panel-layout/ProjectTree/customProductsLogic'
-
-interface FlatNavProductLinkMenuItemsProps {
- productPath: string
- href: string
-}
-
-/** The items every product row offers in the tree sidebar menu, for products that also have their own menu. */
-export function FlatNavProductLinkMenuItems({ productPath, href }: FlatNavProductLinkMenuItemsProps): JSX.Element {
- const { setProductEnabled } = useActions(customProductsLogic)
- const absoluteUrl = urls.absolute(urls.currentProject(href))
-
- return (
- <DropdownMenuGroup>
- <DropdownMenuItem
- onClick={() => window.open(absoluteUrl, '_blank')}
- data-attr="flat-nav-menu-open-in-new-tab"
- >
- Open link in new browser tab
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={() => void copyToClipboard(absoluteUrl, 'link')}
- data-attr="flat-nav-menu-copy-link"
- >
- Copy link address
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={() => setProductEnabled(productPath, false)}
- data-attr="flat-nav-menu-remove-from-sidebar"
- >
- Remove from sidebar
- </DropdownMenuItem>
- </DropdownMenuGroup>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductMenu.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductMenu.tsx
deleted file mode 100644
index 8093752c9f68..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavProductMenu.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@posthog/quill'
-
-import { NavLinkSideActionButton } from '../../../NavLinkSideActionButton'
-
-interface FlatNavProductMenuProps {
- icon: React.ReactNode
- tooltip: string
- 'data-attr': string
- children: React.ReactNode
-}
-
-export function FlatNavProductMenu({
- icon,
- tooltip,
- 'data-attr': dataAttr,
- children,
-}: FlatNavProductMenuProps): JSX.Element {
- return (
- <DropdownMenu>
- <DropdownMenuTrigger
- render={<NavLinkSideActionButton icon={icon} tooltip={tooltip} data-attr={dataAttr} />}
- />
- <DropdownMenuContent align="start" data-lemon-skin className="w-56">
- {children}
- </DropdownMenuContent>
- </DropdownMenu>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavSessionReplayMenuItems.tsx b/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavSessionReplayMenuItems.tsx
deleted file mode 100644
index 79e30f6f93ce..000000000000
--- a/frontend/src/layout/panel-layout/navbar/tabs/flat-nav/menus/FlatNavSessionReplayMenuItems.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-import { useActions, useValues } from 'kea'
-import { combineUrl } from 'kea-router'
-
-import {
- DropdownMenuItem,
- DropdownMenuSeparator,
- DropdownMenuSub,
- DropdownMenuSubContent,
- DropdownMenuSubTrigger,
- Skeleton,
-} from '@posthog/quill'
-
-import { sessionRecordingCollectionsLogic } from 'scenes/session-recordings/collections/sessionRecordingCollectionsLogic'
-import { sessionRecordingSavedFiltersLogic } from 'scenes/session-recordings/filters/sessionRecordingSavedFiltersLogic'
-import { urls } from 'scenes/urls'
-
-import { ReplayTabs } from '~/types'
-
-import { FlatNavMenuLinkItem } from './FlatNavMenuLinkItem'
-
-// An absolute URL makes the link reload the page. sessionRecordingSavedFiltersLogic reads
-// savedFilterId in afterMount only, so a client-side push leaves the filter unapplied whenever
-// Replay home already holds that logic mounted.
-function savedFilterUrl(savedFilterId: string): string {
- return urls.absolute(combineUrl(urls.replay(ReplayTabs.Home), { savedFilterId }).url)
-}
-
-export function FlatNavSessionReplayMenuItems(): JSX.Element {
- const { savedFilters, savedFiltersLoading, loadSavedFiltersFailed } = useValues(sessionRecordingSavedFiltersLogic)
- const { loadSavedFilters, loadSavedFiltersIfNeeded } = useActions(sessionRecordingSavedFiltersLogic)
- const { playlists, playlistsLoading, loadPlaylistsFailed } = useValues(sessionRecordingCollectionsLogic)
- const { loadPlaylists } = useActions(sessionRecordingCollectionsLogic)
-
- return (
- <>
- <DropdownMenuSub
- onOpenChange={(open) => {
- if (!open || savedFiltersLoading) {
- return
- }
- // loadSavedFiltersIfNeeded refuses to load again once one load has succeeded,
- // so a later failure needs the load forced or the submenu never recovers
- if (loadSavedFiltersFailed) {
- loadSavedFilters()
- } else {
- loadSavedFiltersIfNeeded()
- }
- }}
- >
- <DropdownMenuSubTrigger data-attr="flat-nav-session-replay-menu-saved-filters">
- Saved filters
- </DropdownMenuSubTrigger>
- <DropdownMenuSubContent data-lemon-skin className="min-w-48">
- {savedFiltersLoading ? (
- <Skeleton className="mx-2 my-1 h-4 w-32" />
- ) : savedFilters.results.length === 0 ? (
- loadSavedFiltersFailed ? (
- <DropdownMenuItem disabled>Couldn't load saved filters</DropdownMenuItem>
- ) : (
- <DropdownMenuItem disabled>No saved filters</DropdownMenuItem>
- )
- ) : (
- savedFilters.results.map((savedFilter) => (
- <FlatNavMenuLinkItem
- key={savedFilter.short_id}
- to={savedFilterUrl(savedFilter.short_id)}
- data-attr="flat-nav-session-replay-menu-saved-filter"
- >
- {savedFilter.name || savedFilter.derived_name || 'Unnamed'}
- </FlatNavMenuLinkItem>
- ))
- )}
- {!savedFiltersLoading && savedFilters.next && (
- <>
- <DropdownMenuSeparator />
- <FlatNavMenuLinkItem
- to={`${urls.replay(ReplayTabs.Home)}?showFilters=true&filtersTab=saved`}
- data-attr="flat-nav-session-replay-menu-all-saved-filters"
- >
- All saved filters
- </FlatNavMenuLinkItem>
- </>
- )}
- </DropdownMenuSubContent>
- </DropdownMenuSub>
-
- {playlistsLoading || loadPlaylistsFailed || playlists.count > 0 ? (
- <DropdownMenuSub
- onOpenChange={(open) => {
- if (open && loadPlaylistsFailed && !playlistsLoading) {
- loadPlaylists()
- }
- }}
- >
- <DropdownMenuSubTrigger data-attr="flat-nav-session-replay-menu-collections">
- Collections
- </DropdownMenuSubTrigger>
- <DropdownMenuSubContent data-lemon-skin className="min-w-48">
- {playlistsLoading ? (
- <Skeleton className="mx-2 my-1 h-4 w-32" />
- ) : playlists.results.length === 0 ? (
- loadPlaylistsFailed ? (
- <DropdownMenuItem disabled>Couldn't load collections</DropdownMenuItem>
- ) : (
- <DropdownMenuItem disabled>No collections</DropdownMenuItem>
- )
- ) : (
- playlists.results.map((playlist) => (
- <FlatNavMenuLinkItem
- key={playlist.short_id}
- to={urls.replayPlaylist(playlist.short_id)}
- data-attr="flat-nav-session-replay-menu-collection"
- >
- {playlist.name || playlist.derived_name || 'Unnamed'}
- </FlatNavMenuLinkItem>
- ))
- )}
- {!playlistsLoading && playlists.next && (
- <>
- <DropdownMenuSeparator />
- <FlatNavMenuLinkItem
- to={urls.replay(ReplayTabs.Playlists)}
- data-attr="flat-nav-session-replay-menu-all-collections"
- >
- All collections
- </FlatNavMenuLinkItem>
- </>
- )}
- </DropdownMenuSubContent>
- </DropdownMenuSub>
- ) : null}
-
- <FlatNavMenuLinkItem
- to={urls.replay(ReplayTabs.Home)}
- data-attr="flat-nav-session-replay-menu-all-recordings"
- >
- All recordings
- </FlatNavMenuLinkItem>
- </>
- )
-}
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/navFilesTabLogic.test.ts b/frontend/src/layout/panel-layout/navbar/tabs/navFilesTabLogic.test.ts
index 3dc819db693e..f22f61f3c365 100644
--- a/frontend/src/layout/panel-layout/navbar/tabs/navFilesTabLogic.test.ts
+++ b/frontend/src/layout/panel-layout/navbar/tabs/navFilesTabLogic.test.ts
@@ -123,7 +123,7 @@ describe('navFilesTabLogic', () => {
const files = projectTreeLogic({ key: FILES_TREE_KEY, root: 'project://' })
panelLayoutLogic.actions.setNavExperimentTab('home')
panelLayoutLogic.actions.toggleLayoutNavCollapsed(true)
- panelLayoutLogic.actions.setActivePanelIdentifier('DataAndPeople')
+ panelLayoutLogic.actions.setActivePanelIdentifier('Notifications')
panelLayoutLogic.actions.showLayoutPanel(true)
files.actions.setSearchTerm('unrelated')
files.actions.setSortMethod('recent')
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.test.ts b/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.test.ts
index 666451d19f77..d29055554619 100644
--- a/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.test.ts
+++ b/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.test.ts
@@ -137,13 +137,9 @@ describe('navProductsTabLogic', () => {
expect(navProductsTabLogic.values).toMatchObject({ allProductsCollapsible: true, allProductsVisible: true })
})
- it.each([
- [true, 1],
- [false, 0],
- ])('reloads stars after custom products reload with the simple sidebar %s', async (enabled, expectedLoads) => {
+ it('reloads stars after custom products reload', async () => {
const list = jest.fn(() => [200, { results: [] }])
useMocks({ get: { '/api/projects/:team_id/file_system_shortcut/': list } })
- featureFlagLogic.actions.setFeatureFlags([], { [FEATURE_FLAGS.SIMPLE_SIDEPANEL]: enabled })
await expectLogic(projectTreeDataLogic).toFinishAllListeners()
list.mockClear()
@@ -152,7 +148,7 @@ describe('navProductsTabLogic', () => {
).toFinishAllListeners()
await expectLogic(projectTreeDataLogic).toFinishAllListeners()
- expect(list).toHaveBeenCalledTimes(expectedLoads)
+ expect(list).toHaveBeenCalledTimes(1)
})
it('fills in the link of product stars the backend created without one', async () => {
@@ -242,14 +238,15 @@ describe('navProductsTabLogic', () => {
post: { '/api/projects/:team_id/file_system_shortcut/bulk_update/': bulkUpdate },
patch: { '/api/users/@me/': updateUser },
})
- await expectLogic(projectTreeDataLogic).toFinishAllListeners()
- projectTreeDataLogic.actions.loadShortcutsSuccess([
- { id: 'analytics', path: 'Product analytics', type: 'product_analytics', href: '/insights' },
- ])
+ // Custom products reload the stars, so that reload has to finish before the stars are set.
customProductsLogic.actions.loadCustomProductsSuccess([
{ id: '1', product_path: 'Session replay', enabled: true, created_at: '', updated_at: '' },
{ id: '2', product_path: 'Removed product', enabled: true, created_at: '', updated_at: '' },
])
+ await expectLogic(projectTreeDataLogic).toFinishAllListeners()
+ projectTreeDataLogic.actions.loadShortcutsSuccess([
+ { id: 'analytics', path: 'Product analytics', type: 'product_analytics', href: '/insights' },
+ ])
navProductsTabLogic.actions.openStarredSetup()
expect([...navProductsTabLogic.values.draftStarredPaths].sort()).toEqual([
diff --git a/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts b/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts
index a87dcbfba06b..7e192f52a9c0 100644
--- a/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts
+++ b/frontend/src/layout/panel-layout/navbar/tabs/navProductsTabLogic.ts
@@ -681,13 +681,9 @@ export const navProductsTabLogic = kea<navProductsTabLogicType>([
loadShortcutsSuccess: keepAllProductsOpenWithoutStars,
loadShortcutsFailure: keepAllProductsOpenWithoutStars,
deleteShortcutSuccess: keepAllProductsOpenWithoutStars,
- // A product intent can add custom products, and the backend stars them for simple sidebar
- // users in the same request. Custom products reload after that write, so shortcuts follow.
- loadCustomProductsSuccess: () => {
- if (values.featureFlags[FEATURE_FLAGS.SIMPLE_SIDEPANEL]) {
- actions.loadShortcuts()
- }
- },
+ // A product intent can add custom products, and the backend stars them in the same request.
+ // Custom products reload after that write, so shortcuts follow.
+ loadCustomProductsSuccess: () => actions.loadShortcuts(),
revealAllProductsForFind: () => {
posthog.capture('sidebar all products revealed by find')
},
diff --git a/frontend/src/layout/panel-layout/panelLayoutLogic.tsx b/frontend/src/layout/panel-layout/panelLayoutLogic.tsx
index 32aba442385f..5dc0cc198fff 100644
--- a/frontend/src/layout/panel-layout/panelLayoutLogic.tsx
+++ b/frontend/src/layout/panel-layout/panelLayoutLogic.tsx
@@ -1,20 +1,10 @@
import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'
import { router, urlToAction } from 'kea-router'
-import { removeProjectIdIfPresent } from 'lib/utils/kea-router'
-
import { navigation3000Logic } from '../navigation-3000/navigationLogic'
-export type PanelLayoutNavIdentifier =
- | 'Project'
- | 'Products'
- | 'People'
- | 'Games'
- | 'Shortcuts'
- | 'DataManagement'
- | 'DataAndPeople'
- | 'Chat'
- | 'Notifications'
+export type PanelLayoutNavIdentifier = 'Project' | 'Notifications'
+const PANEL_LAYOUT_NAV_IDENTIFIERS: string[] = ['Project', 'Notifications'] satisfies PanelLayoutNavIdentifier[]
export type NavExperimentTab = 'home' | 'files' | 'chat'
export type PanelLayoutMainContentRef = React.RefObject<HTMLElement> | null
export const PANEL_LAYOUT_DEFAULT_WIDTH: number = 245
@@ -34,15 +24,11 @@ export interface panelLayoutLogicValues {
hash: string
} // router
activePanelIdentifier: string
- activePanelIdentifierFromUrl: PanelLayoutNavIdentifier | ''
- activePanelIdentifierFromUrlAiFirst: PanelLayoutNavIdentifier | ''
- expandedNavSections: Record<string, boolean>
isLayoutNavCollapsed: boolean
isLayoutNavCollapsedDesktop: boolean
isLayoutNavbarVisible: boolean
isLayoutNavbarVisibleForDesktop: boolean
isLayoutNavbarVisibleForMobile: boolean
- isLayoutPanelCloseable: boolean
isLayoutPanelVisible: boolean
isNavOverlayOpen: boolean
layoutNavCollapsedOverride: {
@@ -58,7 +44,6 @@ export interface panelLayoutLogicValues {
panelWillHide: boolean
pathname: string
sidePanelWidth: number
- visibleSideAction: string
visitedNavTabs: NavExperimentTab[]
visitedPanels: PanelLayoutNavIdentifier[]
}
@@ -114,9 +99,6 @@ export interface panelLayoutLogicActions {
setSidePanelWidth: (width: number) => {
width: number
}
- setVisibleSideAction: (sideAction: string) => {
- sideAction: string
- }
showLayoutNavBar: (visible: boolean) => {
visible: boolean
}
@@ -126,9 +108,6 @@ export interface panelLayoutLogicActions {
toggleLayoutNavCollapsed: (override?: boolean) => {
override: boolean | undefined
}
- toggleNavSection: (section: string) => {
- section: string
- }
}
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
@@ -142,16 +121,6 @@ export interface panelLayoutLogicMeta {
} | null,
mobileLayout: boolean
) => boolean
- activePanelIdentifierFromUrl: (location: {
- hash: string
- pathname: string
- search: string
- }) => PanelLayoutNavIdentifier | ''
- activePanelIdentifierFromUrlAiFirst: (location: {
- hash: string
- pathname: string
- search: string
- }) => PanelLayoutNavIdentifier | ''
pathname: (location: { hash: string; pathname: string; search: string }) => string
}
}
@@ -180,14 +149,12 @@ export const panelLayoutLogic = kea<panelLayoutLogicType>([
toggleLayoutNavCollapsed: (override?: boolean) => ({ override }),
setLayoutNavCollapsedDesktop: (collapsed: boolean) => ({ collapsed }),
setLayoutNavCollapsedOverride: (owner: string, collapsed: boolean | null) => ({ owner, collapsed }),
- setVisibleSideAction: (sideAction: string) => ({ sideAction }),
setPanelWidth: (width: number) => ({ width }),
setPanelIsResizing: (isResizing: boolean) => ({ isResizing }),
setPanelWillHide: (willHide: boolean) => ({ willHide }),
resetPanelLayout: (keyboardAction: boolean) => ({ keyboardAction }),
setMainContentRect: (rect: DOMRect) => ({ rect }),
setSidePanelWidth: (width: number) => ({ width }),
- toggleNavSection: (section: string) => ({ section }),
setNavExperimentTab: (tab: NavExperimentTab) => ({ tab }),
setNavbarWidth: (width: number) => ({ width }),
setNavOverlayOpen: (open: boolean) => ({ open }),
@@ -218,12 +185,6 @@ export const panelLayoutLogic = kea<panelLayoutLogicType>([
mobileLayout: () => true,
},
],
- isLayoutPanelCloseable: [
- true,
- {
- showLayoutPanel: () => true,
- },
- ],
isLayoutNavbarVisible: [
false,
{ persist: true },
@@ -289,12 +250,6 @@ export const panelLayoutLogic = kea<panelLayoutLogicType>([
collapsed === null ? (state?.owner === owner ? null : state) : { owner, collapsed },
},
],
- visibleSideAction: [
- '',
- {
- setVisibleSideAction: (_, { sideAction }) => sideAction,
- },
- ],
panelWidth: [
PANEL_LAYOUT_DEFAULT_WIDTH,
{ persist: true, prefix: '2', separator: '.' },
@@ -342,16 +297,6 @@ export const panelLayoutLogic = kea<panelLayoutLogicType>([
setNavbarWidth: (_, { width }) => width,
},
],
- expandedNavSections: [
- { ai: true, project: true, files: true, favorites: false, tools: true } as Record<string, boolean>,
- { persist: true, prefix: 'v2.' },
- {
- toggleNavSection: (state, { section }) => ({
- ...state,
- [section]: !state[section],
- }),
- },
- ],
}),
listeners(({ actions, values, cache }) => ({
toggleLayoutNavCollapsed: ({ override }) => {
@@ -421,39 +366,6 @@ export const panelLayoutLogic = kea<panelLayoutLogicType>([
mobileLayout: boolean
): boolean => !mobileLayout && (layoutNavCollapsedOverride?.collapsed ?? isLayoutNavCollapsedDesktop),
],
- activePanelIdentifierFromUrl: [
- () => [router.selectors.location],
- (location: { hash: string; pathname: string; search: string }): PanelLayoutNavIdentifier | '' => {
- const cleanPath = removeProjectIdIfPresent(location.pathname)
-
- if (cleanPath.startsWith('/data-management/')) {
- return 'DataManagement'
- }
-
- if (cleanPath === '/persons' || cleanPath === '/cohorts' || cleanPath.startsWith('/groups/')) {
- return 'People'
- }
-
- return ''
- },
- ],
- activePanelIdentifierFromUrlAiFirst: [
- () => [router.selectors.location],
- (location: { hash: string; pathname: string; search: string }): PanelLayoutNavIdentifier | '' => {
- const cleanPath = removeProjectIdIfPresent(location.pathname)
-
- if (
- cleanPath.startsWith('/data-management/') ||
- cleanPath === '/persons' ||
- cleanPath === '/cohorts' ||
- cleanPath.startsWith('/groups/')
- ) {
- return 'DataAndPeople'
- }
-
- return ''
- },
- ],
pathname: [
(s) => [s.location],
(location: { hash: string; pathname: string; search: string }): string => location.pathname,
@@ -464,9 +376,8 @@ export const panelLayoutLogic = kea<panelLayoutLogicType>([
if (values.isNavOverlayOpen) {
actions.setNavOverlayOpen(false)
}
- // URL-surfaced panels (DataAndPeople, DataManagement) set activePanelIdentifier
- // without flipping isLayoutPanelVisible, so check the identifier too — otherwise
- // navigating away from one leaves the panel and its dim mounted.
+ // Notifications sets activePanelIdentifier without flipping isLayoutPanelVisible, so check the
+ // identifier too. Otherwise navigating away leaves the panel and its dim mounted.
const panelIsShown = values.isLayoutPanelVisible || values.activePanelIdentifier !== ''
if (values.mobileLayout && (values.isLayoutNavbarVisibleForMobile || panelIsShown)) {
actions.showLayoutNavBar(false)
@@ -479,8 +390,13 @@ export const panelLayoutLogic = kea<panelLayoutLogicType>([
// visitedPanels is not persisted, but activePanelIdentifier is. Seed visitedPanels from
// the rehydrated identifier so the panel that was open on the previous session starts
// keep-mounted — without this, the first switch after reload tears the panel down once.
- if (values.activePanelIdentifier) {
+ if (PANEL_LAYOUT_NAV_IDENTIFIERS.includes(values.activePanelIdentifier)) {
actions.setActivePanelIdentifier(values.activePanelIdentifier as PanelLayoutNavIdentifier)
+ } else if (values.activePanelIdentifier) {
+ // A panel removed from the app can still be stored from an earlier session. Clear it, because
+ // PanelLayout shows its dim for any stored panel, and nothing would render inside it.
+ actions.clearActivePanelIdentifier()
+ actions.showLayoutPanel(false)
}
// Same for the persisted nav tab: a user who was on the chat tab last session gets its
// panel mounted from the start.
diff --git a/frontend/src/layout/panel-layout/sidebarCustomization.tsx b/frontend/src/layout/panel-layout/sidebarCustomization.tsx
deleted file mode 100644
index ffb84a46acd6..000000000000
--- a/frontend/src/layout/panel-layout/sidebarCustomization.tsx
+++ /dev/null
@@ -1,123 +0,0 @@
-import {
- IconApps,
- IconClock,
- IconDatabase,
- IconFolder,
- IconFolderOpen,
- IconGear,
- IconHome,
- IconNotification,
- IconQuestion,
- IconStar,
-} from '@posthog/icons'
-
-import { FEATURE_FLAGS } from 'lib/constants'
-
-import { SidebarItemKey, SidebarSectionKey } from '~/layout/uiCustomizationLogic'
-
-export interface SidebarCustomizableItem {
- /** Absent for items that always stay visible (they render a locked switch). */
- key?: SidebarItemKey
- label: string
- /** Very brief explanation of what the item opens, shown under the label in settings. */
- description: string
- /** Link to this item's page on posthog.com/docs, when it has one. */
- docsHref?: string
- icon: JSX.Element
- /** Mirrors the flag gating the item in the navbar, so the toggle is only offered when the item can render at all. */
- flag?: string
-}
-
-export interface SidebarCustomizableSection {
- key: SidebarSectionKey
- label: string
- description: string
- docsHref?: string
- icon: JSX.Element
- items: SidebarCustomizableItem[]
-}
-
-/**
- * The exhaustive list of customizable sidebar elements, used to render the settings UI.
- * Keys must match the UserUIConfiguration schema and labels/icons must match what the
- * navbar renders (NavTabBrowse and NavBarFooter), so keep the three in sync.
- * Activity and Settings have no key: they always stay visible.
- */
-export const SIDEBAR_CUSTOMIZABLE_SECTIONS: SidebarCustomizableSection[] = [
- {
- key: 'project',
- label: 'Project',
- description: 'The core navigation for your project.',
- icon: <IconFolder />,
- items: [
- { key: 'home', label: 'Home', description: 'Opens your homepage.', icon: <IconHome /> },
- {
- key: 'inbox',
- label: 'Self-driving',
- description: 'Reports and signals that need your attention.',
- docsHref: 'https://posthog.com/docs/self-driving',
- icon: <IconNotification />,
- flag: FEATURE_FLAGS.PRODUCT_AUTONOMY,
- },
- {
- label: 'Activity',
- description: 'A live stream of events coming into your project.',
- docsHref: 'https://posthog.com/docs/activity',
- icon: <IconClock />,
- },
- {
- key: 'data',
- label: 'Data',
- description: 'Manage events, actions, properties, and people.',
- docsHref: 'https://posthog.com/docs/data',
- icon: <IconDatabase />,
- },
- {
- key: 'files',
- label: 'Files',
- description: 'Everything saved in your project, organized in folders.',
- icon: <IconFolderOpen />,
- },
- // User.ui_configuration stores this key, so renaming it resets saved sidebar settings.
- { key: 'tools', label: 'Products', description: 'Browse all PostHog products.', icon: <IconApps /> },
- {
- key: 'starred',
- label: 'Starred',
- description: 'Quick access to items you starred.',
- icon: <IconStar />,
- },
- ],
- },
- {
- key: 'recents',
- label: 'Recents',
- description: 'Items you viewed recently.',
- icon: <IconClock />,
- items: [],
- },
- {
- // User.ui_configuration stores this key, so renaming it resets saved sidebar settings.
- key: 'my_tools',
- label: 'My products',
- description: 'The products you picked for quick access.',
- icon: <IconApps />,
- items: [],
- },
-]
-
-/** Customizable items at the bottom of the sidebar. */
-export const SIDEBAR_CUSTOMIZABLE_FOOTER_ITEMS: SidebarCustomizableItem[] = [
- {
- key: 'notifications',
- label: 'Notifications',
- description: 'Your in-app notifications.',
- icon: <IconNotification />,
- flag: FEATURE_FLAGS.REAL_TIME_NOTIFICATIONS,
- },
- { key: 'help', label: 'Help', description: 'Docs, support, and product updates.', icon: <IconQuestion /> },
- {
- label: 'Settings',
- description: 'Project, organization, and account settings.',
- icon: <IconGear />,
- },
-]
diff --git a/frontend/src/layout/scenes/ConfigureHomeModal.test.tsx b/frontend/src/layout/scenes/ConfigureHomeModal.test.tsx
deleted file mode 100644
index d87f4c298861..000000000000
--- a/frontend/src/layout/scenes/ConfigureHomeModal.test.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { render, screen } from '@testing-library/react'
-import { type ReactNode } from 'react'
-
-import { ConfigureHomeModal } from './ConfigureHomeModal'
-
-jest.mock('lib/lemon-ui/LemonModal', () => ({
- LemonModal: ({ children }: { children: ReactNode }) => <>{children}</>,
-}))
-
-jest.mock('./ConfigureHomeModalContent', () => ({
- ConfigureHomeModalContent: () => <div data-attr="configure-home-content" />,
-}))
-
-describe('ConfigureHomeModal', () => {
- it('mounts homepage configuration only when open', () => {
- const { rerender } = render(<ConfigureHomeModal isOpen={false} onClose={jest.fn()} />)
- expect(screen.queryByTestId('configure-home-content')).toBeNull()
-
- rerender(<ConfigureHomeModal isOpen onClose={jest.fn()} />)
- expect(screen.getByTestId('configure-home-content')).not.toBeNull()
- })
-})
diff --git a/frontend/src/layout/scenes/ConfigureHomeModal.tsx b/frontend/src/layout/scenes/ConfigureHomeModal.tsx
deleted file mode 100644
index 86041b22d720..000000000000
--- a/frontend/src/layout/scenes/ConfigureHomeModal.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { LemonModal } from 'lib/lemon-ui/LemonModal'
-
-import { ConfigureHomeModalContent } from './ConfigureHomeModalContent'
-
-export interface ConfigureHomeModalProps {
- isOpen: boolean
- onClose: () => void
-}
-
-export function ConfigureHomeModal({ isOpen, onClose }: ConfigureHomeModalProps): JSX.Element {
- return (
- <LemonModal
- isOpen={isOpen}
- onClose={onClose}
- title="Configure homepage"
- description="Choose your personal homepage for this project."
- width="48rem"
- >
- {isOpen && <ConfigureHomeModalContent />}
- </LemonModal>
- )
-}
diff --git a/frontend/src/layout/scenes/ConfigureHomeModalContent.tsx b/frontend/src/layout/scenes/ConfigureHomeModalContent.tsx
deleted file mode 100644
index 879105e2dfd2..000000000000
--- a/frontend/src/layout/scenes/ConfigureHomeModalContent.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-import { useActions, useValues } from 'kea'
-import posthog from 'posthog-js'
-import { useEffect, useState } from 'react'
-
-import { LemonSegmentedButton } from '@posthog/lemon-ui'
-
-import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { dashboardsModel } from '~/models/dashboardsModel'
-import { FileSystemIconType } from '~/queries/schema/schema-general'
-import { sceneLogic } from '~/scenes/sceneLogic'
-import { emptySceneParams } from '~/scenes/scenes'
-import { Scene, SceneTab } from '~/scenes/sceneTypes'
-import { teamLogic } from '~/scenes/teamLogic'
-import { urls } from '~/scenes/urls'
-
-import { ConfigureHomeDashboardPicker } from './ConfigureHomeDashboardPicker'
-
-type HomepageMode = 'launchpad' | 'search' | 'default_dashboard'
-
-function getHomepageMode(
- isUsingProjectDefault: boolean,
- isUsingNewTabHomepage: boolean,
- isUsingDefaultDashboard: boolean
-): HomepageMode | null {
- if (isUsingProjectDefault) {
- return 'launchpad'
- }
- if (isUsingNewTabHomepage) {
- return 'search'
- }
- if (isUsingDefaultDashboard) {
- return 'default_dashboard'
- }
- return null
-}
-
-export function ConfigureHomeModalContent(): JSX.Element {
- const { homepage } = useValues(sceneLogic)
- const { currentTeam } = useValues(teamLogic)
- const { setHomepage } = useActions(sceneLogic)
- const { loadDashboardsIfNeeded } = useActions(dashboardsModel)
-
- const isUsingProjectDefault = !homepage
- const isUsingNewTabHomepage = homepage?.sceneId === Scene.NewTab
- const isUsingDefaultDashboard =
- homepage?.sceneId === Scene.Dashboard && homepage?.id?.startsWith('homepage-dashboard-')
- const [pendingMode, setPendingMode] = useState<HomepageMode | null>(null)
- const currentMode = getHomepageMode(isUsingProjectDefault, isUsingNewTabHomepage, isUsingDefaultDashboard)
- useEffect(() => setPendingMode(null), [currentMode])
- const activeMode = pendingMode ?? currentMode
- const showDashboardPicker = activeMode === 'default_dashboard'
- const homepageDisplayTitle = homepage ? homepage.customTitle || homepage.title : 'Launchpad'
- const homepageSubtitle = isUsingProjectDefault ? 'Default' : isUsingNewTabHomepage ? 'Search' : null
- const homepageIcon = homepage?.iconType
- const homepageIconElement = iconForType(
- homepageIcon && homepageIcon !== 'loading' && homepageIcon !== 'blank'
- ? (homepageIcon as FileSystemIconType)
- : isUsingNewTabHomepage
- ? ('default_icon_type' as FileSystemIconType)
- : ('home' as FileSystemIconType)
- )
- const newTabHomepage: SceneTab = {
- id: 'homepage-new-tab',
- pathname: urls.newTab(),
- search: '',
- hash: '',
- title: 'Search',
- iconType: 'search',
- sceneId: Scene.NewTab,
- sceneKey: 'newTab',
- sceneParams: emptySceneParams,
- }
-
- return (
- <section className="flex flex-col gap-3">
- <div className="flex flex-col gap-2">
- <div className="flex items-center justify-between gap-3 rounded-lg border border-border px-3 py-2 bg-surface-primary">
- <div className="flex min-w-0 items-center gap-2">
- <span className="shrink-0 text-lg text-muted-alt">{homepageIconElement}</span>
- <div className="min-w-0">
- <div className="truncate font-medium text-primary">{homepageDisplayTitle}</div>
- {homepageSubtitle && <div className="truncate text-xs text-muted">{homepageSubtitle}</div>}
- </div>
- </div>
- <LemonSegmentedButton
- size="small"
- value={activeMode ?? undefined}
- onChange={(newValue) => {
- posthog.capture('homepage configure set homepage', { 'homepage choice': newValue })
- if (newValue === 'launchpad') {
- setPendingMode(null)
- setHomepage(null)
- } else if (newValue === 'search') {
- setPendingMode(null)
- setHomepage(newTabHomepage)
- } else if (newValue === 'default_dashboard') {
- loadDashboardsIfNeeded()
- const dashboardId = currentTeam?.primary_dashboard
- if (dashboardId) {
- setPendingMode(null)
- setHomepage({
- id: `homepage-dashboard-${dashboardId}`,
- pathname: urls.dashboard(dashboardId),
- search: '',
- hash: '',
- title: 'Default dashboard',
- iconType: 'dashboard',
- sceneId: Scene.Dashboard,
- sceneKey: `dashboard-${dashboardId}`,
- sceneParams: emptySceneParams,
- })
- } else {
- setPendingMode('default_dashboard')
- }
- }
- }}
- options={[
- {
- value: 'launchpad' as const,
- label: 'Launchpad',
- 'data-attr': 'configure-home-modal-set-launchpad',
- tooltip: 'An AI-powered home with quick actions and recent items',
- },
- {
- value: 'search' as const,
- label: 'Search',
- 'data-attr': 'configure-home-modal-set-search',
- tooltip: 'A search page to quickly find anything in your project',
- },
- {
- value: 'default_dashboard' as const,
- label: 'Default dashboard',
- 'data-attr': 'configure-home-modal-set-default-dashboard',
- tooltip: "Open your project's default dashboard when you go home",
- },
- ]}
- />
- </div>
- {showDashboardPicker && (
- <section className="space-y-3 bg-surface-secondary rounded-lg p-3 border">
- <div className="flex flex-col">
- <h4 className="text-base font-semibold text-primary m-0">
- Set default dashboard (project based)
- </h4>
- <p className="text-sm text-tertiary m-0">
- This dashboard opens by default for everyone who has not set a custom homepage.
- </p>
- </div>
- <ConfigureHomeDashboardPicker onSelect={() => setPendingMode(null)} />
- </section>
- )}
- </div>
- </section>
- )
-}
diff --git a/frontend/src/layout/uiCustomizationLogic.test.ts b/frontend/src/layout/uiCustomizationLogic.test.ts
index b581b1414e6d..4f43806b2c28 100644
--- a/frontend/src/layout/uiCustomizationLogic.test.ts
+++ b/frontend/src/layout/uiCustomizationLogic.test.ts
@@ -2,8 +2,6 @@ import { MOCK_DEFAULT_USER } from 'lib/api.mock'
import { expectLogic } from 'kea-test-utils'
-import { FEATURE_FLAGS } from 'lib/constants'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { userLogic } from 'scenes/userLogic'
import { useMocks } from '~/mocks/jest'
@@ -11,12 +9,7 @@ import { UserUIConfiguration } from '~/queries/schema/schema-general'
import { initKeaTests } from '~/test/init'
import { UserType } from '~/types'
-import {
- uiCustomizationLogic,
- withSidebarItemVisibility,
- withSidebarPatch,
- withSidebarSectionVisibility,
-} from './uiCustomizationLogic'
+import { uiCustomizationLogic } from './uiCustomizationLogic'
describe('uiCustomizationLogic', () => {
let logic: ReturnType<typeof uiCustomizationLogic.build>
@@ -37,134 +30,22 @@ describe('uiCustomizationLogic', () => {
},
})
initKeaTests()
- featureFlagLogic.mount()
- featureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.UI_CUSTOMIZATION], {
- [FEATURE_FLAGS.UI_CUSTOMIZATION]: true,
- })
logic = uiCustomizationLogic()
logic.mount()
})
- it('ignores stored configuration while the customization flag is off', () => {
- featureFlagLogic.actions.setFeatureFlags([], {})
- seedUser({
- version: 1,
- sidebar: {
- sections: { recents: { visible: false } },
- items: { data: { visible: false } },
- },
- })
-
- expect(logic.values.isSidebarItemShown('data')).toBe(true)
- expect(logic.values.isSidebarSectionShown('recents')).toBe(true)
- })
-
- it('shows everything when the user has no configuration', () => {
- seedUser(null)
-
- expect(logic.values.isSidebarItemShown('data')).toBe(true)
- expect(logic.values.isSidebarSectionShown('my_tools')).toBe(true)
- })
-
- it('hides only elements explicitly configured as hidden', () => {
- seedUser({
- version: 1,
- sidebar: {
- sections: { recents: { visible: false } },
- items: { data: { visible: false }, home: { visible: true } },
- },
- })
-
- expect(logic.values.isSidebarItemShown('data')).toBe(false)
- expect(logic.values.isSidebarItemShown('home')).toBe(true)
- expect(logic.values.isSidebarItemShown('files')).toBe(true)
- expect(logic.values.isSidebarSectionShown('recents')).toBe(false)
- expect(logic.values.isSidebarSectionShown('project')).toBe(true)
- })
-
- it('applies a toggle optimistically and persists the complete configuration', async () => {
- seedUser({ version: 1, sidebar: { items: { starred: { visible: false } } } })
+ it('completes the starred setup optimistically without dropping the rest of the configuration', async () => {
+ seedUser({ version: 1, sidebar: { density: 'compact' }, sql_editor: { vim_mode_enabled: true } })
await expectLogic(logic, () => {
- logic.actions.setSidebarItemShown('data', false)
+ logic.actions.completeStarredProductsSetup()
}).toFinishAllListeners()
- expect(logic.values.isSidebarItemShown('data')).toBe(false)
- expect(logic.values.isSidebarItemShown('starred')).toBe(false)
+ expect(logic.values.starredProductsSetupCompleted).toBe(true)
expect(patchedUser?.ui_configuration).toEqual({
version: 1,
- sidebar: { items: { starred: { visible: false }, data: { visible: false } } },
- })
- })
-
- it('helpers add visibility without dropping the rest of the configuration', () => {
- const existing: UserUIConfiguration = {
- version: 2,
- sidebar: {
- sections: { recents: { visible: false } },
- items: { data: { visible: false } },
- },
- }
-
- expect(withSidebarItemVisibility(existing, 'files', false)).toEqual({
- version: 2,
- sidebar: {
- sections: { recents: { visible: false } },
- items: { data: { visible: false }, files: { visible: false } },
- },
- })
- expect(withSidebarSectionVisibility(null, 'my_tools', false)).toEqual({
- version: 1,
- sidebar: { sections: { my_tools: { visible: false } } },
- })
- })
-
- it('defaults to comfortable density when no configuration is set', () => {
- seedUser(null)
- expect(logic.values.sidebarDensity).toBe('comfortable')
- })
-
- it('returns the stored density from the configuration', () => {
- seedUser({
- version: 1,
- sidebar: { density: 'compact' },
- })
- expect(logic.values.sidebarDensity).toBe('compact')
- })
-
- it('ignores stored density when the customization flag is off', () => {
- featureFlagLogic.actions.setFeatureFlags([], {})
- seedUser({
- version: 1,
- sidebar: { density: 'compact' },
- })
- expect(logic.values.sidebarDensity).toBe('comfortable')
- })
-
- it('persists density change optimistically', async () => {
- seedUser({ version: 1, sidebar: { density: 'comfortable' } })
-
- await expectLogic(logic, () => {
- logic.actions.setSidebarDensity('compact')
- }).toFinishAllListeners()
-
- expect(logic.values.sidebarDensity).toBe('compact')
- expect(patchedUser?.ui_configuration).toEqual({
- version: 1,
- sidebar: { density: 'compact' },
- })
- })
-
- it('withSidebarPatch merges density into configuration', () => {
- expect(withSidebarPatch(null, { density: 'compact' })).toEqual({
- version: 1,
- sidebar: { density: 'compact' },
- })
- expect(
- withSidebarPatch({ version: 1, sidebar: { items: { data: { visible: false } } } }, { density: 'compact' })
- ).toEqual({
- version: 1,
- sidebar: { items: { data: { visible: false } }, density: 'compact' },
+ sidebar: { density: 'compact', starred_products_setup_completed: true },
+ sql_editor: { vim_mode_enabled: true },
})
})
})
diff --git a/frontend/src/layout/uiCustomizationLogic.ts b/frontend/src/layout/uiCustomizationLogic.ts
index 3923d0a906da..595b73d592a0 100644
--- a/frontend/src/layout/uiCustomizationLogic.ts
+++ b/frontend/src/layout/uiCustomizationLogic.ts
@@ -1,61 +1,13 @@
import { MakeLogicType, actions, connect, kea, listeners, path, reducers, selectors } from 'kea'
-import posthog from 'posthog-js'
-import { FEATURE_FLAGS } from 'lib/constants'
-import { FeatureFlagsSet, featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { userLogic } from 'scenes/userLogic'
-import {
- SidebarConfiguration,
- SidebarDensity,
- SidebarItemsConfiguration,
- SidebarSectionsConfiguration,
- UserUIConfiguration,
-} from '~/queries/schema/schema-general'
+import { SidebarConfiguration, UserUIConfiguration } from '~/queries/schema/schema-general'
import { UserType } from '~/types'
-export type SidebarSectionKey = keyof SidebarSectionsConfiguration
-export type SidebarItemKey = keyof SidebarItemsConfiguration
-
/** Version stamped onto the configuration whenever this client persists it. */
export const UI_CONFIGURATION_VERSION = 1
-export function withSidebarSectionVisibility(
- configuration: UserUIConfiguration | null,
- section: SidebarSectionKey,
- visible: boolean
-): UserUIConfiguration {
- return {
- version: UI_CONFIGURATION_VERSION,
- ...configuration,
- sidebar: {
- ...configuration?.sidebar,
- sections: {
- ...configuration?.sidebar?.sections,
- [section]: { ...configuration?.sidebar?.sections?.[section], visible },
- },
- },
- }
-}
-
-export function withSidebarItemVisibility(
- configuration: UserUIConfiguration | null,
- item: SidebarItemKey,
- visible: boolean
-): UserUIConfiguration {
- return {
- version: UI_CONFIGURATION_VERSION,
- ...configuration,
- sidebar: {
- ...configuration?.sidebar,
- items: {
- ...configuration?.sidebar?.items,
- [item]: { ...configuration?.sidebar?.items?.[item], visible },
- },
- },
- }
-}
-
export function withSidebarPatch(
configuration: UserUIConfiguration | null,
patch: Partial<SidebarConfiguration>
@@ -69,16 +21,11 @@ export function withSidebarPatch(
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface uiCustomizationLogicValues {
- featureFlags: FeatureFlagsSet // featureFlagLogic
user: UserType | null // userLogic
userLoading: boolean // userLogic
- isSidebarItemShown: (item: keyof SidebarItemsConfiguration) => boolean
- isSidebarSectionShown: (section: keyof SidebarSectionsConfiguration) => boolean
pendingUiConfiguration: UserUIConfiguration | null
- sidebarDensity: SidebarDensity
starredProductsSetupCompleted: boolean
uiConfiguration: UserUIConfiguration | null
- uiCustomizationEnabled: boolean
}
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
@@ -118,23 +65,6 @@ export interface uiCustomizationLogicActions {
setPendingUiConfiguration: (configuration: UserUIConfiguration | null) => {
configuration: UserUIConfiguration | null
}
- setSidebarDensity: (density: SidebarDensity) => {
- density: SidebarDensity
- }
- setSidebarItemShown: (
- item: SidebarItemKey,
- shown: boolean
- ) => {
- item: keyof SidebarItemsConfiguration
- shown: boolean
- }
- setSidebarSectionShown: (
- section: SidebarSectionKey,
- shown: boolean
- ) => {
- section: keyof SidebarSectionsConfiguration
- shown: boolean
- }
updateUiConfiguration: (
configuration: UserUIConfiguration,
successCallback?: () => void,
@@ -149,21 +79,11 @@ export interface uiCustomizationLogicActions {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface uiCustomizationLogicMeta {
__keaTypeGenInternalSelectorTypes: {
- uiCustomizationEnabled: (featureFlags: FeatureFlagsSet) => boolean
uiConfiguration: (
user: UserType | null,
pendingUiConfiguration: UserUIConfiguration | null
) => UserUIConfiguration | null
- isSidebarSectionShown: (
- uiConfiguration: UserUIConfiguration | null,
- uiCustomizationEnabled: boolean
- ) => (section: keyof SidebarSectionsConfiguration) => boolean
- isSidebarItemShown: (
- uiConfiguration: UserUIConfiguration | null,
- uiCustomizationEnabled: boolean
- ) => (item: keyof SidebarItemsConfiguration) => boolean
starredProductsSetupCompleted: (uiConfiguration: UserUIConfiguration | null) => boolean
- sidebarDensity: (uiConfiguration: UserUIConfiguration | null, uiCustomizationEnabled: boolean) => SidebarDensity
}
}
@@ -174,21 +94,14 @@ export type uiCustomizationLogicType = MakeLogicType<
uiCustomizationLogicMeta
>
-/**
- * Per-user UI customization, persisted as `User.ui_configuration` (see the UserUIConfiguration schema).
- * Resolution is fail-open: a null configuration or an absent key means "shown", so nothing disappears
- * while the user is loading and newly shipped sidebar elements show for everyone until hidden explicitly.
- */
+/** Per-user UI customization, persisted as `User.ui_configuration` (see the UserUIConfiguration schema). */
export const uiCustomizationLogic = kea<uiCustomizationLogicType>([
path(['layout', 'uiCustomizationLogic']),
connect(() => ({
- values: [userLogic, ['user', 'userLoading'], featureFlagLogic, ['featureFlags']],
+ values: [userLogic, ['user', 'userLoading']],
actions: [userLogic, ['updateUser', 'updateUserSuccess']],
})),
actions({
- setSidebarSectionShown: (section: SidebarSectionKey, shown: boolean) => ({ section, shown }),
- setSidebarDensity: (density: SidebarDensity) => ({ density }),
- setSidebarItemShown: (item: SidebarItemKey, shown: boolean) => ({ item, shown }),
setPendingUiConfiguration: (configuration: UserUIConfiguration | null) => ({ configuration }),
clearPendingUiConfiguration: (configuration: UserUIConfiguration) => ({ configuration }),
updateUiConfiguration: (
@@ -210,39 +123,16 @@ export const uiCustomizationLogic = kea<uiCustomizationLogicType>([
],
}),
selectors({
- uiCustomizationEnabled: [
- (s) => [s.featureFlags],
- (featureFlags: FeatureFlagsSet): boolean => !!featureFlags[FEATURE_FLAGS.UI_CUSTOMIZATION],
- ],
uiConfiguration: [
(s) => [s.user, s.pendingUiConfiguration],
(user: UserType | null, pendingUiConfiguration: UserUIConfiguration | null): UserUIConfiguration | null =>
pendingUiConfiguration ?? user?.ui_configuration ?? null,
],
- // With the flag off, any stored configuration is ignored so the sidebar keeps its default layout.
- isSidebarSectionShown: [
- (s) => [s.uiConfiguration, s.uiCustomizationEnabled],
- (uiConfiguration: UserUIConfiguration | null, uiCustomizationEnabled: boolean) =>
- (section: SidebarSectionKey): boolean =>
- !uiCustomizationEnabled || uiConfiguration?.sidebar?.sections?.[section]?.visible !== false,
- ],
- isSidebarItemShown: [
- (s) => [s.uiConfiguration, s.uiCustomizationEnabled],
- (uiConfiguration: UserUIConfiguration | null, uiCustomizationEnabled: boolean) =>
- (item: SidebarItemKey): boolean =>
- !uiCustomizationEnabled || uiConfiguration?.sidebar?.items?.[item]?.visible !== false,
- ],
- // Unlike the visibility settings, this is read whether or not UI customization is on.
starredProductsSetupCompleted: [
(s) => [s.uiConfiguration],
(uiConfiguration: UserUIConfiguration | null): boolean =>
!!uiConfiguration?.sidebar?.starred_products_setup_completed,
],
- sidebarDensity: [
- (s) => [s.uiConfiguration, s.uiCustomizationEnabled],
- (uiConfiguration: UserUIConfiguration | null, uiCustomizationEnabled: boolean): SidebarDensity =>
- (uiCustomizationEnabled ? uiConfiguration?.sidebar?.density : null) ?? 'comfortable',
- ],
}),
listeners(({ actions, values }) => ({
updateUiConfiguration: ({ configuration, successCallback, failureCallback }) => {
@@ -252,32 +142,6 @@ export const uiCustomizationLogic = kea<uiCustomizationLogicType>([
failureCallback?.()
})
},
- setSidebarSectionShown: ({ section, shown }) => {
- const configuration = withSidebarSectionVisibility(values.uiConfiguration, section, shown)
- actions.updateUiConfiguration(configuration)
- posthog.capture('sidebar customization changed', {
- element_kind: 'section',
- element_key: section,
- shown,
- })
- },
- setSidebarItemShown: ({ item, shown }) => {
- const configuration = withSidebarItemVisibility(values.uiConfiguration, item, shown)
- actions.updateUiConfiguration(configuration)
- posthog.capture('sidebar customization changed', {
- element_kind: 'item',
- element_key: item,
- shown,
- })
- },
- setSidebarDensity: ({ density }) => {
- const configuration = withSidebarPatch(values.uiConfiguration, { density })
- actions.updateUiConfiguration(configuration)
- posthog.capture('sidebar customization changed', {
- element_kind: 'density',
- element_key: density,
- })
- },
completeStarredProductsSetup: () => {
const configuration = withSidebarPatch(values.uiConfiguration, { starred_products_setup_completed: true })
actions.updateUiConfiguration(configuration)
diff --git a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsx b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsx
index 78361b220e5b..e4ba6d823efa 100644
--- a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsx
+++ b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsx
@@ -1,7 +1,6 @@
import { useValues } from 'kea'
import { FEATURE_FLAGS } from 'lib/constants'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { getFeatureFlagPayload } from 'lib/logic/featureFlagLogic'
import { preflightLogic } from 'lib/logic/preflightLogic'
import { userLogic } from 'scenes/userLogic'
@@ -21,7 +20,6 @@ export function NavPanelAdvertisement(): JSX.Element | null {
const { isLayoutNavCollapsed } = useValues(panelLayoutLogic)
const { isCloudOrDev } = useValues(preflightLogic)
const { user } = useValues(userLogic)
- const isSimpleSidepanelEnabled = useFeatureFlag('SIMPLE_SIDEPANEL')
const { starredProductsSetupCompleted } = useValues(uiCustomizationLogic)
const { customProducts } = useValues(customProductsLogic)
@@ -31,10 +29,10 @@ export function NavPanelAdvertisement(): JSX.Element | null {
return null
}
- // A one-time setup for everyone moving to the simple sidebar, so it outranks promotional cards.
+ // A one-time setup for everyone moving from custom products to starred products, so it outranks promotional cards.
// Users without custom products have nothing to move, which includes brand new users before
// their defaults are seeded.
- if (isSimpleSidepanelEnabled && user && !starredProductsSetupCompleted && customProducts.length > 0) {
+ if (user && !starredProductsSetupCompleted && customProducts.length > 0) {
return <NavPanelStarredSetupAd />
}
diff --git a/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx b/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx
index fe68325a9065..4e04e5641dda 100644
--- a/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx
+++ b/frontend/src/lib/components/NavSearchButton/NavSearchButton.tsx
@@ -35,24 +35,3 @@ export function NavSearchButton({
</ButtonPrimitive>
)
}
-
-/** Input-styled full-width search trigger shown below the nav header when the nav is expanded. */
-export function NavSearchBar({ toggleCommand }: { toggleCommand: (source: CommandOpenSource) => void }): JSX.Element {
- return (
- <ButtonPrimitive
- fullWidth
- data-attr="nav-search-bar"
- className="justify-between border border-primary bg-surface-primary rounded-md px-2"
- onClick={() => {
- posthog.capture('nav search clicked')
- toggleCommand('nav-search-bar')
- }}
- >
- <span className="flex items-center gap-1.5 text-secondary">
- <IconSearch className="size-4 shrink-0" />
- <span className="text-xs">Search</span>
- </span>
- <RenderKeybind keybind={[keyBinds.search]} />
- </ButtonPrimitive>
- )
-}
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index ec8177f3fa6c..59b947034270 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -369,7 +369,6 @@ export const FEATURE_FLAGS = {
FLAG_CALLED_MOVE_NOTICES: 'flag-called-move-notices', // owner: #team-feature-flags, shows in-app warnings about the upcoming $feature_flag_called move. Turn on only after the move is announced, because the warnings describe it as planned
FLAG_EVALUATION_TAGS: 'flag-evaluation-tags', // owner: @dmarticus #team-feature-flags
FLAGGED_FEATURE_INDICATOR: 'flagged-feature-indicator', // owner: @benjackwhite
- FLAT_NAV: 'flat-nav', // owner: @rafaeelaudibert #team-growth multivariate=control,test, swaps the tree-based Browse tab for the flat sidebar, see FlatNavBrowse.tsx
GITHUB_FIRST_SELF_DRIVING_ONBOARDING: 'github-first-self-driving-onboarding', // owner: #team-self-driving
GROUP_PROFILE_EXPERIMENT: 'group-profile-experiment', // owner: @arthurdedeus #team-customer-analytics
HEALTH_ASK_AI: 'health-ask-ai', // owner: @jordanm-posthog #team-web-analytics, gates the "Ask PostHog AI" buttons on the Health overview
@@ -547,7 +546,6 @@ export const FEATURE_FLAGS = {
SHOW_REFERRER_FAVICON: 'show-referrer-favicon', // owner: @jordanm-posthog #team-web-analytics
SHOW_REPLAY_FILTERS_FEEDBACK_BUTTON: 'show-replay-filters-feedback-button', // owner: @ksvat #team-replay
SIGNUP_AA_TEST_4_WAY: 'signup-aa-test-4-way', // owner: @andehen #team-experiments multivariate=control,test-1,test-2,test-3
- SIMPLE_SIDEPANEL: 'simple-sidepanel',
SLACK_DWH: 'slack-dwh', // owner: @MarconLP #team-warehouse-sources
SQL_EDITOR_BI_MODE: 'sql-editor-bi-mode', // owner: @mariusandra #team-data-tools
SQL_EDITOR_LAZY_SCHEMA: 'sql-editor-lazy-schema', // owner: @mariusandra #team-data-tools
@@ -591,7 +589,6 @@ export const FEATURE_FLAGS = {
TRACING_TRACE_DIALOG: 'tracing-trace-dialog', // owner: #team-apm — opens traces in a dialog over the current page instead of navigating to tracing
TRACING_UI_V2: 'tracing-ui-v2',
TRAFFIC_TYPE_VIRTUAL_PROPERTIES: 'traffic-type-virtual-properties', // owner: #team-web-analytics
- UI_CUSTOMIZATION: 'ui-customization-enabled', // owner: @fercgomes #team-self-driving, gates sidebar/homepage UI customization
UNIFIED_APM_PRODUCT: 'unified-apm-product', // owner: #team-apm (@jonmcwest, @frankh), gates the shared APM product backing logs, tracing, and metrics
UX_HIDE_PROJECT_NOTICE: 'ux-hide-project-notice', // owner: #team-platform-ux, hides the project notice banner across all scenes
UX_REMOVE_SIDEPANEL: 'ux-remove-sidepanel', // owner: #team-surveys
diff --git a/frontend/src/mocks/browser.tsx b/frontend/src/mocks/browser.tsx
index 60c7b2907d72..2118d49199b2 100644
--- a/frontend/src/mocks/browser.tsx
+++ b/frontend/src/mocks/browser.tsx
@@ -1,12 +1,28 @@
import type { Decorator } from '@storybook/react'
import { setupWorker } from 'msw/browser'
-import { handlers } from '~/mocks/handlers'
+import { handlers, toPaginatedResponse } from '~/mocks/handlers'
import { HTTP_METHODS, MockSignature, Mocks, mocksToHandlers } from '~/mocks/utils'
import type { AppContext } from '~/types'
-// Default handlers ensure no request is unhandled by msw
-export const worker: ReturnType<typeof setupWorker> = setupWorker(...handlers)
+// Stories start with the products new users get starred, so the sidebar shows those instead of the
+// whole product catalog. A story that mocks shortcuts itself still wins.
+const storybookDefaultMocks: Mocks = {
+ get: {
+ '/api/environments/:team_id/file_system_shortcut/': toPaginatedResponse([
+ { id: 'starred-dashboards', path: 'Dashboards', type: 'dashboard', order: 1 },
+ { id: 'starred-product-analytics', path: 'Product analytics', type: 'product_analytics', order: 2 },
+ { id: 'starred-web-analytics', path: 'Web analytics', type: 'web_analytics', order: 3 },
+ { id: 'starred-mcp-analytics', path: 'MCP analytics', type: 'mcp_analytics', order: 4 },
+ ]),
+ },
+}
+
+// Default handlers ensure no request is unhandled by msw. Handlers listed first take precedence.
+export const worker: ReturnType<typeof setupWorker> = setupWorker(
+ ...mocksToHandlers(storybookDefaultMocks),
+ ...handlers
+)
export const useStorybookMocks = (mocks: Mocks): void => worker.use(...mocksToHandlers(mocks))
diff --git a/frontend/src/scenes/settings/SettingsMap.tsx b/frontend/src/scenes/settings/SettingsMap.tsx
index e89a8719b3b9..0b36175993b3 100644
--- a/frontend/src/scenes/settings/SettingsMap.tsx
+++ b/frontend/src/scenes/settings/SettingsMap.tsx
@@ -203,13 +203,6 @@ import { PersonalGitHubIntegrations, PersonalSlackIntegrations } from './user/Pe
import { ProfilePictureSettings } from './user/ProfilePictureSettings'
import { RealtimeNotificationPreferences } from './user/RealtimeNotificationPreferences'
import { Reminders } from './user/Reminders'
-import { SidebarAutoSuggestSetting } from './user/SidebarProductSettings'
-import {
- HomepageSetting,
- SidebarItemsSetting,
- SidebarLayoutSetting,
- SidebarMyProductsSetting,
-} from './user/SidebarSettings'
import { TaskCommentSlackNotifications } from './user/TaskCommentSlackNotifications'
import { ThemeSwitcher } from './user/ThemeSwitcher'
import { TwoFactorSettings } from './user/TwoFactorSettings'
@@ -2646,16 +2639,6 @@ export const SETTINGS_MAP: SettingSection[] = [
flag: 'CONTROL_SUPPORT_LOGIN',
keywords: ['impersonation', 'support login', 'debug'],
},
- {
- id: 'sidebar-auto-suggest',
- title: 'Automatically suggest new products',
- description:
- "When we detect you are using a new product, we'll automatically add it to your sidebar as a suggestion. We might also suggest products that are related to the ones you are using when we launch a new one.",
- component: <SidebarAutoSuggestSetting />,
- // Suggestions land in custom products, which the simple sidebar does not show.
- flag: '!SIMPLE_SIDEPANEL',
- keywords: ['sidebar', 'suggest', 'products', 'apps', 'tools', 'auto'],
- },
{
id: 'web-analytics-achievements',
title: 'Web analytics achievements',
@@ -2687,46 +2670,6 @@ export const SETTINGS_MAP: SettingSection[] = [
},
],
},
- {
- level: 'user',
- id: 'user-navigation',
- title: 'Navigation',
- // The simple sidebar edits these inline, from its own customize dialog.
- flag: ['UI_CUSTOMIZATION', '!SIMPLE_SIDEPANEL'],
- settings: [
- {
- id: 'homepage',
- title: 'Homepage',
- description:
- 'The page that opens when you open PostHog or select Home in the sidebar. This applies to the current project.',
- component: <HomepageSetting />,
- keywords: ['homepage', 'home', 'default page', 'landing page', 'launchpad', 'start'],
- },
- {
- id: 'sidebar-layout',
- title: 'Layout',
- description: 'Control how dense the sidebar rows are.',
- component: <SidebarLayoutSetting />,
- keywords: ['sidebar', 'layout', 'density', 'compact', 'comfortable'],
- },
- {
- id: 'sidebar-items',
- title: 'Navigation items',
- description:
- 'Choose which items appear in your sidebar. These preferences only apply to you. Activity and Settings always stay visible.',
- component: <SidebarItemsSetting />,
- keywords: ['sidebar', 'navigation', 'navbar', 'menu', 'hide', 'show', 'customize', 'starred'],
- },
- {
- id: 'sidebar-my-tools',
- title: 'My products',
- description:
- 'Choose which products appear in the My products section of your sidebar. This selection applies to the current project.',
- component: <SidebarMyProductsSetting />,
- keywords: ['sidebar', 'tools', 'products', 'apps', 'my tools', 'my products', 'customize'],
- },
- ],
- },
{
level: 'user',
id: 'user-feature-previews',
diff --git a/frontend/src/scenes/settings/stories/SettingsUser.stories.tsx b/frontend/src/scenes/settings/stories/SettingsUser.stories.tsx
index d4c1b4d63edb..bf5a3e16730e 100644
--- a/frontend/src/scenes/settings/stories/SettingsUser.stories.tsx
+++ b/frontend/src/scenes/settings/stories/SettingsUser.stories.tsx
@@ -219,10 +219,6 @@ export const SettingsUserCustomization: Story = {
args: { sectionId: 'user-customization' },
}
-export const SettingsUserNavigation: Story = {
- args: { sectionId: 'user-navigation' },
-}
-
export const SettingsUserDangerZone: Story = {
args: { sectionId: 'user-danger-zone' },
}
diff --git a/frontend/src/scenes/settings/types.ts b/frontend/src/scenes/settings/types.ts
index e54b9ee6ca4a..b489d9b05a90 100644
--- a/frontend/src/scenes/settings/types.ts
+++ b/frontend/src/scenes/settings/types.ts
@@ -103,7 +103,6 @@ export type SettingSectionId =
| 'user-api-keys'
| 'user-connected-apps'
| 'user-customization'
- | 'user-navigation'
| 'user-feature-previews'
| 'user-notifications'
| 'user-personal-integrations'
@@ -205,7 +204,6 @@ export type SettingId =
| 'heatmap-screenshot-cookie'
| 'heatmaps-capture'
| 'hedgehog-mode'
- | 'homepage'
| 'human-friendly-comparison-periods'
| 'integration-error-tracking'
| 'integration-github'
@@ -292,10 +290,6 @@ export type SettingId =
| 'scim-configuration'
| 'session-join-mode'
| 'session-table-version'
- | 'sidebar-auto-suggest'
- | 'sidebar-items'
- | 'sidebar-layout'
- | 'sidebar-my-tools'
| 'snippet'
| 'snippet-v2'
| 'surveys-default-appearance'
diff --git a/frontend/src/scenes/settings/user/SidebarProductSettings.tsx b/frontend/src/scenes/settings/user/SidebarProductSettings.tsx
deleted file mode 100644
index f2ba66905380..000000000000
--- a/frontend/src/scenes/settings/user/SidebarProductSettings.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useActions, useValues } from 'kea'
-
-import { LemonSwitch } from '@posthog/lemon-ui'
-
-import { userLogic } from 'scenes/userLogic'
-
-export function SidebarAutoSuggestSetting(): JSX.Element {
- const { user, userLoading } = useValues(userLogic)
- const { updateUser } = useActions(userLogic)
-
- return (
- <LemonSwitch
- onChange={(checked) => {
- updateUser({ allow_sidebar_suggestions: checked })
- }}
- checked={user?.allow_sidebar_suggestions ?? false}
- loading={userLoading}
- label="Automatically suggest new products"
- bordered
- />
- )
-}
diff --git a/frontend/src/scenes/settings/user/SidebarSettings.tsx b/frontend/src/scenes/settings/user/SidebarSettings.tsx
deleted file mode 100644
index f4f33d3ba5a6..000000000000
--- a/frontend/src/scenes/settings/user/SidebarSettings.tsx
+++ /dev/null
@@ -1,256 +0,0 @@
-import { useActions, useValues } from 'kea'
-
-import { LemonLabel, LemonSegmentedButton, LemonSwitch } from '@posthog/lemon-ui'
-
-import { Link } from 'lib/lemon-ui/Link'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
-import { getProductAccessDisabledReason } from 'lib/utils/accessControlUtils'
-import { isFileSystemImportFlagEnabled } from 'lib/utils/fileSystemImportFlags'
-
-import { customProductsLogic } from '~/layout/panel-layout/ProjectTree/customProductsLogic'
-import { getDefaultTreeProducts, iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'
-import { getCategoryOrder } from '~/layout/panel-layout/ProjectTree/utils'
-import {
- SIDEBAR_CUSTOMIZABLE_FOOTER_ITEMS,
- SIDEBAR_CUSTOMIZABLE_SECTIONS,
- SidebarCustomizableItem,
-} from '~/layout/panel-layout/sidebarCustomization'
-import { sidebarProductMeta } from '~/layout/panel-layout/sidebarProductMeta'
-import { HomepageConfiguration } from '~/layout/scenes/HomepageConfiguration'
-import { uiCustomizationLogic } from '~/layout/uiCustomizationLogic'
-import { FileSystemImport, SidebarDensity } from '~/queries/schema/schema-general'
-
-export function HomepageSetting(): JSX.Element {
- return (
- <div className="max-w-160">
- <HomepageConfiguration />
- </div>
- )
-}
-
-export function SidebarLayoutSetting(): JSX.Element {
- const { sidebarDensity } = useValues(uiCustomizationLogic)
- const { setSidebarDensity } = useActions(uiCustomizationLogic)
-
- return (
- <div className="flex flex-col gap-4 max-w-160">
- <div className="flex flex-col gap-2">
- <LemonLabel>Density</LemonLabel>
- <LemonSegmentedButton
- value={sidebarDensity}
- onChange={(value) => setSidebarDensity(value as SidebarDensity)}
- options={[
- { value: 'comfortable', label: 'Comfortable' },
- { value: 'compact', label: 'Compact' },
- ]}
- size="small"
- data-attr="sidebar-customization-density"
- />
- </div>
- </div>
- )
-}
-
-function ItemLabel({
- icon,
- label,
- description,
- docsHref,
-}: {
- icon: JSX.Element
- label: string
- description?: string
- docsHref?: string
-}): JSX.Element {
- return (
- <span className="flex items-center gap-2">
- <span className="text-lg text-secondary flex items-center">{icon}</span>
- <span className="flex flex-col">
- <span className="flex items-center gap-2">
- {label}
- {docsHref && (
- <Link
- to={docsHref}
- target="_blank"
- className="text-xs font-normal"
- onClick={(e) => e.stopPropagation()}
- >
- Docs
- </Link>
- )}
- </span>
- {description && <span className="text-xs font-normal text-secondary">{description}</span>}
- </span>
- </span>
- )
-}
-
-export function SidebarItemsSetting(): JSX.Element {
- const { isSidebarSectionShown, isSidebarItemShown, userLoading } = useValues(uiCustomizationLogic)
- const { setSidebarSectionShown, setSidebarItemShown } = useActions(uiCustomizationLogic)
- const { featureFlags } = useValues(featureFlagLogic)
-
- const renderItemSwitch = (item: SidebarCustomizableItem): JSX.Element => {
- const { key } = item
- if (!key) {
- return (
- <LemonSwitch
- key={item.label}
- className="py-2"
- checked={true}
- disabledReason={`${item.label} always stays visible`}
- label={
- <ItemLabel
- icon={item.icon}
- label={item.label}
- description={item.description}
- docsHref={item.docsHref}
- />
- }
- bordered
- fullWidth
- data-attr={`sidebar-customization-item-${item.label.toLowerCase()}`}
- />
- )
- }
- return (
- <LemonSwitch
- key={key}
- className="py-2"
- checked={isSidebarItemShown(key)}
- onChange={(checked) => setSidebarItemShown(key, checked)}
- loading={userLoading}
- label={
- <ItemLabel
- icon={item.icon}
- label={item.label}
- description={item.description}
- docsHref={item.docsHref}
- />
- }
- bordered
- fullWidth
- data-attr={`sidebar-customization-item-${key}`}
- />
- )
- }
-
- return (
- <div className="flex flex-col gap-4 max-w-160">
- {SIDEBAR_CUSTOMIZABLE_SECTIONS.map((section) => {
- const items = section.items.filter(
- (item) => !item.flag || (featureFlags as Record<string, boolean | string>)[item.flag]
- )
- // A section with no items of its own is a single sidebar element, so it toggles
- // directly rather than heading a group.
- if (items.length === 0) {
- return (
- <LemonSwitch
- key={section.key}
- className="py-2"
- checked={isSidebarSectionShown(section.key)}
- onChange={(checked) => setSidebarSectionShown(section.key, checked)}
- loading={userLoading}
- label={
- <ItemLabel
- icon={section.icon}
- label={section.label}
- description={section.description}
- docsHref={section.docsHref}
- />
- }
- bordered
- fullWidth
- data-attr={`sidebar-customization-section-${section.key}`}
- />
- )
- }
- return (
- <div key={section.key} className="flex flex-col gap-2">
- <LemonLabel>{section.label}</LemonLabel>
- {items.map((item) => renderItemSwitch(item))}
- </div>
- )
- })}
- <div className="flex flex-col gap-2">
- <LemonLabel>Bottom of the sidebar</LemonLabel>
- {SIDEBAR_CUSTOMIZABLE_FOOTER_ITEMS.filter(
- (item) => !item.flag || (featureFlags as Record<string, boolean | string>)[item.flag]
- ).map((item) => renderItemSwitch(item))}
- </div>
- </div>
- )
-}
-
-export function SidebarMyProductsSetting(): JSX.Element {
- const { enabledProductPaths, customProductsLoading } = useValues(customProductsLogic)
- const { setProductEnabled } = useActions(customProductsLogic)
- const { featureFlags } = useValues(featureFlagLogic)
-
- const products = getDefaultTreeProducts()
- .filter((product) => isFileSystemImportFlagEnabled(product, featureFlags))
- .filter((product) => !getProductAccessDisabledReason(product))
- const productsByCategory = new Map<string, FileSystemImport[]>()
- for (const product of products) {
- const category = product.category || 'Other'
- if (!productsByCategory.has(category)) {
- productsByCategory.set(category, [])
- }
- productsByCategory.get(category)?.push(product)
- }
- // Mirror the sidebar tree ordering: hardcoded category order, then visualOrder, then name.
- const sortProducts = (a: FileSystemImport, b: FileSystemImport): number => {
- if (a.visualOrder !== undefined && b.visualOrder !== undefined) {
- return a.visualOrder - b.visualOrder
- }
- if (a.visualOrder !== undefined) {
- return -1
- }
- if (b.visualOrder !== undefined) {
- return 1
- }
- return (a.displayLabel ?? a.path).localeCompare(b.displayLabel ?? b.path, undefined, {
- sensitivity: 'accent',
- })
- }
-
- return (
- // The colorful-product-icons group class turns on each product's brand color, as in the navbar.
- <div className="flex flex-col gap-4 max-w-160 group/colorful-product-icons colorful-product-icons-true">
- {[...productsByCategory.entries()]
- .sort(
- (a, b) =>
- getCategoryOrder(a[0]) - getCategoryOrder(b[0]) ||
- a[0].localeCompare(b[0], undefined, { sensitivity: 'accent' })
- )
- .map(([category, categoryProducts]) => (
- <div key={category} className="flex flex-col gap-2">
- <LemonLabel>{category}</LemonLabel>
- {[...categoryProducts].sort(sortProducts).map((product) => {
- const { description, docsHref } = sidebarProductMeta(product)
- return (
- <LemonSwitch
- key={product.path}
- className="py-2"
- checked={enabledProductPaths.has(product.path)}
- onChange={(checked) => setProductEnabled(product.path, checked)}
- loading={customProductsLoading}
- label={
- <ItemLabel
- icon={iconForType(product.iconType, product.iconColor)}
- label={product.displayLabel ?? product.path}
- description={description}
- docsHref={docsHref}
- />
- }
- bordered
- fullWidth
- data-attr={`sidebar-customization-tool-${product.path}`}
- />
- )
- })}
- </div>
- ))}
- </div>
- )
-}
diff --git a/frontend/src/scenes/terminal/TerminalScene.stories.tsx b/frontend/src/scenes/terminal/TerminalScene.stories.tsx
index 1af50fac5d57..af6f06c3b79c 100644
--- a/frontend/src/scenes/terminal/TerminalScene.stories.tsx
+++ b/frontend/src/scenes/terminal/TerminalScene.stories.tsx
@@ -416,7 +416,7 @@ export const DockedWide: StoryObj<typeof TerminalScene> = {
...Docked,
parameters: {
...Docked.parameters,
- featureFlags: [FEATURE_FLAGS.POSTHOG_TERMINAL, FEATURE_FLAGS.SIMPLE_SIDEPANEL],
+ featureFlags: [FEATURE_FLAGS.POSTHOG_TERMINAL],
testOptions: { viewport: { width: 1440, height: 900 }, includeNavigationInSnapshot: true },
},
}
diff --git a/frontend/src/scenes/terminal/terminalLogic.test.ts b/frontend/src/scenes/terminal/terminalLogic.test.ts
index c9146f0e939f..63add56b8e73 100644
--- a/frontend/src/scenes/terminal/terminalLogic.test.ts
+++ b/frontend/src/scenes/terminal/terminalLogic.test.ts
@@ -69,32 +69,19 @@ describe('terminal lifecycle', () => {
afterEach(() => jest.restoreAllMocks())
- it.each([false, true])('opens folders with the simple side panel enabled: %s', (enabled) => {
- featureFlagLogic.actions.setFeatureFlags([], {
- [FEATURE_FLAGS.POSTHOG_TERMINAL]: true,
- [FEATURE_FLAGS.SIMPLE_SIDEPANEL]: enabled,
- })
+ it('opens folder links in the files tab and other links in the scene', () => {
const push = jest.spyOn(router.actions, 'push')
- const url = urls.projectFiles('Research & notes/Reports')
- terminalLogic.actions.openUrl(url)
- if (enabled) {
- expect(push).not.toHaveBeenCalled()
- expect(panelLayoutLogic.values.navExperimentActiveTab).toBe('files')
- expect(projectTreeLogic({ key: FILES_TREE_KEY, root: 'project://' }).values.expandedFolders).toContain(
- 'project://Research & notes/Reports'
- )
- } else {
- expect(push).toHaveBeenCalledWith(url)
- }
+ terminalLogic.actions.openUrl(urls.projectFiles('Research & notes/Reports'))
+ expect(push).not.toHaveBeenCalled()
+ expect(panelLayoutLogic.values.navExperimentActiveTab).toBe('files')
+ expect(projectTreeLogic({ key: FILES_TREE_KEY, root: 'project://' }).values.expandedFolders).toContain(
+ 'project://Research & notes/Reports'
+ )
terminalLogic.actions.openUrl('/insights/example')
expect(push).toHaveBeenCalledWith('/insights/example')
})
it.each([true, false])('keeps project-qualified folder links in their own project: %s', (sameProject) => {
- featureFlagLogic.actions.setFeatureFlags([], {
- [FEATURE_FLAGS.POSTHOG_TERMINAL]: true,
- [FEATURE_FLAGS.SIMPLE_SIDEPANEL]: true,
- })
const push = jest.spyOn(router.actions, 'push')
const projectId = MOCK_DEFAULT_TEAM.id + (sameProject ? 0 : 1)
const url = `/project/${projectId}/files?folder=Reports`
diff --git a/frontend/src/scenes/terminal/terminalLogic.ts b/frontend/src/scenes/terminal/terminalLogic.ts
index 9b7dce6f397a..39784134ba6d 100644
--- a/frontend/src/scenes/terminal/terminalLogic.ts
+++ b/frontend/src/scenes/terminal/terminalLogic.ts
@@ -2,7 +2,6 @@ import { MakeLogicType, actions, connect, isBreakpoint, kea, listeners, path, re
import { router } from 'kea-router'
import { subscriptions } from 'kea-subscriptions'
-import { FEATURE_FLAGS } from 'lib/constants'
import { lemonToast } from 'lib/lemon-ui/LemonToast'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { copyToClipboard } from 'lib/utils/copyToClipboard'
@@ -273,7 +272,6 @@ export const terminalLogic = kea<terminalLogicType>([
const target = new URL(url, window.location.origin)
const targetProjectId = getProjectIdentifierInPath(target.pathname)
if (
- featureFlagLogic.values.featureFlags[FEATURE_FLAGS.SIMPLE_SIDEPANEL] &&
target.origin === window.location.origin &&
(targetProjectId === null || targetProjectId === String(values.currentTeamId)) &&
removeProjectIdIfPresent(target.pathname) === urls.projectFiles()
diff --git a/playwright/e2e/sql-editor.spec.ts b/playwright/e2e/sql-editor.spec.ts
index e200b3e8117a..abcfa93ea01c 100644
--- a/playwright/e2e/sql-editor.spec.ts
+++ b/playwright/e2e/sql-editor.spec.ts
@@ -57,7 +57,7 @@ test.describe('SQL Editor', () => {
test('See SQL Editor', async ({ page }) => {
await expect(page.getByTestId('editor-scene')).toBeVisible()
- await expect(page.getByText('Sources', { exact: true })).toBeVisible()
+ await expect(page.getByTestId('menu-item-sources')).toBeVisible()
await expect(page.getByTestId('sql-editor-add-source')).toBeVisible()
await expect(page.getByTestId('sql-editor-output-pane-empty-state')).toBeVisible()
await expect(page.locator('.scene-name h1 span').getByText('New SQL query', { exact: true })).toBeVisible()
diff --git a/posthog/api/file_system/test/test_file_system_shortcut.py b/posthog/api/file_system/test/test_file_system_shortcut.py
index 8e7985a80536..d0a2e77ea4ef 100644
--- a/posthog/api/file_system/test/test_file_system_shortcut.py
+++ b/posthog/api/file_system/test/test_file_system_shortcut.py
@@ -9,6 +9,7 @@ from rest_framework import status
from posthog.models import User
from posthog.models.file_system.file_system_shortcut import FileSystemShortcut
+from posthog.test.starred_products import start_without_default_starred_products
from products.access_control.backend.models.access_control import AccessControl
from products.dashboards.backend.models.dashboard import Dashboard
@@ -16,6 +17,10 @@ from products.product_analytics.backend.facade.models import Insight
class TestFileSystemShortcutAPI(APIBaseTest):
+ def setUp(self):
+ super().setUp()
+ start_without_default_starred_products(self)
+
def test_list_shortcuts_initially_empty(self):
response = self.client.get(f"/api/projects/{self.team.id}/file_system_shortcut/")
self.assertEqual(response.status_code, status.HTTP_200_OK, response.json())
@@ -288,6 +293,7 @@ class TestFileSystemShortcutAPI(APIBaseTest):
class TestFileSystemShortcutAccessLevels(APIBaseTest):
def setUp(self):
super().setUp()
+ start_without_default_starred_products(self)
self.organization.available_product_features = [
{"key": "access_control", "name": "access_control"},
{"key": "role_based_access", "name": "role_based_access"},
diff --git a/posthog/api/file_system/test/test_home_folder.py b/posthog/api/file_system/test/test_home_folder.py
index 4b1ddec32543..c4b92534d0c5 100644
--- a/posthog/api/file_system/test/test_home_folder.py
+++ b/posthog/api/file_system/test/test_home_folder.py
@@ -7,11 +7,13 @@ from posthog.models import Organization, Team
from posthog.models.file_system.file_system import FileSystem, split_path
from posthog.models.file_system.file_system_home_folder import FileSystemHomeFolder
from posthog.models.file_system.file_system_shortcut import FileSystemShortcut
+from posthog.test.starred_products import start_without_default_starred_products
class TestHomeFolder(APIBaseTest):
def setUp(self) -> None:
super().setUp()
+ start_without_default_starred_products(self)
self.user.first_name = "Alex Example"
self.user.save(update_fields=["first_name"])
self.url = f"/api/projects/{self.team.id}/file_system/home_folder/"
diff --git a/posthog/api/test/test_user.py b/posthog/api/test/test_user.py
index 50695e13fa29..2e548a488bef 100644
--- a/posthog/api/test/test_user.py
+++ b/posthog/api/test/test_user.py
@@ -278,6 +278,9 @@ class TestUserAPI(APIBaseTest):
assert response.json() == {"a bag": "of data"}
def test_can_update_ui_configuration(self):
+ # Joining marks the starred setup done, and updates keep that key, so start from nothing.
+ self.user.ui_configuration = None
+ self.user.save(update_fields=["ui_configuration"])
configuration = {
"version": 1,
"sidebar": {
diff --git a/posthog/management/commands/test/test_sync_user_settings.py b/posthog/management/commands/test/test_sync_user_settings.py
index 577aecd0bccd..24793e9cdbb2 100644
--- a/posthog/management/commands/test/test_sync_user_settings.py
+++ b/posthog/management/commands/test/test_sync_user_settings.py
@@ -12,11 +12,13 @@ from parameterized import parameterized
from posthog.models import User
from posthog.models.file_system.file_system_shortcut import FileSystemShortcut
from posthog.models.user_home_settings import UserHomeSettings
+from posthog.test.starred_products import start_without_default_starred_products
class TestSyncUserSettingsCommand(BaseTest):
def setUp(self):
super().setUp()
+ start_without_default_starred_products(self)
# Set up initial local user state
self.user.theme_mode = "light"
self.user.toolbar_mode = "toolbar"
diff --git a/posthog/models/file_system/starred_products.py b/posthog/models/file_system/starred_products.py
index a25052b5b1a1..e003176b556f 100644
--- a/posthog/models/file_system/starred_products.py
+++ b/posthog/models/file_system/starred_products.py
@@ -2,8 +2,6 @@ from typing import TYPE_CHECKING, Any
from django.db import transaction
-import posthoganalytics
-
from posthog.models.file_system.constants import DEFAULT_SURFACE, surface_q
from posthog.models.file_system.file_system_shortcut import FileSystemShortcut, lock_user_shortcuts
from posthog.models.user import User
@@ -12,9 +10,6 @@ from posthog.products import Products
if TYPE_CHECKING:
from posthog.models.team import Team
-# pinned: feature flag key, must match FEATURE_FLAGS.SIMPLE_SIDEPANEL in frontend/src/lib/constants.tsx
-SIMPLE_SIDEPANEL_FLAG = "simple-sidepanel"
-
def starred_products_setup_completed(user: User) -> bool:
configuration = user.ui_configuration
@@ -22,21 +17,6 @@ def starred_products_setup_completed(user: User) -> bool:
return isinstance(sidebar, dict) and bool(sidebar.get("starred_products_setup_completed"))
-def _simple_sidebar_enabled(user: User, team: "Team") -> bool:
- return bool(
- posthoganalytics.feature_enabled(
- SIMPLE_SIDEPANEL_FLAG,
- str(user.distinct_id),
- person_properties={"email": user.email},
- # Same group keys as the frontend's posthog.group() calls, so both sides get the same answer.
- groups={"organization": str(team.organization_id), "project": str(team.uuid)},
- group_properties={"organization": {"id": str(team.organization_id)}},
- only_evaluate_locally=False,
- send_feature_flag_events=False,
- )
- )
-
-
def mark_starred_products_setup_completed(user: User) -> None:
# Merge into the stored value under a short row lock, so a concurrent settings change is kept.
# NO KEY UPDATE is the lock the UPDATE takes anyway, and it does not block inserts of child rows.
@@ -94,7 +74,7 @@ def star_products(user: User, team: "Team", product_paths: list[str]) -> int:
def star_custom_products(user: User, team: "Team", product_paths: list[str], *, had_custom_products: bool) -> None:
- """Star products that were just added to a user's custom products, for simple sidebar users.
+ """Star products that were just added to a user's custom products.
The simple sidebar shows starred products instead of custom products, so every write that adds
custom products calls this to keep the two in step. `had_custom_products` says whether the user
@@ -110,8 +90,6 @@ def star_custom_products(user: User, team: "Team", product_paths: list[str], *,
completed = starred_products_setup_completed(user)
if not completed and had_custom_products:
return
- if not _simple_sidebar_enabled(user, team):
- return
star_products(user, team, product_paths)
diff --git a/posthog/models/file_system/test/test_user_product_list.py b/posthog/models/file_system/test/test_user_product_list.py
index 45865273b2f5..22c6e0a8cc81 100644
--- a/posthog/models/file_system/test/test_user_product_list.py
+++ b/posthog/models/file_system/test/test_user_product_list.py
@@ -1,7 +1,6 @@
from typing import cast
from posthog.test.base import BaseTest
-from unittest.mock import patch
from django.utils.functional import SimpleLazyObject
@@ -74,16 +73,14 @@ class TestStarCustomProductsForSimpleSidebar(BaseTest):
@parameterized.expand(
[
- ("brand_new_user_on_flag", True, False, False, set(DEFAULT_PRODUCT_PATHS), True),
- ("brand_new_user_off_flag", False, False, False, set(), False),
- ("existing_user_mid_migration", True, True, False, set(), False),
- ("user_who_finished_setup", True, True, True, set(DEFAULT_PRODUCT_PATHS), True),
+ ("brand_new_user", False, False, set(DEFAULT_PRODUCT_PATHS), True),
+ ("existing_user_mid_migration", True, False, set(), False),
+ ("user_who_finished_setup", True, True, set(DEFAULT_PRODUCT_PATHS), True),
]
)
- def test_default_products_are_starred_only_for_flagged_new_or_finished_users(
+ def test_default_products_are_starred_only_for_new_or_finished_users(
self,
_name: str,
- flag_enabled: bool,
has_custom_products: bool,
setup_completed: bool,
expected_starred: set[str],
@@ -100,10 +97,7 @@ class TestStarCustomProductsForSimpleSidebar(BaseTest):
}
user.save()
- with patch(
- "posthog.models.file_system.starred_products.posthoganalytics.feature_enabled", return_value=flag_enabled
- ):
- add_default_products_for_user(cast(User, SimpleLazyObject(lambda: user)), self.team)
+ add_default_products_for_user(cast(User, SimpleLazyObject(lambda: user)), self.team)
assert set(self._starred(user)) == expected_starred
user.refresh_from_db()
@@ -118,9 +112,8 @@ class TestStarCustomProductsForSimpleSidebar(BaseTest):
FileSystemShortcut.objects.create(team=self.team, user=user, path="Session replay", type="session_replay")
intent = ProductIntent.objects.create(team=self.team, product_type="session_replay")
- with patch("posthog.models.file_system.starred_products.posthoganalytics.feature_enabled", return_value=True):
- UserProductList.create_from_product_intent(intent, user)
- UserProductList.create_from_product_intent(intent, user)
+ UserProductList.create_from_product_intent(intent, user)
+ UserProductList.create_from_product_intent(intent, user)
assert FileSystemShortcut.objects.filter(user=user, team=self.team, path="Session replay").count() == 1
assert set(self._starred(user)) == {
@@ -133,8 +126,7 @@ class TestStarCustomProductsForSimpleSidebar(BaseTest):
user.save()
UserProductList.objects.create(user=user, team=self.team, product_path="Session replay", enabled=True)
- with patch("posthog.models.file_system.starred_products.posthoganalytics.feature_enabled", return_value=True):
- UserProductList.enable_all_for_user(user, self.team)
+ UserProductList.enable_all_for_user(user, self.team)
starred = set(self._starred(user))
assert "Session replay" not in starred
diff --git a/posthog/test/starred_products.py b/posthog/test/starred_products.py
new file mode 100644
index 000000000000..4a3ccc93f819
--- /dev/null
+++ b/posthog/test/starred_products.py
@@ -0,0 +1,15 @@
+from unittest import TestCase
+from unittest.mock import patch
+
+from posthog.models.file_system.file_system_shortcut import FileSystemShortcut
+
+
+def start_without_default_starred_products(test_case: TestCase) -> None:
+ """Remove the default product stars users get when they join, and stop users created later from getting them.
+
+ For tests about the shortcuts a user creates, where the defaults would only add rows to every assertion.
+ """
+ FileSystemShortcut.objects.all().delete()
+ patcher = patch("posthog.models.file_system.user_product_list.add_default_products_for_accessible_teams")
+ patcher.start()
+ test_case.addCleanup(patcher.stop)
diff --git a/products/data_warehouse/frontend/shared/logics/sqlEditorVimLogic.test.ts b/products/data_warehouse/frontend/shared/logics/sqlEditorVimLogic.test.ts
index f908682a0ba4..17f386ad8fa0 100644
--- a/products/data_warehouse/frontend/shared/logics/sqlEditorVimLogic.test.ts
+++ b/products/data_warehouse/frontend/shared/logics/sqlEditorVimLogic.test.ts
@@ -129,7 +129,7 @@ describe('sqlEditorVimLogic', () => {
setUp({ uiConfiguration: { version: 1 } })
if (scenario === 'sidebar-before-vim') {
- uiCustomizationLogic.actions.setSidebarDensity('compact')
+ uiCustomizationLogic.actions.completeStarredProductsSetup()
} else {
logic.actions.setVimModeEnabled(true)
}
@@ -139,7 +139,7 @@ describe('sqlEditorVimLogic', () => {
logic.actions.setVimrcDraft('set relativenumber')
logic.actions.saveVimrc()
} else if (scenario === 'sidebar-after-vim') {
- uiCustomizationLogic.actions.setSidebarDensity('compact')
+ uiCustomizationLogic.actions.completeStarredProductsSetup()
} else {
logic.actions.setVimModeEnabled(true)
}
@@ -149,7 +149,7 @@ describe('sqlEditorVimLogic', () => {
const expectedConfiguration = {
version: 1,
- ...(scenario === 'vimrc' ? {} : { sidebar: { density: 'compact' } }),
+ ...(scenario === 'vimrc' ? {} : { sidebar: { starred_products_setup_completed: true } }),
sql_editor: {
vim_mode_enabled: true,
...(scenario === 'vimrc' ? { vimrc: 'set relativenumber' } : {}),