:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore: Remove AI_FIRST feature flag and consolidate to AI-first UI (#56598)
Adam Leith2ad49d7c9b47
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 11a308912f87..9fff2d55b8bd 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -3987,13 +3987,13 @@ snapshots:scenes-app-data-warehouse-settings-schemas--default--light:hash: v1.k794b7964.f44aebec23a383bf47c5310e229767e329dc9a52d220851265c86e2531dfd8f6.cg8SBdNPjYob5gTIonGhj0QupXWDzvTSG73043B7QEkscenes-app-error-project-unavailable--access-revoked--dark:- hash: v1.k794b7964.b4b79f916091f0012ea76c7a0ebb5edfa465c98a503b5f544e6b3718f78b4799.pCe7LRrxPj_q7ErqOsrN1stM6UbZzC6XTRkaiD30Kew+ hash: v1.k794b7964.3798bc2d0dd1b8d79bb873b525f9502b4e71d0b5ea84427c3e70acf41f655f8a.1piuLJMJZ2dFAS6P3SdyhAU3Dqi0iZNpiPy1nQdY-IYscenes-app-error-project-unavailable--access-revoked--light:- hash: v1.k794b7964.44ad2d7a183ac64a4d05359f00860edf8cafec08080d682080f4eb6eaee81c7e.n7GnnBU1uhIsif5ra_mqPZQvrH6-SaIfftB7YmyXeSI+ hash: v1.k794b7964.16f6501d3ddeee2977b163de83b93f98d3dc84425989a42a8a216c7c7cf4c6a7.VJ4ed_cpC25t_XTFW0RYk8AQ9Mp30dIcHIjsm9dfuDQscenes-app-error-project-unavailable--no-selectable-projects--dark:- hash: v1.k794b7964.c6003c2524e8c53fedc1491c9dd11fac9c265af3f9c60c08a00a4b2a2cb83bfa.dPNKm5XcqRQLEOV01Lcp4VnrVSQXpmvcA-X9JQYkBRw+ hash: v1.k794b7964.1ef72e31eeb11a38f79eee70f9aa863f51d8d18f28c6a3cea044848127261ff2.pczG9ejAjkdWZ4t9NOubMj-xRbMmjeDX2-pGuyqLhRgscenes-app-error-project-unavailable--no-selectable-projects--light:- hash: v1.k794b7964.9d548f183133290dee7730596ac9f38b0192becdbcc12e5cc9d646d10d3d8308.kQaolEF0ygaNwyj9UvuUxh4czqWfPM27MXkF5O5225Y+ hash: v1.k794b7964.0c741ab4573b5b5110b39416de14c0582dabe028fdc8b675f8ec77acd4152118.ROsEhjFDQRXaXT5TgjuUwv74LywcqGBz3znNuXOYs9Iscenes-app-errortracking--group-page--dark:hash: v1.k794b7964.7235313c458bc1d7f61712b8cfbdc9e38b9b8a7468065116e8a6c6f887fc528a.HY3dlWvjoaKC5MF58_75uqH8q4VW2IkkO4OfcIFkaUMscenes-app-errortracking--group-page--light:@@ -5163,13 +5163,13 @@ snapshots:scenes-app-posthog-ai--welcome-with-latest-conversations--light:hash: v1.k794b7964.e748e62b24fe96ae9cd96facb3d679d9649615f7b092f31dc1e3a67aef15c490._-KVj3kzPaGvcu9N4RgpmLPK1ovZANsm4YM9t1s4IUcscenes-app-project-homepage--no-primary-dashboard--dark:- hash: v1.k794b7964.57aec79475c772556d25c9f66bfd9db79044d6d003b01891cd92822f2f3dfaf6.kNGxWvsGJSP-WQGQHZvp-ppWF-yJ8sEoYnWji6bj2jQ+ hash: v1.k794b7964.83d267b40bfc2dca4b211cb28537f4b958822ee469c611e60535af2ab79e1621.2YhseEUdyiKAro1A2SILMNhqo09MkyLxq58IMRPK-E8scenes-app-project-homepage--no-primary-dashboard--light:- hash: v1.k794b7964.1473b5534e6460c88ac06599d145e8946f43b91316c38ee1d035404c29699d04.DcTnBQhCChpdJICkowohmcCqKrH0d4z5Ky_bO00DKJY+ hash: v1.k794b7964.523ea496b0b60f97d84b29341236d2c0aa95927f896c0840e08a82138067173a.fm36h_FICyz90vGXjcNYpGP8ehPt49XRqqr8W8pvWUIscenes-app-project-homepage--project-homepage--dark:- hash: v1.k794b7964.f9afe370160f2ec2d933485b1e416b0616890db340e92dc4c02e2e9dc51cfc55.sTaJPnA8StCacpEPhXfcdq7rGOhWJ-0qa0i-Bw6eCiM+ hash: v1.k794b7964.83d267b40bfc2dca4b211cb28537f4b958822ee469c611e60535af2ab79e1621.-0zW3_5HWFVnRE4cxiHgTyQV6GCR2La8fsBwcaNlb-Ascenes-app-project-homepage--project-homepage--light:- hash: v1.k794b7964.cac47199913664e45de2d14a875ed30ba9d86dc3caff1d354eaf25f1014910e4.rFjcSUbeleZKPJtAwDiA_AcC75VXujQVIzfCE3GrcuQ+ hash: v1.k794b7964.6cb3e0540153212b2c2d73fc8705be0f3a94a263198e20bf267d06d4063271ca.WloFF6QtysCbra2Sb3kyJyIhvQL7YsxCDb1YC7clGYYscenes-app-revenue-analytics--revenue-analytics-dashboard--dark:hash: v1.k794b7964.406412e8c95339e9ab64271f6dfc363b2f47123200823722a09ac67cb74e6429.cdUelwHMlacDebp7LAzOnQXGdL0FwZj6Hwt-gQ3eln0scenes-app-revenue-analytics--revenue-analytics-dashboard--light:@@ -5311,9 +5311,9 @@ snapshots:scenes-app-settings-organization--settings-organization-danger-zone--light:hash: v1.k794b7964.a122e8edd570c253d9ab29471a8f6f35a300a0f7467a41a7667771890d54f695.83fzINplG6Nw60DiU9n4zkZBxyLhvjZHEpNTbHXrPeAscenes-app-settings-organization--settings-organization-details--dark:- hash: v1.k794b7964.e25c10103d2f38d76454ac832024dca871d2f316efe488ab19ad5282c3521c6e.X6QuRBv903vN860QyNcbzt_twSqj26cdYfdWYQlD0rI+ hash: v1.k794b7964.8078ebfb964c1a0d59c5b96fc34e1244d0263f384d7224472df22a8748b5e7ba.qBxbbID5ZvnK0d_ib5a8I1zw6Zdyy--O7QL2FK5uRu8scenes-app-settings-organization--settings-organization-details--light:- hash: v1.k794b7964.43d8b96557938f4a2cc81dde628acc7f27cede1734edd43d509673c43483676e.IPfvbmBhGu7pGXITV5045Kexr6bcxtHiRk-MXYs4l50+ hash: v1.k794b7964.289546e2a06c02c1a9f98624dc0932d6928e5ba5cdcb35a2e72e4a2acd06fc39.iRtFpJK4MoNYknWxY32zckceCjdU0yf7RbyhQcUQXkQscenes-app-settings-organization--settings-organization-members--dark:hash: v1.k794b7964.b577b9e73f6bb621fefd2ad665f39700c729283899eab88de15f12676e8fd110.Oj--FzP6tsMfN81drSkgWLZ7lvLdL1bFrgfgmAZFKfQscenes-app-settings-organization--settings-organization-members--light:@@ -5383,41 +5383,41 @@ snapshots:scenes-app-settings-user--settings-user-profile--light:hash: v1.k794b7964.7519c9a102b3970ad435c386104fd9bc0934bddde707f75e5b911dd227ed59c6.I11oxzvekkNNAUIuyf1Tp-bwc5nXYkzezOUYtxa0ORkscenes-app-sidepanels--side-panel-access-control--dark:- hash: v1.k794b7964.8b85df61a9fc34ac21be2abcc558bb31d00a65f23d9523dd0b142b2edacf7bec.yyPNVyiWpyG9a72qZKS02FrkyjUNiQ8j7asFmqB7qwA+ hash: v1.k794b7964.fde2110df6d61f716d645f00db3e61fab2afa990217e43d5d4e2f93b893b2c87.m2QPf8sq6l1ygjrbOVCgIIUJ_a4IPzsC2qr9xftoSFIscenes-app-sidepanels--side-panel-access-control--light:- hash: v1.k794b7964.777356b238972f05cbbb8d756b05cbeed404180f4fd941fbf5c51cabe6dd6012.MeIc1YJ6YAQXRKaPGqw3k1I2vUH3tR2ZBCaTWWvxwSI+ hash: v1.k794b7964.9e8e6ff0e97dd4d4d63f4dbad07291a33c98ed239a9fe4b7feada0b63dac50a5.wzXX3cMc2HGa9cc8xFMREiyp9zItN-bBx_GKm3315IMscenes-app-sidepanels--side-panel-activity--dark:- hash: v1.k794b7964.30121cde2b8e93c94e26f222ca0102e4d4b75a2c9069c1553ea39743c2bc16f0.w5tAMZVSTh0GGtn-f7S5cJt7pWzlEqAsN4ocnzKkkEo+ hash: v1.k794b7964.d6a0c12a419ad2e18ca3a87b9d6d88aba4fca193b5736a875b91948226ad7c64.COTA7OqniWK5OwBt7im51DsaC3mDFtTiul7hGhwWU_Yscenes-app-sidepanels--side-panel-activity--light:- hash: v1.k794b7964.a443109d2e56f444e3522cc3d034228832ccfe3d2bfc9eeab84c9209b32b6911._r7-lytHSIjxhB70q5N3wqO0pAozdpvf5KJIZ_4XIBk+ hash: v1.k794b7964.920005fba65f6c263278e2ee83fa5ee618eeaed8a24779f9c318a52857ca75f1.EqyWRGbCYOY4c2kaJ9F4UpjVyhY2f9Tg3bWKhpiPlCQscenes-app-sidepanels--side-panel-discussion--dark:- hash: v1.k794b7964.e1ab04b4156e125a539f49afbd0ef80529be2fc788a7337ded22ae272a6a0d35.C8n8I-wIhaR0Z_813QhUEbHgZbCVVDuL7QRiv4lXaRM+ hash: v1.k794b7964.2e9bad9fe92cdc66faf6bda22d848d619cefaa9832dea29e29dafda0e5ffe66a.EW9dOK30Vh7iBQOnKX8aJXbIs_scsOGi5umgoaoAUTgscenes-app-sidepanels--side-panel-discussion--light:- hash: v1.k794b7964.46df376f68bf2125ec1b4133a2934620a49546fb65d996a7036cb8689a0c19e0.rsEkIJJ9vKNpaV7v6sgT0p77Wxs1M5fd2N2z-vt7LkA+ hash: v1.k794b7964.eb0a17ed291aa64d2a984d9c191aa392bc1dae18fadd888dd17900bf688c51e9.L4SSGkhRZ4USbj3HLaO69OOa2TUK3GhA5od4nAnFI68scenes-app-sidepanels--side-panel-exports--dark:- hash: v1.k794b7964.d6f7c740e5c321b0898bd2e07feb3fbd45cdba7c88a47bb5b938440de8ddd498.MpqW2VomSde9HBP_LyfoHr_uuBJjwx8itekT8IG5MT8+ hash: v1.k794b7964.45f7d7fdd0bfc8b70924c9da476caa165d475f1fea458d4039fdfed9d27f580d.DhAXqZqgyniPDsLpk_k-19XCPqrh6Z_5IC7LhhqOPw8scenes-app-sidepanels--side-panel-exports--light:- hash: v1.k794b7964.56aa8b4f65f284210f837719b53e19a83a3b9bad6ba0eacd356ac9efdb1b7ab6.pntoL6_ZKGmxpbBEx74UEk4fzlvvFjEL6d8FtjnLQf8+ hash: v1.k794b7964.c9bbcb89d27fc0274dfb32aa7b4b592451bbce89604b3ea6838bc8ffd2d1e55a.hwFqNOtsfT_rsA0VJZtApfrC6gw31QZasi0ZucClSHIscenes-app-sidepanels--side-panel-info--dark:- hash: v1.k794b7964.8b85df61a9fc34ac21be2abcc558bb31d00a65f23d9523dd0b142b2edacf7bec.LTTWt41y1ZxVP8fE_w4Gq_6fNYWwz-7jZJJ5s-0Hyis+ hash: v1.k794b7964.fde2110df6d61f716d645f00db3e61fab2afa990217e43d5d4e2f93b893b2c87.vcy709v-Te5zbXCNyHXYHHCVzVySy-W84stAYpHVl9gscenes-app-sidepanels--side-panel-info--light:- hash: v1.k794b7964.80d467ed5e1817f973493a537a310fcff22adbe612319a87d9bc1723334a7e67.nN3YzT0sniP--ZYTgxpOhNVVU2ceurbFyLyoedPHjvo+ hash: v1.k794b7964.a8eca9046abaf4f4326f9fe5549b53606049680b4c36c62a9e1b52a560f07307.L_brl4T-I3sYVr6Z1TfETaxs4Yeu7NJsTLe7WFIyW-Iscenes-app-sidepanels--side-panel-max--dark:- hash: v1.k794b7964.129f420553ed7a10ef47da9c51d8109bd748eea81e3096b65aee11777c452e0b.KpDvgWwLNKAd-e6QdfCxIa2pIfb-U3AvHJHCaJ3y_jQ+ hash: v1.k794b7964.fde2110df6d61f716d645f00db3e61fab2afa990217e43d5d4e2f93b893b2c87.A2eZlpQrDuzR2xthx8GGRqdKUiGPLVPj42bx8vcrotQscenes-app-sidepanels--side-panel-max--light:- hash: v1.k794b7964.7c0693042a0a65566a75fc04f76699141d2d99d15aeb0c88f08565fa1944bc33.PAPlqkeKYFmGHlbnJAezs0OQI7fNJFoToW0uEA4y8LE+ hash: v1.k794b7964.3f257438f2d81edcb7a05179c7d2de70c549ea213d895a2a231319c813563f74.4Hf-qiBGE0wVOmV4aXD0xLvfNmFCkM7pSCMXTAPcD7Uscenes-app-sidepanels--side-panel-notebooks--dark:- hash: v1.k794b7964.290caf03d3e088c4ab5a62b4859b55bd641ef1e141930030f5fb604ecd859fc9.DLHclXxxyQ_5Qt3dBJuC4xp8ZggqZMWq_tFgXksYqi0+ hash: v1.k794b7964.52706b247c2968cf54e48d58d4d65e34f19e7a4bed2a1719ba8970d4f3c7c1aa.GWO5g8DSrLhGKVymVfPWCTVOCW29JHWYAi0OZlnFiSkscenes-app-sidepanels--side-panel-notebooks--light:- hash: v1.k794b7964.96ab5f4cbd57ff9ce028e35a2909628bb3df7aacf2240bcf2e6df73d747dbc58.TuJNdcIYToNHB8EV4oJOfSeUu9hUwixRMqFssQ3CGPI+ hash: v1.k794b7964.6b03bcd66331259f527b65568868dc845d4658c0bcc031ed45bb55b7b7847789.F9vew1h38SQ141i5xQLWKZWiVpb-LLNyDrOI1wG-fQIscenes-app-sidepanels--side-panel-settings--dark:- hash: v1.k794b7964.1cc119e307548d160d0d6c31e7dffd6e2d3f03325671ef5d9ec1df16cffedf54.oCBu0ZrRUmGWkaLg9nKuA1L_8ZaV5TEiHrNeIQ28Uk0+ hash: v1.k794b7964.fde2110df6d61f716d645f00db3e61fab2afa990217e43d5d4e2f93b893b2c87.cX3GpE8yIRAwtofc1eHJoIQXe_-PF-kHeMB3eL2YO2Qscenes-app-sidepanels--side-panel-settings--light:- hash: v1.k794b7964.f929dbdbccf1b8ef2c2e25fc405add6af0f03a8746b9df291b9339451a65b89b.p3cfXRX2O-U0nb8hsbh1uixA4ZQ_uGILG_pwUOhFtDg+ hash: v1.k794b7964.8a4a1d48d8026f09784cfe912bbada26978eb55b2405c1f0689debe519d54a07.mf430BTzJcsYEnwSM_9kAVlyhtepUS1LsgpkLOTGM8Iscenes-app-sidepanels--side-panel-support--dark:- hash: v1.k794b7964.a28385e1f31c16c26936447105351f034aea2beb39cc4c6b60ccba90d6211805.PqziDUp29yBUQFRGvUkP12MEWP0wcHLMzPd1pyYYChU+ hash: v1.k794b7964.25d3bc059468d880d315a0a19b446435fef1fcdf80075784d26be323295a7839.XVlGukNTQVTyeonIxb3lERnTcOpzwj9MFk8pLjLwzvQscenes-app-sidepanels--side-panel-support--light:- hash: v1.k794b7964.aeb9e3ca766ad32efcc0bfef7c7315dbcf095324413a0b8c1a20297cbaaa6f07.WNaEFVHyUMPyx1yuHgbwljnE2ccnEyexqltVHkl7yY0+ hash: v1.k794b7964.31ad1b101519308e931ce02320eb2cbe5af2e6955aa8a881fd1158d061668e01.p4zeVBC793YF1yIPED3ELW7_Wv9lKfvsxjBDsTm_NxEscenes-app-subscriptions-subscription-delivery-history--empty--dark:hash: v1.k794b7964.885618b84efbb5d417d2740a68a510924c18ee08e179fc884dda68f1a845f704.WpHe-tdLPmOl9FWaB3DDNDIAmvlzDi-x9no79L6Ys4Escenes-app-subscriptions-subscription-delivery-history--empty--light:@@ -5495,9 +5495,9 @@ snapshots:scenes-app-surveys-surveyresponsekeysreference--webhook--light:hash: v1.k794b7964.9b5c484a3a1bd7a09c266a1f164e3ed9eef3ffabbcd12253f0843b3f0b69a808.cc6Rai2vShlFJA_KypMbVcc1IIaVX0nTcZ29RPEEZjoscenes-app-web-analytics--web-analytics-dashboard--dark:- hash: v1.k794b7964.f5fd41ad9eaf7534363f9b2ec38467dab21c90a57136adb36938679c9bc1b748.-kY2tNZeOdnnHxzE4pdyi0j1DXIfdQ86Ysl7qd9mxjQ+ hash: v1.k794b7964.73d195932e14b7f1ed1492148f30bb401d83f5fe2195454d11b1f8a25d27cf18.b3y1l14OGUaGshoCcw-UeRucPusmKqg_P9hrSKkTVEcscenes-app-web-analytics--web-analytics-dashboard--light:- hash: v1.k794b7964.0d336797602434aaaf6364ba4030ee4bd93762ae2df7223e1151bc6002ea2a60.oy7VmDHh6XEZi9xvVObmMtvWqO11BZY46XPgOc36mPQ+ hash: v1.k794b7964.d39a7db817febb31fd2e2f6be9478a531ed200cca876c15bb4471769321688a6.fuln1AuN_ed6kQrQmdORheyl1Mv0Gs3XE2MKkU6BXsoscenes-other-billing--billing--dark:hash: v1.k794b7964.0fbd211a7ee299a4abb1afb6d3d1e0589eb349c82c59bd5997b16e434356ee18.HyWfDl8iMD41jnar9y2uxNCx2MJJ6DuHch0n18cCWBAscenes-other-billing--billing--light:diff --git a/frontend/src/layout/panel-layout/PanelLayout.tsx b/frontend/src/layout/panel-layout/PanelLayout.tsxindex cadaf094a850..cbd2d2a1014e 100644--- a/frontend/src/layout/panel-layout/PanelLayout.tsx+++ b/frontend/src/layout/panel-layout/PanelLayout.tsx@@ -1,8 +1,6 @@import { cva } from 'cva'import { useActions, useMountedLogic, useValues } from 'kea'-import { NotificationsPanel } from 'lib/components/NotificationsMenu/NotificationsPanel'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { cn } from 'lib/utils/css-classes'import { supportTicketCounterLogic } from 'products/conversations/frontend/supportTicketCounterLogic'@@ -10,8 +8,7 @@ import { supportTicketCounterLogic } from 'products/conversations/frontend/suppoimport { navigation3000Logic } from '../navigation-3000/navigationLogic'import { Nav as AiFirstNavBar } from './ai-first/Nav'import { panelLayoutLogic } from './panelLayoutLogic'-import { PanelLayoutNavBar } from './PanelLayoutNavBar'-import { PROJECT_TREE_KEY, ProjectTree } from './ProjectTree/ProjectTree'+import { PROJECT_TREE_KEY } from './ProjectTree/ProjectTree'import { projectTreeLogic } from './ProjectTree/projectTreeLogic'const panelLayoutStyles = cva({@@ -70,7 +67,6 @@ export function PanelLayout({ className }: { className?: string }): JSX.ElementisLayoutPanelVisible,isLayoutNavbarVisibleForMobile,isLayoutNavbarVisibleForDesktop,- activePanelIdentifier,isLayoutNavCollapsed,panelWidth,} = useValues(panelLayoutLogic)@@ -78,7 +74,6 @@ export function PanelLayout({ className }: { className?: string }): JSX.Elementconst { showLayoutPanel, clearActivePanelIdentifier, showLayoutNavBar } = useActions(panelLayoutLogic)useMountedLogic(projectTreeLogic({ key: PROJECT_TREE_KEY }))useMountedLogic(supportTicketCounterLogic) // Start polling for unread tickets on app load- const isAIFirst = useFeatureFlag('AI_FIRST')return (<>@@ -112,33 +107,7 @@ export function PanelLayout({ className }: { className?: string }): JSX.Element: {}}>- {isAIFirst ? (- <AiFirstNavBar />- ) : (- <PanelLayoutNavBar>- {activePanelIdentifier === 'Project' && (- <ProjectTree- root="project://"- logicKey={PROJECT_TREE_KEY}- searchPlaceholder="Search by user, type, or name"- showRecents- />- )}- {activePanelIdentifier === 'Products' && (- <ProjectTree root="products://" searchPlaceholder="Search apps" />- )}- {activePanelIdentifier === 'Shortcuts' && (- <ProjectTree root="shortcuts://" searchPlaceholder="Search your shortcuts" />- )}- {activePanelIdentifier === 'DataManagement' && (- <ProjectTree root="data://" searchPlaceholder="Search data tools" />- )}- {activePanelIdentifier === 'People' && (- <ProjectTree root="persons://" searchPlaceholder="Search people tools" />- )}- {activePanelIdentifier === 'Notifications' && <NotificationsPanel />}- </PanelLayoutNavBar>- )}+ <AiFirstNavBar /></div>{/* Panel overlay - always rendered for exit animation */}diff --git a/frontend/src/layout/panel-layout/PanelLayoutNavBar.tsx b/frontend/src/layout/panel-layout/PanelLayoutNavBar.tsxdeleted file mode 100644index 3cb57e27f9e9..000000000000--- a/frontend/src/layout/panel-layout/PanelLayoutNavBar.tsx+++ /dev/null@@ -1,583 +0,0 @@-import { cva } from 'cva'-import { useActions, useValues } from 'kea'-import { router } from 'kea-router'-import posthog from 'posthog-js'-import { useRef, useState } from 'react'--import {- IconApps,- IconChevronRight,- IconClock,- IconDatabase,- IconDownload,- IconFolderOpen,- IconGear,- IconHome,- IconNotification,- IconPeople,- IconSearch,- IconShortcut,- IconSparkles,-} from '@posthog/icons'-import { Link } from '@posthog/lemon-ui'--import { NewAccountMenu } from 'lib/components/Account/NewAccountMenu'-import { keyBinds } from 'lib/components/AppShortcuts/shortcuts'-import { useAppShortcut } from 'lib/components/AppShortcuts/useAppShortcut'-import { commandLogic } from 'lib/components/Command/commandLogic'-import { DebugNotice } from 'lib/components/DebugNotice'-import { HealthMenu } from 'lib/components/HealthMenu/HealthMenu'-import { HelpMenu } from 'lib/components/HelpMenu/HelpMenu'-import { NavPanelAdvertisement } from 'lib/components/NavPanelAdvertisement/NavPanelAdvertisement'-import { NotificationsMenu } from 'lib/components/NotificationsMenu/NotificationsMenu'-import { PosthogStatusShownOnlyIfNotOperational } from 'lib/components/PosthogStatus/PosthogStatusShownOnlyIfNotOperational'-import { Resizer } from 'lib/components/Resizer/Resizer'-import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows'-import { FEATURE_FLAGS } from 'lib/constants'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'-import { ButtonGroupPrimitive, ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'-import {- ContextMenu,- ContextMenuContent,- ContextMenuGroup,- ContextMenuItem,- ContextMenuTrigger,-} from 'lib/ui/ContextMenu/ContextMenu'-import { ListBox } from 'lib/ui/ListBox/ListBox'-import { cn } from 'lib/utils/css-classes'-import { removeProjectIdIfPresent } from 'lib/utils/router-utils'-import { sceneLogic } from 'scenes/sceneLogic'-import { urls } from 'scenes/urls'--import { PanelLayoutNavIdentifier, panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'-import { PinnedFolder } from '~/layout/panel-layout/PinnedFolder/PinnedFolder'-import { BrowserLikeMenuItems } from '~/layout/panel-layout/ProjectTree/menus/BrowserLikeMenuItems'-import { ConfigurePinnedTabsModal } from '~/layout/scenes/ConfigurePinnedTabsModal'--import { navigation3000Logic } from '../navigation-3000/navigationLogic'-import { navigationLogic } from '../navigation/navigationLogic'--const navBarStyles = cva({- base: 'flex flex-col max-h-screen min-h-screen bg-surface-tertiary z-[var(--z-layout-navbar)] relative border-r lg:border-r-transparent',- variants: {- isLayoutNavCollapsed: {- true: 'w-[var(--project-navbar-width-collapsed)]',- false: 'w-[var(--project-navbar-width)]',- },- isMobileLayout: {- true: 'absolute top-0 bottom-0 left-0',- false: '',- },- },-})--export function PanelLayoutNavBar({ children }: { children: React.ReactNode }): JSX.Element {- const containerRef = useRef<HTMLDivElement | null>(null)- const [isConfigurePinnedTabsOpen, setIsConfigurePinnedTabsOpen] = useState(false)- const { showConfigurePinnedTabsModal } = useActions(navigationLogic)- const {- showLayoutPanel,- setActivePanelIdentifier,- clearActivePanelIdentifier,- toggleLayoutNavCollapsed,- showLayoutNavBar,- resetPanelLayout,- } = useActions(panelLayoutLogic)- const {- pathname,- isLayoutPanelVisible,- activePanelIdentifier,- activePanelIdentifierFromUrl,- mainContentRef,- isLayoutNavCollapsed,- isLayoutNavbarVisible,- } = useValues(panelLayoutLogic)- const { mobileLayout: isMobileLayout } = useValues(navigation3000Logic)- const { firstTabIsActive } = useValues(sceneLogic)- const { featureFlags } = useValues(featureFlagLogic)- const { toggleCommand } = useActions(commandLogic)- const isProductAutonomyEnabled = useFeatureFlag('PRODUCT_AUTONOMY')- const isNotificationsEnabled = useFeatureFlag('REAL_TIME_NOTIFICATIONS')-- function handlePanelTriggerClick(item: PanelLayoutNavIdentifier): void {- if (activePanelIdentifier !== item) {- setActivePanelIdentifier(item)- showLayoutPanel(true)- } else if (activePanelIdentifier === item) {- clearActivePanelIdentifier()- showLayoutPanel(false)- }- }-- function handleStaticNavbarItemClick(to?: string, isKeyboardAction = false): void {- clearActivePanelIdentifier()- showLayoutPanel(false)-- if (isKeyboardAction) {- mainContentRef?.current?.focus()- }- if (isMobileLayout && isLayoutNavbarVisible) {- showLayoutNavBar(false)- }- if (to) {- router.actions.push(to)- }- }-- const isStaticNavItemActive = (itemIdentifier: string): boolean => {- const currentPath = removeProjectIdIfPresent(pathname)-- if (itemIdentifier === 'Home' && currentPath === '/') {- return true- }- if (itemIdentifier === 'Activity' && currentPath.startsWith('/activity/')) {- return true- }- if (itemIdentifier === 'Settings' && currentPath.startsWith('/settings/')) {- return true- }- if (itemIdentifier === 'Inbox' && currentPath.startsWith('/inbox')) {- return true- }- if (itemIdentifier === 'Toolbar' && currentPath === '/toolbar') {- return true- }- if (itemIdentifier === 'ai' && currentPath.startsWith('/ai')) {- return true- }-- return false- }-- useAppShortcut({- name: 'ToggleLeftNav',- keybind: [keyBinds.toggleLeftNav],- intent: 'Toggle collapse left navigation',- interaction: 'function',- callback: toggleLayoutNavCollapsed,- })-- const navItems: {- identifier: string- label: string- icon: React.ReactNode- showChevron?: boolean- to?: string- onClick?: (e?: React.KeyboardEvent) => void- collapsedTooltip?: React.ReactNode | [React.ReactNode, React.ReactNode] // Open and closed tooltips- documentationUrl?: string- }[] = [- {- identifier: 'ai',- label: 'PostHog AI',- icon: <IconSparkles className="text-ai group-hover/button-primitive:animate-hue-rotate" />,- to: urls.ai(),- onClick: () => handleStaticNavbarItemClick(urls.ai(), true),- collapsedTooltip: 'PostHog AI',- },- {- identifier: 'ProjectHomepage',- label: 'Home',- icon: <IconHome />,- to: urls.projectRoot(),- onClick: () => handleStaticNavbarItemClick(urls.projectRoot(), true),- collapsedTooltip: 'Home',- },- {- identifier: 'Search',- label: 'Search',- icon: <IconSearch />,- onClick: () => {- toggleCommand()- },- collapsedTooltip: 'Search',- },- {- identifier: 'Activity',- label: 'Activity',- icon: <IconClock />,- to: urls.activity(),- onClick: () => handleStaticNavbarItemClick(urls.activity(), true),- collapsedTooltip: 'Activity',- documentationUrl: 'https://posthog.com/docs/data/events',- },- ...(isProductAutonomyEnabled- ? [- {- identifier: 'Inbox',- label: 'Inbox',- icon: <IconNotification />,- to: urls.inbox(),- onClick: () => handleStaticNavbarItemClick(urls.inbox(), true),- collapsedTooltip: 'Inbox',- },- ]- : []),- ...(featureFlags[FEATURE_FLAGS.CUSTOM_PRODUCTS_SIDEBAR] === 'test'- ? []- : [- {- identifier: 'Products',- label: 'All apps',- icon: <IconApps />,- onClick: (e?: React.KeyboardEvent) => {- if (!e || e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowRight') {- handlePanelTriggerClick('Products')- }- },- showChevron: true,- collapsedTooltip: ['Open products', 'Close products'],- },- ]),- {- identifier: 'DataManagement',- label: 'Data management',- icon: <IconDatabase />,- onClick: (e?: React.KeyboardEvent) => {- if (!e || e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowRight') {- handlePanelTriggerClick('DataManagement')- }- },- showChevron: true,- collapsedTooltip: ['Open data management', 'Close data management'],- documentationUrl: 'https://posthog.com/docs/data',- },- {- identifier: 'People',- label: 'People & groups',- icon: <IconPeople />,- onClick: (e?: React.KeyboardEvent) => {- if (!e || e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowRight') {- handlePanelTriggerClick('People')- }- },- showChevron: true,- collapsedTooltip: ['Open people & groups', 'Close people & groups'],- documentationUrl: 'https://posthog.com/docs/data/persons',- },- {- identifier: 'Shortcuts',- label: 'Shortcuts',- icon: <IconShortcut />,- onClick: (e?: React.KeyboardEvent) => {- if (!e || e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowRight') {- handlePanelTriggerClick('Shortcuts')- }- },- showChevron: true,- collapsedTooltip: ['Open shortcuts', 'Close shortcuts'],- },- {- identifier: 'Project',- label: 'Project',- icon: <IconFolderOpen className="stroke-[1.2]" />,- onClick: (e?: React.KeyboardEvent) => {- if (!e || e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowRight') {- handlePanelTriggerClick('Project')- }- },- showChevron: true,- collapsedTooltip: ['Open project tree', 'Close project tree'],- },- ...(featureFlags[FEATURE_FLAGS.CUSTOM_PRODUCTS_SIDEBAR] === 'test'- ? [- {- identifier: 'Products',- label: 'All apps',- icon: <IconApps />,- onClick: (e?: React.KeyboardEvent) => {- if (!e || e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowRight') {- handlePanelTriggerClick('Products')- }- },- showChevron: true,- collapsedTooltip: ['Open products', 'Close products'],- },- ]- : []),- ].filter(Boolean)-- return (- <>- <div className="flex gap-0 relative">- <nav- className={cn(- navBarStyles({- isLayoutNavCollapsed,- isMobileLayout,- })- )}- ref={containerRef}- >- <div- className={cn(- 'flex justify-between p-1 pl-[5px] items-center',- isLayoutNavCollapsed ? 'justify-center' : 'h-[var(--scene-layout-header-height)]'- )}- >- <div- className={cn('flex gap-1 rounded-md w-full', {- 'flex-col items-center pt-px': isLayoutNavCollapsed,- })}- >- <NewAccountMenu isLayoutNavCollapsed={isLayoutNavCollapsed} />- </div>- </div>-- <div className="z-[var(--z-main-nav)] flex flex-col flex-1 overflow-y-auto">- <ScrollableShadows- className={cn('flex-1', { 'rounded-tr': !isLayoutPanelVisible && !firstTabIsActive })}- innerClassName="overflow-y-auto overflow-x-hidden"- direction="vertical"- styledScrollbars- >- <ListBox className="flex flex-col gap-px">- <div- className={cn('px-1 flex flex-col gap-px', {- 'items-center': isLayoutNavCollapsed,- })}- >- {navItems.map((item) => {- const tooltip = isLayoutNavCollapsed- ? Array.isArray(item.collapsedTooltip)- ? isLayoutPanelVisible && activePanelIdentifier === item.identifier- ? item.collapsedTooltip[1]- : item.collapsedTooltip[0]- : item.collapsedTooltip- : undefined-- const isHomePage = item.identifier === 'ProjectHomepage'- const iconClassName = 'flex text-tertiary group-hover:text-primary'-- const listItem = (- <ListBox.Item- key={item.identifier}- asChild- onClick={() => item.onClick?.()}- onKeyDown={(e) => {- if (e.key === 'Enter') {- item.onClick?.(e)- }- }}- >- {item.showChevron ? (- <ButtonPrimitive- active={- activePanelIdentifier === item.identifier ||- activePanelIdentifierFromUrl === item.identifier- }- className="group"- menuItem={!isLayoutNavCollapsed}- iconOnly={isLayoutNavCollapsed}- tooltip={tooltip}- tooltipPlacement="right"- tooltipDocLink={item.documentationUrl}- data-attr={`menu-item-${item.identifier.toString().toLowerCase()}`}- >- <span className={iconClassName}>{item.icon}</span>- {!isLayoutNavCollapsed && (- <>- <span className="truncate">{item.label}</span>- <span className="ml-auto pr-1">- <IconChevronRight className="size-3 text-tertiary" />- </span>- </>- )}- </ButtonPrimitive>- ) : (- <ButtonGroupPrimitive- fullWidth- className="flex justify-center [&>span]:w-full [&>span]:flex [&>span]:justify-center"- >- <Link- data-attr={`menu-item-${item.identifier- .toString()- .toLowerCase()}`}- buttonProps={{- menuItem: !isLayoutNavCollapsed,- className: 'group',- iconOnly: isLayoutNavCollapsed,- active: isStaticNavItemActive(item.identifier),- hasSideActionRight: isHomePage && !isLayoutNavCollapsed,- }}- to={item.to}- tooltip={tooltip}- tooltipPlacement="right"- tooltipDocLink={item.documentationUrl}- >- <span className={iconClassName}>{item.icon}</span>- {!isLayoutNavCollapsed && (- <span className="truncate">{item.label}</span>- )}- </Link>- {isHomePage && !isLayoutNavCollapsed && (- <ButtonPrimitive- iconOnly- isSideActionRight- onClick={(e) => {- e.stopPropagation()- posthog.capture('homepage configure home clicked', {- source: 'navbar',- })- showConfigurePinnedTabsModal()- }}- data-attr="menu-item-side-action-configure-home"- tooltip="Configure tabs & home"- tooltipPlacement="right"- className="opacity-0 group-hover:opacity-100 transition-all duration-50"- >- <IconGear className="size-3 text-tertiary" />- </ButtonPrimitive>- )}- </ButtonGroupPrimitive>- )}- </ListBox.Item>- )-- if (item.identifier === 'ProjectHomepage') {- return (- <ContextMenu key={item.identifier}>- <ContextMenuTrigger asChild>{listItem}</ContextMenuTrigger>- <ContextMenuContent className="max-w-[300px]">- <ContextMenuGroup>- <ContextMenuItem asChild>- <ButtonPrimitive- menuItem- onClick={() => setIsConfigurePinnedTabsOpen(true)}- >- <IconGear /> Configure tabs & home- </ButtonPrimitive>- </ContextMenuItem>- </ContextMenuGroup>- </ContextMenuContent>- </ContextMenu>- )- } else if (item.identifier === 'Activity' && item.to) {- return (- <ContextMenu key={item.identifier}>- <ContextMenuTrigger asChild>{listItem}</ContextMenuTrigger>- <ContextMenuContent className="max-w-[300px]">- <ContextMenuGroup>- <BrowserLikeMenuItems- MenuItem={ContextMenuItem}- href={item.to}- resetPanelLayout={resetPanelLayout}- />- </ContextMenuGroup>- </ContextMenuContent>- </ContextMenu>- )- }-- return listItem- })}- </div>-- <div className="border-b border-primary h-px my-1" />-- <div- className={cn(- 'relative flex flex-col gap-px h-full',- !isLayoutNavCollapsed ? 'pt-1' : 'items-center'- )}- >- <PinnedFolder />- </div>- </ListBox>- </ScrollableShadows>-- <div className="border-b border-primary h-px " />-- <div className="p-1 flex flex-col gap-px items-start pb-2">- <div- className={cn('flex flex-col gap-px w-full', {- 'items-center': isLayoutNavCollapsed,- })}- >- <DebugNotice isCollapsed={isLayoutNavCollapsed} />- </div>-- <NavPanelAdvertisement />-- <div- className={cn('flex flex-col gap-px w-full', {- 'items-center': isLayoutNavCollapsed,- })}- >- {isNotificationsEnabled && <NotificationsMenu iconOnly={isLayoutNavCollapsed} />}- <Link- to={urls.settings('project')}- buttonProps={{ menuItem: isLayoutNavCollapsed ? false : true }}- tooltip={isLayoutNavCollapsed ? 'Settings' : undefined}- tooltipPlacement="right"- data-attr="navbar-settings"- >- <IconGear />- {!isLayoutNavCollapsed && 'Settings'}- </Link>- <Link- to={urls.exports()}- buttonProps={{ menuItem: isLayoutNavCollapsed ? false : true }}- tooltip={isLayoutNavCollapsed ? 'Exports' : undefined}- tooltipPlacement="right"- data-attr="navbar-exports-button"- >- <IconDownload />- {!isLayoutNavCollapsed && 'Exports'}- </Link>- <HealthMenu iconOnly={isLayoutNavCollapsed} />- <HelpMenu iconOnly={isLayoutNavCollapsed} />- <PosthogStatusShownOnlyIfNotOperational iconOnly={isLayoutNavCollapsed} />- </div>- </div>- </div>- {!isMobileLayout && (- <Resizer- logicKey="panel-layout-navbar"- placement="right"- containerRef={containerRef}- closeThreshold={100}- onToggleClosed={(shouldBeClosed) => toggleLayoutNavCollapsed(shouldBeClosed)}- onDoubleClick={() => toggleLayoutNavCollapsed()}- data-attr="tree-navbar-resizer"- // top + 7px is to match rounded-lg border-radius on <main>- className={cn('top-[calc(var(--scene-layout-header-height)+7px)] right-[-1px] bottom-4', {- // // If first tab is not active, we move the line down to match up with the curve (only present if not first tab is active)- 'top-[var(--scene-layout-header-height)]': firstTabIsActive,- 'top-0': isLayoutPanelVisible,- })}- offset={0}- />- )}- </nav>-- {children}-- {isMobileLayout && isLayoutNavbarVisible && !isLayoutPanelVisible && (- <div- onClick={() => {- showLayoutNavBar(false)- clearActivePanelIdentifier()- }}- className="z-[var(--z-layout-navbar-under)] fixed inset-0 w-screen h-screen bg-fill-highlight-200 lg:bg-transparent"- />- )}-- {isMobileLayout && isLayoutNavbarVisible && isLayoutPanelVisible && (- <div- onClick={() => {- showLayoutPanel(false)- clearActivePanelIdentifier()- }}- className="z-[var(--z-layout-navbar-over)] fixed inset-0 w-screen h-screen bg-fill-highlight-200 lg:bg-transparent"- />- )}- </div>- <ConfigurePinnedTabsModal- isOpen={isConfigurePinnedTabsOpen}- onClose={() => setIsConfigurePinnedTabsOpen(false)}- />- </>- )-}diff --git a/frontend/src/layout/panel-layout/PinnedFolder/PinnedFolder.tsx b/frontend/src/layout/panel-layout/PinnedFolder/PinnedFolder.tsxindex 42498c5970e1..0eb45901edfe 100644--- a/frontend/src/layout/panel-layout/PinnedFolder/PinnedFolder.tsx+++ b/frontend/src/layout/panel-layout/PinnedFolder/PinnedFolder.tsx@@ -4,7 +4,6 @@ import { IconCheck, IconGear, IconPencil, IconPlusSmall } from '@posthog/icons'import { ItemSelectModalButton } from 'lib/components/FileSystem/ItemSelectModal/ItemSelectModal'import { FEATURE_FLAGS } from 'lib/constants'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { IconBlank } from 'lib/lemon-ui/icons'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'@@ -35,7 +34,6 @@ export function PinnedFolder(): JSX.Element {const { pinnedFolder } = useValues(pinnedFolderLogic)const { setPinnedFolder } = useActions(pinnedFolderLogic)const { openModal: openEditCustomProductsModal } = useActions(editCustomProductsModalLogic)- const isAIFirst = useFeatureFlag('AI_FIRST')const { featureFlags } = useValues(featureFlagLogic)@@ -51,7 +49,7 @@ export function PinnedFolder(): JSX.Element {buttonProps={{iconOnly: true,size: 'xs',- tooltip: isAIFirst ? 'Add to starred' : 'Add shortcut',+ tooltip: 'Add to starred',tooltipPlacement: 'top',children: <IconPlusSmall className="size-4 text-tertiary" />,}}diff --git a/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsx b/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsxindex 14ece99f4174..37181dc9bcfc 100644--- a/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsx+++ b/frontend/src/layout/panel-layout/ProjectTree/ProjectTree.tsx@@ -8,10 +8,8 @@ import {IconChevronRight,IconEllipsis,IconFolderPlus,- IconGear,IconPencil,IconPlusSmall,- IconShortcut,IconStar,} from '@posthog/icons'@@ -199,11 +197,9 @@ export function ProjectTree({`${currentTeamId ?? '*'}-${SEEN_CUSTOM_PRODUCTS_LOCAL_STORAGE_KEY}`,[])- const isCustomProductsExperiment = useFeatureFlag('CUSTOM_PRODUCTS_SIDEBAR', 'test')const showFilterDropdown = root === 'project://'const showSortDropdown = root === 'project://'- const isAIFirst = useFeatureFlag('AI_FIRST')const isStarredReorderEnabled = useFeatureFlag('STARRED_REORDER')let treeData: TreeDataItem[] = [...fullFileSystemFiltered]@@ -223,35 +219,18 @@ export function ProjectTree({if (root === 'shortcuts://' && (fullFileSystemFiltered.length === 0 || !shortcutHelperDismissed)) {treeData.push({id: 'products/shortcuts-helper-category',- name: isAIFirst ? 'Starred items' : 'Example shortcuts',+ name: 'Starred items',type: 'category',displayName: (- <div- className={cn('border border-primary text-xs font-normal rounded-xs p-2 -mx-1', {- 'mt-2': fullFileSystemFiltered.length === 0 && !isAIFirst,- 'mb-2': !isAIFirst,- })}- >- {isAIFirst ? (- <>- Add a starred item by clicking{' '}- <IconEllipsis className="size-3 border border-[var(--color-neutral-500)] rounded-xs" />{' '}- next to an item in the Files sidebar, then selecting "- <IconStar className="size-3 border border-[var(--color-neutral-500)] rounded-xs" /> Add- to starred". You can also add a starred item by opening a resource, clicking its project- name in the side panel, and selecting "- <IconStar className="size-3 border border-[var(--color-neutral-500)] rounded-xs" /> Add- to starred".- </>- ) : (- <>- Add a shortcut by clicking{' '}- <IconEllipsis className="size-3 border border-[var(--color-neutral-500)] rounded-xs" />{' '}- next to an item in the Files sidebar, then selecting "- <IconShortcut className="size-3 border border-[var(--color-neutral-500)] rounded-xs" />{' '}- Add to shortcuts panel".- </>- )}{' '}+ <div className={cn('border border-primary text-xs font-normal rounded-xs p-2 -mx-1')}>+ Add a starred item by clicking{' '}+ <IconEllipsis className="size-3 border border-[var(--color-neutral-500)] rounded-xs" /> next to+ an item in the Files sidebar, then selecting "+ <IconStar className="size-3 border border-[var(--color-neutral-500)] rounded-xs" /> Add to+ starred". You can also add a starred item by opening a resource, clicking its project name in+ the side panel, and selecting "+ <IconStar className="size-3 border border-[var(--color-neutral-500)] rounded-xs" /> Add to+ starred".{' '}{fullFileSystemFiltered.length > 0 && (<span className="cursor-pointer underline" onClick={() => setShortcutHelperDismissed(true)}>Dismiss.@@ -274,20 +253,15 @@ export function ProjectTree({!showOriginalBanner && originalDismissedOnMount && !cmdKHelperDismissed && !isMobile()if (showOriginalBanner) {- const CustomIcon = !isAIFirst && isCustomProductsExperiment ? IconGear : IconPenciltreeData.push({id: 'products/custom-products-helper-category',name: 'Example custom products',type: 'category',displayName: (- <div- className={cn('border border-primary text-xs mb-2 font-normal rounded-xs p-2 -mx-1', {- 'mt-6': fullFileSystemFiltered.length === 0 && !isAIFirst,- })}- >+ <div className={cn('border border-primary text-xs mb-2 font-normal rounded-xs p-2 -mx-1')}>You can display your preferred apps here. You can configure what items show up in here byclicking on the{' '}- <CustomIcon className="size-3 border border-[var(--color-neutral-500)] rounded-xs" /> icon+ <IconPencil className="size-3 border border-[var(--color-neutral-500)] rounded-xs" /> iconabove. We'll automatically suggest new apps to this list as you use them.{' '}{fullFileSystemFiltered.length > 0 && (<span@@ -410,8 +384,7 @@ export function ProjectTree({if (item?.id.startsWith('shortcuts')) {eventUsageLogic.actions.reportNavbarStarredItemClicked(item?.record?.type || 'unknown',- item?.name || 'unknown',- !!isAIFirst+ item?.name || 'unknown')}@@ -834,7 +807,7 @@ export function ProjectTree({'text-primary': selectMode === 'multi',})}/>- {isAIFirst ? 'Add to starred' : 'Add shortcut'}+ Add to starred</>),}),diff --git a/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsx b/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsxindex ab7a3811b202..c5810f37e783 100644--- a/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsx+++ b/frontend/src/layout/panel-layout/ProjectTree/menus/MenuItems.tsx@@ -13,7 +13,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 {@@ -69,7 +68,6 @@ export function MenuItems({showSelectMenuOption = true,}: MenuItemsProps): JSX.Element {const [uniqueKey] = useState(() => `project-tree-${counter++}`)- const isAIFirst = useFeatureFlag('AI_FIRST')const { shortcutNonFolderPaths } = useValues(projectTreeDataLogic)const { deleteShortcut, addShortcutItem } = useActions(projectTreeDataLogic)const { groupTypes } = useValues(groupAnalyticsConfigLogic)@@ -211,9 +209,7 @@ export function MenuItems({data-attr="tree-item-menu-create-shortcut-button"><ButtonPrimitive menuItem>- {isAIFirst- ? `Star ${pluralize(checkedItemCountNumeric, 'selected item')} here`- : `Create ${pluralize(checkedItemCountNumeric, 'shortcut')} here`}+ Star {pluralize(checkedItemCountNumeric, 'selected item')} here</ButtonPrimitive></MenuItem><MenuSeparator />@@ -256,25 +252,13 @@ export function MenuItems({data-attr="tree-item-menu-remove-from-shortcuts-button"><ButtonPrimitive menuItem variant="danger" forceVariant>- {isAIFirst ? (- <>- <IconStar className="size-4 text-inherit" /> Remove from starred- </>- ) : (- 'Remove from shortcuts'- )}+ <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}>- {isAIFirst ? (- <>- <IconStar className="size-4 text-tertiary" /> Already starred- </>- ) : (- 'Already in shortcuts panel'- )}+ <IconStar className="size-4 text-tertiary" /> Already starred</ButtonPrimitive></MenuItem>) : root !== 'custom-products://' ? (@@ -289,13 +273,7 @@ export function MenuItems({data-attr="tree-item-menu-add-to-shortcuts-button"><ButtonPrimitive menuItem>- {isAIFirst ? (- <>- <IconStar className="size-4 text-tertiary" /> Add to starred- </>- ) : (- 'Add to shortcuts panel'- )}+ <IconStar className="size-4 text-tertiary" /> Add to starred</ButtonPrimitive></MenuItem>) : nulldiff --git a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsxindex adc087e27e3e..9a7b9fd80fa6 100644--- a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx+++ b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx@@ -39,7 +39,7 @@ import {import { FEATURE_FLAGS } from '~/lib/constants'import { groupsModel } from '~/models/groupsModel'import { FileSystemEntry, FileSystemIconType, FileSystemImport } from '~/queries/schema/schema-general'-import { UserBasicType, UserShortcutPosition } from '~/types'+import { UserBasicType } from '~/types'import { panelLayoutLogic } from '../panelLayoutLogic'import { customProductsLogic } from './customProductsLogic'@@ -482,13 +482,8 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([href: item.href,}const response = await api.fileSystemShortcuts.create(shortcutItem)- const isAIFirst = !!values.featureFlags[FEATURE_FLAGS.AI_FIRST]- eventUsageLogic.actions.reportNavbarStarredItemAdded(- shortcutItem.type ?? 'unknown',- shortcutPath,- isAIFirst- )- lemonToast.success(isAIFirst ? 'Added to starred' : 'Shortcut created successfully', {+ eventUsageLogic.actions.reportNavbarStarredItemAdded(shortcutItem.type ?? 'unknown', shortcutPath)+ lemonToast.success('Added to starred', {button: {label: 'View',dataAttr: 'project-tree-view-shortcuts',@@ -514,15 +509,11 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([deleteShortcut: async ({ id }) => {const shortcut = values.shortcutData.find((s) => s.id === id)await api.fileSystemShortcuts.delete(id)- const isAIFirst = !!values.featureFlags[FEATURE_FLAGS.AI_FIRST]eventUsageLogic.actions.reportNavbarStarredItemRemoved(shortcut?.type ?? 'unknown',- shortcut?.path ?? 'unknown',- isAIFirst+ shortcut?.path ?? 'unknown')- if (isAIFirst) {- lemonToast.success('Removed from starred')- }+ lemonToast.success('Removed from starred')return values.shortcutData.filter((s) => s.id !== id)},},@@ -1104,15 +1095,8 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([new Set(shortcutData.filter((shortcut) => shortcut.type !== 'folder').map((shortcut) => shortcut.path)),],getCustomProductTreeItems: [- (s) => [s.customProducts, s.featureFlags, s.getShortcutTreeItems, s.folderStates, s.users, s.user],- (- customProducts,- featureFlags,- getShortcutTreeItems,- folderStates,- users,- user- ): ((searchTerm: string) => TreeDataItem[]) => {+ (s) => [s.customProducts, s.featureFlags, s.folderStates, s.users],+ (customProducts, featureFlags, folderStates, users): ((searchTerm: string) => TreeDataItem[]) => {return function getCustomProductItems(searchTerm: string): TreeDataItem[] {const allProducts = getDefaultTreeProducts()const productMap = new Map<string, FileSystemImport>(allProducts.map((p) => [p.path, p]))@@ -1134,51 +1118,20 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([}).filter((p): p is FileSystemImport => p !== null)- const convert = (imports: FileSystemImport[], protocol: string): TreeDataItem[] =>- convertFileSystemEntryToTreeDataItem({- root: protocol,- imports: imports- .filter((f) => !f.flag || (featureFlags as Record<string, boolean>)[f.flag])- .map((i) => ({- ...i,- protocol,- })),- checkedItems: {},- folderStates,- users,- foldersFirst: false,- searchTerm,- })-- const isAIFirst = !!featureFlags[FEATURE_FLAGS.AI_FIRST]- const shortcutPosition = (user?.shortcut_position ?? 'above') as UserShortcutPosition- const generateShortcutItemsCategory = (): TreeDataItem[] => {- if (isAIFirst) {- return []- }- const shortcutItems = getShortcutTreeItems(searchTerm, false)- if (shortcutItems.length === 0) {- return []- }-- return [- {- id: 'custom-products://-shortcuts-category',- name: 'Shortcuts',- displayName: <>Shortcuts</>,- type: 'category',- },- ...shortcutItems,- ]- }-- const result: TreeDataItem[] = [- ...(shortcutPosition === 'above' ? generateShortcutItemsCategory() : []),- ...convert(selectedProducts, 'custom-products://'),- ...(shortcutPosition === 'below' ? generateShortcutItemsCategory() : []),- ]-- return result+ return convertFileSystemEntryToTreeDataItem({+ root: 'custom-products://',+ imports: selectedProducts+ .filter((f) => !f.flag || (featureFlags as Record<string, boolean>)[f.flag])+ .map((i) => ({+ ...i,+ protocol: 'custom-products://',+ })),+ checkedItems: {},+ folderStates,+ users,+ foldersFirst: false,+ searchTerm,+ })}},],@@ -1206,10 +1159,7 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([actions.reorderShortcuts(next)},reorderShortcutsSuccess: ({ shortcutData }) => {- eventUsageLogic.actions.reportNavbarStarredItemsReordered(- shortcutData.length,- !!values.featureFlags[FEATURE_FLAGS.AI_FIRST]- )+ eventUsageLogic.actions.reportNavbarStarredItemsReordered(shortcutData.length, true)},reorderShortcutsFailure: () => {actions.loadShortcuts()diff --git a/frontend/src/layout/scenes/ConfigurePinnedTabsModal.tsx b/frontend/src/layout/scenes/ConfigurePinnedTabsModal.tsxindex c4a1b85b93fe..e0c4c2ea3cbb 100644--- a/frontend/src/layout/scenes/ConfigurePinnedTabsModal.tsx+++ b/frontend/src/layout/scenes/ConfigurePinnedTabsModal.tsx@@ -3,7 +3,6 @@ import posthog from 'posthog-js'import { LemonButton, LemonSegmentedButton, LemonSelect, LemonSelectOptions, LemonTag } from '@posthog/lemon-ui'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { LemonModal } from 'lib/lemon-ui/LemonModal'import { iconForType } from '~/layout/panel-layout/ProjectTree/defaultTree'@@ -21,10 +20,9 @@ export interface ConfigurePinnedTabsModalProps {}export function ConfigurePinnedTabsModal({ isOpen, onClose }: ConfigurePinnedTabsModalProps): JSX.Element {- const isAIFirst = useFeatureFlag('AI_FIRST')const { tabs, homepage } = useValues(sceneLogic)const { currentTeam } = useValues(teamLogic)- const { rawDashboards, nameSortedDashboards, dashboardsLoading } = useValues(dashboardsModel)+ const { nameSortedDashboards, dashboardsLoading } = useValues(dashboardsModel)const { pinTab, unpinTab, setHomepage } = useActions(sceneLogic)const { updateCurrentTeam } = useActions(teamLogic)@@ -35,25 +33,11 @@ export function ConfigurePinnedTabsModal({ isOpen, onClose }: ConfigurePinnedTabhomepage?.sceneId === Scene.Dashboard && homepage?.id?.startsWith('homepage-dashboard-')const projectDefaultDashboardId = currentTeam?.primary_dashboard ?? null- const projectDefaultDashboard =- projectDefaultDashboardId != null ? rawDashboards?.[projectDefaultDashboardId] : null- const projectDefaultDashboardName =- projectDefaultDashboard?.name ??- (projectDefaultDashboardId != null ? `Dashboard #${projectDefaultDashboardId}` : null)- const projectDefaultSubtitle = projectDefaultDashboardName ?? 'Not configured'const homepageDisplayTitle = homepageTabForDisplay? homepageTabForDisplay.customTitle || homepageTabForDisplay.title- : isAIFirst- ? 'Launchpad'- : "Project's default dashboard"- const homepageSubtitle = isUsingProjectDefault- ? isAIFirst- ? 'Default'- : projectDefaultSubtitle- : isUsingNewTabHomepage- ? 'Search'- : null+ : 'Launchpad'+ const homepageSubtitle = isUsingProjectDefault ? 'Default' : isUsingNewTabHomepage ? 'Search' : nullconst projectDefaultDashboardOptions: LemonSelectOptions<number | null> = [{ value: null, label: 'No default dashboard / show the "new tab" page' },@@ -170,98 +154,77 @@ export function ConfigurePinnedTabsModal({ isOpen, onClose }: ConfigurePinnedTab)}</div></div>- {isAIFirst ? (- <LemonSegmentedButton- size="small"- value={- isUsingProjectDefault- ? 'launchpad'- : isUsingNewTabHomepage- ? 'search'- : isUsingDefaultDashboard- ? 'default_dashboard'- : undefined- }- onChange={(newValue) => {- posthog.capture('homepage configure set homepage', {- 'homepage choice': newValue,- })- if (newValue === 'launchpad') {- setHomepage(null)- } else if (newValue === 'search') {- setHomepage(newTabHomepage)- } else if (newValue === 'default_dashboard') {- const dashboardId = currentTeam?.primary_dashboard- if (dashboardId) {- setHomepage({- id: `homepage-dashboard-${dashboardId}`,- pathname: urls.dashboard(dashboardId),- search: '',- hash: '',- title: 'Default dashboard',- iconType: 'dashboard',- active: false,- pinned: true,- sceneId: Scene.Dashboard,- sceneKey: `dashboard-${dashboardId}`,- sceneParams: emptySceneParams,- })- }+ <LemonSegmentedButton+ size="small"+ value={+ isUsingProjectDefault+ ? 'launchpad'+ : isUsingNewTabHomepage+ ? 'search'+ : isUsingDefaultDashboard+ ? 'default_dashboard'+ : undefined+ }+ onChange={(newValue) => {+ posthog.capture('homepage configure set homepage', {+ 'homepage choice': newValue,+ })+ if (newValue === 'launchpad') {+ setHomepage(null)+ } else if (newValue === 'search') {+ setHomepage(newTabHomepage)+ } else if (newValue === 'default_dashboard') {+ const dashboardId = currentTeam?.primary_dashboard+ if (dashboardId) {+ setHomepage({+ id: `homepage-dashboard-${dashboardId}`,+ pathname: urls.dashboard(dashboardId),+ search: '',+ hash: '',+ title: 'Default dashboard',+ iconType: 'dashboard',+ active: false,+ pinned: true,+ sceneId: Scene.Dashboard,+ sceneKey: `dashboard-${dashboardId}`,+ sceneParams: emptySceneParams,+ })}- }}- options={[- {- value: 'launchpad' as const,- label: (- <>- Launchpad{' '}- <LemonTag size="small" type="highlight" className="ml-1">- New- </LemonTag>- </>- ),- 'data-attr': 'configure-homepage-modal-set-launchpad',- tooltip: 'An AI-powered home with quick actions and recent items',- },- {- value: 'search' as const,- label: 'Search',- 'data-attr': 'configure-homepage-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-homepage-modal-set-default-dashboard',- tooltip: "Open your project's default dashboard when you go home",- disabledReason: !currentTeam?.primary_dashboard- ? 'No default dashboard configured'- : undefined,- },- ]}- />- ) : (- <div className="flex flex-wrap gap-2">- <LemonButton- size="small"- type="secondary"- onClick={() => setHomepage(null)}- disabledReason={isUsingProjectDefault ? 'Already your homepage' : undefined}- >- Use default dashboard- </LemonButton>- <LemonButton- size="small"- type="secondary"- onClick={() => setHomepage(newTabHomepage)}- disabledReason={isUsingNewTabHomepage ? 'Already your homepage' : undefined}- >- Use new tab page- </LemonButton>- </div>- )}+ }+ }}+ options={[+ {+ value: 'launchpad' as const,+ label: (+ <>+ Launchpad{' '}+ <LemonTag size="small" type="highlight" className="ml-1">+ New+ </LemonTag>+ </>+ ),+ 'data-attr': 'configure-homepage-modal-set-launchpad',+ tooltip: 'An AI-powered home with quick actions and recent items',+ },+ {+ value: 'search' as const,+ label: 'Search',+ 'data-attr': 'configure-homepage-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-homepage-modal-set-default-dashboard',+ tooltip: "Open your project's default dashboard when you go home",+ disabledReason: !currentTeam?.primary_dashboard+ ? 'No default dashboard configured'+ : undefined,+ },+ ]}+ /></div>- {(isAIFirst ? isUsingDefaultDashboard : isUsingProjectDefault) && (+ {isUsingDefaultDashboard && (<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">diff --git a/frontend/src/lib/components/Account/NewAccountMenu.tsx b/frontend/src/lib/components/Account/NewAccountMenu.tsxindex ea5e8ec7ddba..380b42ef0018 100644--- a/frontend/src/lib/components/Account/NewAccountMenu.tsx+++ b/frontend/src/lib/components/Account/NewAccountMenu.tsx@@ -12,7 +12,6 @@ import {} from '@posthog/icons'import { FEATURE_FLAGS } from 'lib/constants'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { Link } from 'lib/lemon-ui/Link/Link'import { ProfilePicture } from 'lib/lemon-ui/ProfilePicture/ProfilePicture'import { UploadedLogo } from 'lib/lemon-ui/UploadedLogo/UploadedLogo'@@ -68,7 +67,6 @@ export function NewAccountMenu({ isLayoutNavCollapsed }: AccountMenuProps): JSX.const { guardAvailableFeature } = useValues(upgradeModalLogic)const { showCreateProjectModal } = useActions(globalModalsLogic)const { showCreateOrganizationModal } = useActions(globalModalsLogic)- const isAiFirst = useFeatureFlag('AI_FIRST')const projectNameStartsWithEmoji = currentTeam?.name?.match(/^\p{Emoji}/u) !== nullconst projectNameWithoutFirstEmoji = projectNameStartsWithEmoji@@ -113,9 +111,7 @@ export function NewAccountMenu({ isLayoutNavCollapsed }: AccountMenuProps): JSX.<UploadedLogo name="?" entityId="" mediaId="" size="xsmall" />)}{!isLayoutNavCollapsed && (- <span- className={cn('truncate', isAiFirst && 'text-secondary group-hover:text-primary')}- >+ <span className="truncate text-secondary group-hover:text-primary">{isAuthenticatedTeam(currentTeam)? (projectNameWithoutFirstEmoji ?? 'Project'): 'Account menu'}@@ -126,7 +122,6 @@ export function NewAccountMenu({ isLayoutNavCollapsed }: AccountMenuProps): JSX.className={isLayoutNavCollapsed ? 'absolute top-0.5 right-0.5' : 'mr-0.5'}/>)}- {!isLayoutNavCollapsed && !isAiFirst && <MenuOpenIndicator />}</ButtonPrimitive>)}/>diff --git a/frontend/src/lib/components/FileSystem/ItemSelectModal/ItemSelectModal.tsx b/frontend/src/lib/components/FileSystem/ItemSelectModal/ItemSelectModal.tsxindex d2e23c1e02b3..5429b6816ced 100644--- a/frontend/src/lib/components/FileSystem/ItemSelectModal/ItemSelectModal.tsx+++ b/frontend/src/lib/components/FileSystem/ItemSelectModal/ItemSelectModal.tsx@@ -5,7 +5,6 @@ import { ReactNode, useRef, useState } from 'react'import { IconFolder, IconFolderOpen } from '@posthog/icons'import { dayjs } from 'lib/dayjs'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'import { LemonButton } from 'lib/lemon-ui/LemonButton'import { LemonField } from 'lib/lemon-ui/LemonField'@@ -86,7 +85,6 @@ export function ItemSelectModal({ className, includeProtocol, includeRoot }: Ite)const { setSearchTerm, setExpandedSearchFolders, setExpandedFolders, setEditingItemId, rename, toggleFolderOpen } =useActions(projectTreeLogic(props))- const isAIFirst = useFeatureFlag('AI_FIRST')const treeRef = useRef<LemonTreeRef>(null)useOnMountEffect(() => {@@ -137,8 +135,7 @@ export function ItemSelectModal({ className, includeProtocol, includeRoot }: Ite: undefined}>- Add {selectedItem?.name.toLowerCase() || selectedItem?.displayName}{' '}- {isAIFirst ? 'to starred' : 'shortcut'}+ Add {selectedItem?.name.toLowerCase() || selectedItem?.displayName} to starred</LemonButton></>}diff --git a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsx b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsxindex aff7ae1cefe4..0d0246ab021a 100644--- a/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsx+++ b/frontend/src/lib/components/NavPanelAdvertisement/NavPanelAdvertisement.tsx@@ -5,13 +5,11 @@ import { useEffect } from 'react'import { IconX } from '@posthog/icons'import { Link } from '@posthog/lemon-ui'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { LemonButton } from 'lib/lemon-ui/LemonButton'import { getFeatureFlagPayload } from 'lib/logic/featureFlagLogic'import { addProductIntent } from 'lib/utils/product-intents'import { panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'-import { pinnedFolderLogic } from '~/layout/panel-layout/PinnedFolder/pinnedFolderLogic'import { getTreeItemsProducts } from '~/products'import {FileSystemImport,@@ -47,21 +45,14 @@ function isCampaignPayload(value: unknown): value is CampaignPayload {export function NavPanelAdvertisement(): JSX.Element | null {const logic = navPanelAdvertisementRecommendedLogic()const { oldestRecommendedProduct } = useValues(logic)- const { pinnedFolder } = useValues(pinnedFolderLogic)const { isLayoutNavCollapsed } = useValues(panelLayoutLogic)- const isAIFirst = useFeatureFlag('AI_FIRST')const campaignFlagPayload = getFeatureFlagPayload('nav-panel-campaign') as CampaignPayload | undefinedif (isLayoutNavCollapsed) {return null}- // Show when custom-products sidebar is active (old sidebar) or AI-first sidebar is enabled- if (!isAIFirst && pinnedFolder !== 'custom-products://') {- return null- }-// Campaign flag payload takes priority over product recommendationsif (isCampaignPayload(campaignFlagPayload)) {return <NavPanelCampaignContent campaign={campaignFlagPayload} />diff --git a/frontend/src/lib/components/Scenes/SceneFavorite.tsx b/frontend/src/lib/components/Scenes/SceneFavorite.tsxindex 5e33f2ebb784..d103e3516b06 100644--- a/frontend/src/lib/components/Scenes/SceneFavorite.tsx+++ b/frontend/src/lib/components/Scenes/SceneFavorite.tsx@@ -1,6 +1,5 @@-import { IconHeart, IconHeartFilled, IconStar, IconStarFilled } from '@posthog/icons'+import { IconHeart, IconHeartFilled } from '@posthog/icons'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { ButtonPrimitive, DisabledReasonsObject } from 'lib/ui/Button/ButtonPrimitives'import { SceneDataAttrKeyProps } from './utils'@@ -12,7 +11,6 @@ interface SceneFavoriteProps extends SceneDataAttrKeyProps {}export function SceneFavorite({ dataAttrKey, onClick, isFavorited, disabledReasons }: SceneFavoriteProps): JSX.Element {- const isAIFirst = useFeatureFlag('AI_FIRST')return (<ButtonPrimitivemenuItem@@ -22,17 +20,7 @@ export function SceneFavorite({ dataAttrKey, onClick, isFavorited, disabledReasoactive={isFavorited}disabledReasons={disabledReasons}>- {isAIFirst ? (- isFavorited ? (- <IconHeartFilled className="text-danger" />- ) : (- <IconHeart />- )- ) : isFavorited ? (- <IconStarFilled className="text-warning" />- ) : (- <IconStar />- )}+ {isFavorited ? <IconHeartFilled className="text-danger" /> : <IconHeart />}Favorite</ButtonPrimitive>)diff --git a/frontend/src/lib/components/Scenes/SceneFile.tsx b/frontend/src/lib/components/Scenes/SceneFile.tsxindex d08836b52c3f..add192d9260a 100644--- a/frontend/src/lib/components/Scenes/SceneFile.tsx+++ b/frontend/src/lib/components/Scenes/SceneFile.tsx@@ -1,8 +1,7 @@import { useActions, useValues } from 'kea'-import { IconFolderMove, IconFolderOpen, IconShortcut, IconStar, IconStarFilled } from '@posthog/icons'+import { IconFolderMove, IconFolderOpen, IconStar, IconStarFilled } from '@posthog/icons'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'import {DropdownMenu,@@ -23,7 +22,6 @@ import { ScenePanelLabel } from '~/layout/scenes/SceneLayout'import { moveToLogic } from '../FileSystem/MoveTo/moveToLogic'export function SceneFile({ dataAttrKey }: { dataAttrKey: string }): JSX.Element | null {- const isAIFirst = useFeatureFlag('AI_FIRST')const { assureVisibility } = useActions(projectTreeLogic({ key: PROJECT_TREE_KEY }))const { showLayoutPanel, setActivePanelIdentifier } = useActions(panelLayoutLogic)const { addShortcutItem, deleteShortcut } = useActions(projectTreeDataLogic)@@ -95,20 +93,8 @@ export function SceneFile({ dataAttrKey }: { dataAttrKey: string }): JSX.Element: `${dataAttrKey}-add-to-shortcuts-dropdown-menu-item`}>- {isAIFirst ? (- isAlreadyStarred ? (- <IconStarFilled className="text-warning" />- ) : (- <IconStar />- )- ) : (- <IconShortcut />- )}- {isAIFirst- ? isAlreadyStarred- ? 'Remove from starred'- : 'Add to starred'- : 'Add to shortcuts panel'}+ {isAlreadyStarred ? <IconStarFilled className="text-warning" /> : <IconStar />}+ {isAlreadyStarred ? 'Remove from starred' : 'Add to starred'}</ButtonPrimitive></DropdownMenuItem></DropdownMenuGroup>diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex 9a0b28691056..e7c28b0364fc 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -165,7 +165,6 @@ export const FEATURE_FLAGS = {HALLOWEEN_OVERRIDE: 'halloween-override', // owner: #team-growth, overrides the checks for Halloween to return true when this is enabled// UX flags, used to control the UX of the app- AI_FIRST: 'ai-first', // this a larger change, not released to team yetSTARRED_REORDER: 'starred-reorder', // owner: #team-platform-ux, drag-and-drop reorder of starred shortcuts in the side panel// Feature flags used to control opt-in for different behaviors, should not be removeddiff --git a/frontend/src/lib/utils/eventUsageLogic.ts b/frontend/src/lib/utils/eventUsageLogic.tsindex 321348a2c652..e103427c4eae 100644--- a/frontend/src/lib/utils/eventUsageLogic.ts+++ b/frontend/src/lib/utils/eventUsageLogic.ts@@ -1067,20 +1067,17 @@ export const eventUsageLogic = kea<eventUsageLogicType>([reportUsageMetricUpdated: () => true,reportUsageMetricDeleted: () => true,// navbar starred- reportNavbarStarredItemAdded: (itemType: string, itemName: string, isAIFirst: boolean) => ({+ reportNavbarStarredItemAdded: (itemType: string, itemName: string) => ({itemType,itemName,- isAIFirst,}),- reportNavbarStarredItemRemoved: (itemType: string, itemName: string, isAIFirst: boolean) => ({+ reportNavbarStarredItemRemoved: (itemType: string, itemName: string) => ({itemType,itemName,- isAIFirst,}),- reportNavbarStarredItemClicked: (itemType: string, itemName: string, isAIFirst: boolean) => ({+ reportNavbarStarredItemClicked: (itemType: string, itemName: string) => ({itemType,itemName,- isAIFirst,}),reportNavbarStarredItemsReordered: (itemCount: number, isAIFirst: boolean) => ({itemCount,@@ -2457,25 +2454,22 @@ export const eventUsageLogic = kea<eventUsageLogicType>([const eventName = delay ? 'person profile analyzed' : 'person profile viewed'posthog.capture(eventName, { delay })},- reportNavbarStarredItemAdded: ({ itemType, itemName, isAIFirst }) => {+ reportNavbarStarredItemAdded: ({ itemType, itemName }) => {posthog.capture('navbar starred item added', {item_type: itemType,item_name: itemName,- is_ai_first: isAIFirst,})},- reportNavbarStarredItemRemoved: ({ itemType, itemName, isAIFirst }) => {+ reportNavbarStarredItemRemoved: ({ itemType, itemName }) => {posthog.capture('navbar starred item removed', {item_type: itemType,item_name: itemName,- is_ai_first: isAIFirst,})},- reportNavbarStarredItemClicked: ({ itemType, itemName, isAIFirst }) => {+ reportNavbarStarredItemClicked: ({ itemType, itemName }) => {posthog.capture('navbar starred item clicked', {item_type: itemType,item_name: itemName,- is_ai_first: isAIFirst,})},reportNavbarStarredItemsReordered: ({ itemCount, isAIFirst }) => {diff --git a/frontend/src/scenes/max/components/AiFirstMaxInstance.tsx b/frontend/src/scenes/max/components/AiFirstMaxInstance.tsxindex 8d9fe69c4d79..e806dbd63176 100644--- a/frontend/src/scenes/max/components/AiFirstMaxInstance.tsx+++ b/frontend/src/scenes/max/components/AiFirstMaxInstance.tsx@@ -3,7 +3,6 @@ import { BindLogic, useActions, useValues } from 'kea'import { IconOpenSidebar, IconShare } from '@posthog/icons'import { LemonBanner } from '@posthog/lemon-ui'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { LemonButton } from 'lib/lemon-ui/LemonButton'import { copyToClipboard } from 'lib/utils/copyToClipboard'import { cn } from 'lib/utils/css-classes'@@ -17,7 +16,6 @@ import { maxGlobalLogic } from '../maxGlobalLogic'import { maxLogic } from '../maxLogic'import { MaxThreadLogicProps, maxThreadLogic } from '../maxThreadLogic'import { Thread } from '../Thread'-import { ChatHistoryPanel } from './ChatHistoryPanel'import { SidebarQuestionInputWithSuggestions } from './SidebarQuestionInputWithSuggestions'import { ThreadAutoScroller } from './ThreadAutoScroller'@@ -96,7 +94,6 @@ interface AiFirstMaxInstanceProps {export function AiFirstMaxInstance({ tabId }: AiFirstMaxInstanceProps): JSX.Element {const { threadVisible, threadLogicKey, conversation, conversationId } = useValues(maxLogic({ tabId }))const { startNewConversation } = useActions(maxLogic({ tabId }))- const isAIFirst = useFeatureFlag('AI_FIRST')const threadProps: MaxThreadLogicProps = {tabId,@@ -106,7 +103,6 @@ export function AiFirstMaxInstance({ tabId }: AiFirstMaxInstanceProps): JSX.Elemreturn (<div className="flex grow overflow-hidden h-full">- {!isAIFirst && <ChatHistoryPanel tabId={tabId} />}<BindLogic logic={maxLogic} props={{ tabId }}><BindLogic logic={maxThreadLogic} props={threadProps}><div className="flex flex-col grow overflow-hidden">diff --git a/frontend/src/scenes/max/components/ChatHistoryPanel.tsx b/frontend/src/scenes/max/components/ChatHistoryPanel.tsxdeleted file mode 100644index 56b192731546..000000000000--- a/frontend/src/scenes/max/components/ChatHistoryPanel.tsx+++ /dev/null@@ -1,194 +0,0 @@-import { Autocomplete } from '@base-ui/react/autocomplete'-import { useActions, useValues } from 'kea'-import { memo, useRef } from 'react'--import { IconPlusSmall, IconSearch, IconSidebarClose } from '@posthog/icons'-import { LemonSkeleton } from '@posthog/lemon-ui'--import { Resizer } from 'lib/components/Resizer/Resizer'-import { ResizerLogicProps } from 'lib/components/Resizer/resizerLogic'-import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows'-import { Link } from 'lib/lemon-ui/Link'-import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'-import { cn } from 'lib/utils/css-classes'--import { ConversationDetail } from '~/types'--import { maxLogic } from '../maxLogic'-import { CHAT_HISTORY_COLLAPSE_THRESHOLD, maxPanelSizingLogic } from '../maxPanelSizingLogic'-import { AiChatListItem } from './List/AiChatListItem'--interface ChatHistoryPanelProps {- tabId: string-}--export const ChatHistoryPanel = memo(function ChatHistoryPanel({ tabId }: ChatHistoryPanelProps): JSX.Element {- const chatHistoryPanelRef = useRef<HTMLDivElement>(null)- const { startNewConversation, openConversation } = useActions(maxLogic({ tabId }))- const { conversationHistory, conversationHistoryLoading, conversationId } = useValues(maxLogic({ tabId }))-- const resizerProps: ResizerLogicProps = {- containerRef: chatHistoryPanelRef,- logicKey: 'max-chat-history-panel',- persistent: true,- closeThreshold: CHAT_HISTORY_COLLAPSE_THRESHOLD,- placement: 'right',- }-- const { chatHistoryPanelWidth, isChatHistoryPanelCollapsed, chatHistoryPanelWillCollapse } = useValues(- maxPanelSizingLogic({- chatHistoryPanelRef,- chatHistoryPanelResizerProps: resizerProps,- })- )-- const { toggleChatHistoryPanelCollapsed, setChatHistoryPanelCollapsed } = useActions(- maxPanelSizingLogic({- chatHistoryPanelRef,- chatHistoryPanelResizerProps: resizerProps,- })- )-- return (- <div- className={cn(- 'relative flex flex-col bg-primary border-r border-primary transition-opacity duration-100 max-w-[var(--chat-history-panel-width)] h-full overflow-hidden',- isChatHistoryPanelCollapsed ? 'w-12' : `w-[var(--chat-history-panel-width)]`,- chatHistoryPanelWillCollapse && 'opacity-50'- )}- style={- {- '--chat-history-panel-width': `${chatHistoryPanelWidth}px`,- } as React.CSSProperties & { '--chat-history-panel-width': string }- }- ref={chatHistoryPanelRef}- >- <Autocomplete.Root- items={conversationHistory}- filter={(item, query) => (item?.title || '').toLowerCase().includes(query.toLowerCase())}- itemToStringValue={(item: ConversationDetail) => item?.title ?? ''}- inline- defaultOpen- autoHighlight={true}- >- <div className="flex flex-col h-full min-h-0">- <div className="flex items-center gap-1 p-2 shrink-0">- <ButtonPrimitive- onClick={toggleChatHistoryPanelCollapsed}- data-attr="max-toggle-chat-history"- tooltip={isChatHistoryPanelCollapsed ? 'Expand history' : 'Collapse history'}- className="h-[32px]"- iconOnly- >- <IconSidebarClose- className={cn('size-4 text-tertiary', !isChatHistoryPanelCollapsed && 'rotate-180')}- />- </ButtonPrimitive>- {!isChatHistoryPanelCollapsed && (- <>- <label- htmlFor="search-chats"- className="input-like flex items-center flex-1 px-1 gap-1 group h-[30px]"- >- <IconSearch className="size-3 text-tertiary group-focus-within:text-primary w-4 shrink-0" />- <Autocomplete.Input- id="search-chats"- data-attr="max-search-chat-history"- placeholder="Chat history"- aria-label="Chat history"- className={cn(- 'w-full text-sm bg-transparent border-none focus:outline-none focus:ring-0 transition-[width] duration-100 h-[30px]'- )}- />- </label>- <ButtonPrimitive- variant="outline"- iconOnly- onClick={() => startNewConversation()}- data-attr="max-new-chat"- tooltip="New chat"- >- <IconPlusSmall />- </ButtonPrimitive>- </>- )}- </div>-- {!isChatHistoryPanelCollapsed && (- <ScrollableShadows- direction="vertical"- className="flex flex-col flex-1 min-h-0 overflow-hidden"- innerClassName="flex flex-col px-2 pt-2 pb-4"- styledScrollbars- >- {conversationHistoryLoading && conversationHistory.length === 0 ? (- <div className="flex flex-col gap-1">- <LemonSkeleton className="h-8" />- <LemonSkeleton className="h-8 opacity-60" />- <LemonSkeleton className="h-8 opacity-30" />- </div>- ) : (- <>- <Autocomplete.List className="flex flex-col gap-1 -mx-1">- {(conversation: ConversationDetail) => (- <AiChatListItem.Root>- <AiChatListItem.Group>- <Autocomplete.Item- key={conversation.id}- value={conversation}- onClick={(e) => {- e.preventDefault()- openConversation(conversation.id)- }}- render={- <Link- to={AiChatListItem.getHref(conversation.id)}- buttonProps={{- active: conversation.id === conversationId,- fullWidth: true,- className: 'pr-0',- }}- tooltip={conversation.title || 'view conversation'}- tooltipPlacement="right"- extraContextMenuItems={- <AiChatListItem.ContextMenuAction- conversationId={conversation.id}- />- }- >- <AiChatListItem.Content- showIcon- title={conversation.title}- status={conversation.status}- updatedAt={conversation.updated_at}- />- </Link>- }- />- <AiChatListItem.Trigger />- </AiChatListItem.Group>- <AiChatListItem.Actions conversationId={conversation.id} />- </AiChatListItem.Root>- )}- </Autocomplete.List>- <Autocomplete.Empty className="flex flex-col items-center justify-center text-center py-8 text-muted empty:hidden">- <p className="text-sm mb-0">No chats found</p>- </Autocomplete.Empty>- </>- )}- </ScrollableShadows>- )}- </div>- </Autocomplete.Root>-- <Resizer- containerRef={chatHistoryPanelRef}- logicKey="max-chat-history-panel"- placement="right"- persistent- closeThreshold={CHAT_HISTORY_COLLAPSE_THRESHOLD}- onToggleClosed={(closed) => setChatHistoryPanelCollapsed(closed)}- />- </div>- )-})diff --git a/frontend/src/scenes/max/maxGlobalLogic.tsx b/frontend/src/scenes/max/maxGlobalLogic.tsxindex 758f6cf62c87..f39d7e2c14a1 100644--- a/frontend/src/scenes/max/maxGlobalLogic.tsx+++ b/frontend/src/scenes/max/maxGlobalLogic.tsx@@ -3,7 +3,7 @@ import { loaders } from 'kea-loaders'import { router } from 'kea-router'import api from 'lib/api'-import { FEATURE_FLAGS, OrganizationMembershipLevel } from 'lib/constants'+import { OrganizationMembershipLevel } from 'lib/constants'import { dayjs } from 'lib/dayjs'import { lemonToast } from 'lib/lemon-ui/LemonToast'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'@@ -196,10 +196,8 @@ export const maxGlobalLogic = kea<maxGlobalLogicType>([lemonToast.error(errorObject?.data?.detail || 'Failed to load conversation history.')},})),- afterMount(({ actions, values }) => {- if (values.featureFlags[FEATURE_FLAGS.AI_FIRST]) {- actions.loadConversationHistory()- }+ afterMount(({ actions }) => {+ actions.loadConversationHistory()}),selectors({diff --git a/frontend/src/scenes/max/maxPanelSizingLogic.ts b/frontend/src/scenes/max/maxPanelSizingLogic.tsdeleted file mode 100644index dd38180c5f8c..000000000000--- a/frontend/src/scenes/max/maxPanelSizingLogic.ts+++ /dev/null@@ -1,88 +0,0 @@-import { actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'--import { ResizerLogicProps, resizerLogic } from 'lib/components/Resizer/resizerLogic'--import type { maxPanelSizingLogicType } from './maxPanelSizingLogicType'--export interface MaxPanelSizingLogicProps {- chatHistoryPanelRef: React.RefObject<HTMLDivElement>- chatHistoryPanelResizerProps: ResizerLogicProps-}--const MINIMUM_CHAT_HISTORY_WIDTH = 200-export const CHAT_HISTORY_COLLAPSE_THRESHOLD = 60-const CHAT_HISTORY_DEFAULT_WIDTH = 280-const MAXIMUM_CHAT_HISTORY_WIDTH = 400-const CHAT_HISTORY_COLLAPSED_WIDTH = 48--export const maxPanelSizingLogic = kea<maxPanelSizingLogicType>([- path(['scenes', 'max', 'maxPanelSizingLogic']),- props({} as MaxPanelSizingLogicProps),- connect((props: MaxPanelSizingLogicProps) => ({- values: [- resizerLogic(props.chatHistoryPanelResizerProps),- ['desiredSize as chatHistoryPanelDesiredSize', 'isResizeInProgress as chatHistoryPanelIsResizing'],- ],- actions: [- resizerLogic(props.chatHistoryPanelResizerProps),- ['setDesiredSize as chatHistoryPanelSetDesiredSize', 'endResize as chatHistoryPanelEndResize'],- ],- })),- actions({- toggleChatHistoryPanelCollapsed: true,- setChatHistoryPanelCollapsed: (collapsed: boolean) => ({ collapsed }),- setChatHistoryPanelWillCollapse: (willCollapse: boolean) => ({ willCollapse }),- }),- reducers({- isChatHistoryPanelCollapsed: [- false, // Start expanded by default- { persist: true },- {- toggleChatHistoryPanelCollapsed: (state) => !state,- setChatHistoryPanelCollapsed: (_, { collapsed }) => collapsed,- },- ],- chatHistoryPanelWillCollapse: [- false,- {- setChatHistoryPanelCollapsed: (state, { collapsed }) => (collapsed ? state : false),- setChatHistoryPanelWillCollapse: (_, { willCollapse }) => willCollapse,- },- ],- }),- listeners(({ actions, values }) => ({- chatHistoryPanelSetDesiredSize: ({ size }) => {- // Update willCollapse state based on desired size- if (size !== null) {- actions.setChatHistoryPanelWillCollapse(size <= CHAT_HISTORY_COLLAPSE_THRESHOLD)- }- },- chatHistoryPanelEndResize: () => {- // When resizing stops and the panel is at or below the collapse threshold, collapse it- if (values.chatHistoryPanelDesiredSize !== null) {- if (values.chatHistoryPanelDesiredSize <= CHAT_HISTORY_COLLAPSE_THRESHOLD) {- actions.setChatHistoryPanelCollapsed(true)- actions.chatHistoryPanelSetDesiredSize(CHAT_HISTORY_DEFAULT_WIDTH)- }- }- },- })),- selectors({- chatHistoryPanelWidth: [- (s) => [s.chatHistoryPanelDesiredSize, s.isChatHistoryPanelCollapsed],- (desiredSize: number | null, isCollapsed: boolean) => {- if (isCollapsed) {- return CHAT_HISTORY_COLLAPSED_WIDTH- }- return Math.min(- Math.max(desiredSize || CHAT_HISTORY_DEFAULT_WIDTH, MINIMUM_CHAT_HISTORY_WIDTH),- MAXIMUM_CHAT_HISTORY_WIDTH- )- },- ],- chatHistoryPanelResizerProps: [- (_, p) => [p.chatHistoryPanelResizerProps],- (chatHistoryPanelResizerProps) => chatHistoryPanelResizerProps,- ],- }),-])diff --git a/frontend/src/scenes/project-homepage/ProjectHomepage.tsx b/frontend/src/scenes/project-homepage/ProjectHomepage.tsxindex e8235314ae58..c8ca51beff6b 100644--- a/frontend/src/scenes/project-homepage/ProjectHomepage.tsx+++ b/frontend/src/scenes/project-homepage/ProjectHomepage.tsx@@ -1,129 +1,34 @@import './ProjectHomepage.scss'-import { useActions, useValues } from 'kea'-import { router } from 'kea-router'+import { useValues } from 'kea'-import { IconHome } from '@posthog/icons'--import { SceneDashboardChoiceRequired } from 'lib/components/SceneDashboardChoice/SceneDashboardChoiceRequired'-import { FEATURE_FLAGS } from 'lib/constants'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'-import { LemonButton } from 'lib/lemon-ui/LemonButton'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'-import { cn } from 'lib/utils/css-classes'-import { Dashboard } from 'scenes/dashboard/Dashboard'-import { DashboardLogicProps, dashboardLogic } from 'scenes/dashboard/dashboardLogic'-import { NewTabScene } from 'scenes/new-tab/NewTabScene'import { projectHomepageLogic } from 'scenes/project-homepage/projectHomepageLogic'-import { Scene, SceneExport } from 'scenes/sceneTypes'-import { inviteLogic } from 'scenes/settings/organization/inviteLogic'-import { urls } from 'scenes/urls'--import { navigationLogic } from '~/layout/navigation/navigationLogic'-import { SceneContent } from '~/layout/scenes/components/SceneContent'-import { SceneTitleSection } from '~/layout/scenes/components/SceneTitleSection'-import { DashboardPlacement } from '~/types'+import { SceneExport } from 'scenes/sceneTypes'+import { userLogic } from 'scenes/userLogic'+import { WelcomeDialog } from 'scenes/welcome/WelcomeDialog'+import { wasWelcomeDismissed } from 'scenes/welcome/welcomeDialogLogic'import { AiFirstHomepage } from './ai-first/AiFirstHomepage'+/** Only mount the welcome dialog (and its kea logic) for users actually eligible to see it. */+function MaybeWelcomeDialog(): JSX.Element | null {+ const { user } = useValues(userLogic)+ if (!user || user.is_organization_first_user !== false || wasWelcomeDismissed(user.uuid, user.organization?.id)) {+ return null+ }+ return <WelcomeDialog />+}+export const scene: SceneExport = {component: ProjectHomepage,logic: projectHomepageLogic,}-function HomePageContent(): JSX.Element {- const { dashboardLogicProps } = useValues(projectHomepageLogic)- const { showInviteModal } = useActions(inviteLogic)- const { dashboard } = useValues(dashboardLogic(dashboardLogicProps as DashboardLogicProps))- const { showConfigurePinnedTabsModal } = useActions(navigationLogic)-- // TODO: Remove this after AA test is over- const { featureFlags } = useValues(featureFlagLogic)- const aaTestBayesianLegacy = featureFlags[FEATURE_FLAGS.AA_TEST_BAYESIAN_LEGACY]- const aaTestBayesianNew = featureFlags[FEATURE_FLAGS.AA_TEST_BAYESIAN_NEW]- const isAiFirst = featureFlags[FEATURE_FLAGS.AI_FIRST]-- return (- <SceneContent className={cn('ProjectHomepage', !isAiFirst && 'p-4')}>- {/* TODO: Remove this after AA test is over. Just a hidden element. */}- <span className="hidden" data-attr="aa-test-flag-result">- AA test flag result: {String(aaTestBayesianLegacy)} {String(aaTestBayesianNew)}- </span>-- <SceneTitleSection- name={dashboard?.name ?? 'Project Homepage'}- resourceType={{- type: 'project',- forceIcon: <IconHome />,- }}- actions={- <>- <LemonButton- type="secondary"- size="small"- data-attr="project-home-edit-dashboard"- onClick={() => {- router.actions.push(urls.dashboard(dashboard?.id ?? ''))- }}- >- View dashboard- </LemonButton>- <LemonButton- type="secondary"- size="small"- data-attr="project-home-customize-homepage"- onClick={() => showConfigurePinnedTabsModal()}- >- Customize homepage- </LemonButton>- <LemonButton- data-attr="project-home-invite-team-members"- onClick={() => {- showInviteModal()- }}- type="secondary"- size="small"- >- Invite members- </LemonButton>- </>- }- />- {dashboardLogicProps ? (- <Dashboard id={dashboardLogicProps.id.toString()} placement={DashboardPlacement.ProjectHomepage} />- ) : (- <SceneDashboardChoiceRequired- open={() => {- showConfigurePinnedTabsModal()- }}- scene={Scene.ProjectHomepage}- />- )}- </SceneContent>- )-}-export function ProjectHomepage(): JSX.Element {- const { dashboardLogicProps } = useValues(projectHomepageLogic)- const isAIFirst = useFeatureFlag('AI_FIRST')-- if (isAIFirst) {- return (- <div className="flex-1 min-h-0">- <AiFirstHomepage />- </div>- )- }-- // if there is no numeric dashboard id, the dashboard logic will throw...- // so we check it here first- if (dashboardLogicProps?.id) {- return <HomePageContent />- }- // Negative margin to counter-act the scene configs default paddingreturn (- <div className="-m-4">- <NewTabScene />+ <div className="flex-1 min-h-0">+ <AiFirstHomepage />+ <MaybeWelcomeDialog /></div>)}diff --git a/frontend/src/scenes/project-homepage/projectHomepageLogic.tsx b/frontend/src/scenes/project-homepage/projectHomepageLogic.tsxindex 25d9e5bffeb9..b5a3d8bffabc 100644--- a/frontend/src/scenes/project-homepage/projectHomepageLogic.tsx+++ b/frontend/src/scenes/project-homepage/projectHomepageLogic.tsx@@ -1,25 +1,13 @@-import { BuiltLogic, actions, beforeUnmount, connect, kea, path, reducers, selectors } from 'kea'+import { actions, connect, kea, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'-import { subscriptions } from 'kea-subscriptions'import api from 'lib/api'-import { FEATURE_FLAGS } from 'lib/constants'-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'-import { DashboardLogicProps, dashboardLogic } from 'scenes/dashboard/dashboardLogic'-import { MaxContextInput, createMaxContextHelpers } from 'scenes/max/maxTypes'+import { MaxContextInput } from 'scenes/max/maxTypes'import { projectLogic } from 'scenes/projectLogic'-import { teamLogic } from 'scenes/teamLogic'import { dashboardsModel } from '~/models/dashboardsModel'import { getQueryBasedInsightModel } from '~/queries/nodes/InsightViz/utils'-import {- Breadcrumb,- DashboardBasicType,- DashboardPlacement,- DashboardType,- InsightModel,- QueryBasedInsightModel,-} from '~/types'+import { Breadcrumb, DashboardBasicType, InsightModel, QueryBasedInsightModel } from '~/types'export type RecentItem =| (QueryBasedInsightModel & { itemType: 'insight' })@@ -30,16 +18,7 @@ import type { projectHomepageLogicType } from './projectHomepageLogicType'export const projectHomepageLogic = kea<projectHomepageLogicType>([path(['scenes', 'project-homepage', 'projectHomepageLogic']),connect(() => ({- values: [- teamLogic,- ['currentTeam'],- projectLogic,- ['currentProjectId'],- dashboardsModel,- ['rawDashboards', 'dashboardsLoading'],- featureFlagLogic,- ['featureFlags'],- ],+ values: [projectLogic, ['currentProjectId'], dashboardsModel, ['rawDashboards', 'dashboardsLoading']],})),actions({@@ -74,46 +53,10 @@ export const projectHomepageLogic = kea<projectHomepageLogicType>([})),selectors({- primaryDashboardId: [() => [teamLogic.selectors.currentTeam], (currentTeam) => currentTeam?.primary_dashboard],- dashboardLogicProps: [- (s) => [s.primaryDashboardId],- (primaryDashboardId): DashboardLogicProps | null =>- primaryDashboardId- ? {- id: primaryDashboardId,- placement: DashboardPlacement.ProjectHomepage,- }- : null,- ],maxContext: [- (s) => [- s.featureFlags,- (state) => {- // Get the dashboard from the mounted dashboardLogic- const dashboardLogicProps = s.dashboardLogicProps(state)- if (!dashboardLogicProps) {- return null- }- const logic = dashboardLogic.findMounted(dashboardLogicProps)- if (!logic) {- return null- }- return logic.selectors.dashboard(state)- },- ],- (- featureFlags: Record<string, any>,- dashboard: DashboardType<QueryBasedInsightModel> | null- ): MaxContextInput[] => {- // In AI-first mode, context should only be added explicitly via @Context button- if (featureFlags[FEATURE_FLAGS.AI_FIRST]) {- return []- }- if (!dashboard) {- return []- }- return [createMaxContextHelpers.dashboard(dashboard)]- },+ () => [],+ // Context is only added explicitly via the @Context button.+ (): MaxContextInput[] => [],],recentItems: [(s) => [s.recentInsights, s.recentDashboards],@@ -145,22 +88,4 @@ export const projectHomepageLogic = kea<projectHomepageLogicType>([],],}),-- subscriptions(({ cache }) => ({- dashboardLogicProps: (dashboardLogicProps) => {- if (dashboardLogicProps) {- const unmount = (dashboardLogic(dashboardLogicProps) as BuiltLogic).mount()- cache.unmountDashboardLogic?.()- cache.unmountDashboardLogic = unmount- } else if (cache.unmountDashboardLogic) {- cache.unmountDashboardLogic?.()- cache.unmountDashboardLogic = null- }- },- })),-- beforeUnmount(({ cache }) => {- cache.unmountDashboardLogic?.()- cache.unmountDashboardLogic = null- }),])diff --git a/frontend/src/scenes/saved-insights/SavedInsights.tsx b/frontend/src/scenes/saved-insights/SavedInsights.tsxindex b9bd217e0a8a..e2f0538676a3 100644--- a/frontend/src/scenes/saved-insights/SavedInsights.tsx+++ b/frontend/src/scenes/saved-insights/SavedInsights.tsx@@ -25,8 +25,6 @@ import {IconRetentionHeatmap,IconHeart,IconHeartFilled,- IconStar,- IconStarFilled,IconStickiness,IconTrends,IconUserPaths,@@ -768,7 +766,6 @@ export function SavedInsights(): JSX.Element {const { currentProjectId } = useValues(projectLogic)const summarizeInsight = useSummarizeInsight()const showHomeTab = useFeatureFlag('PRODUCT_ANALYTICS_HOME_TAB')- const isAIFirst = useFeatureFlag('AI_FIRST')const { tab } = filters@@ -842,15 +839,9 @@ export function SavedInsights(): JSX.Element {onClick={() => updateFavoritedInsight(insight, !insight.favorited)}icon={insight.favorited ? (- isAIFirst ? (- <IconHeartFilled className="text-danger" />- ) : (- <IconStarFilled className="text-warning" />- )- ) : isAIFirst ? (- <IconHeart className="text-secondary" />+ <IconHeartFilled className="text-danger" />) : (- <IconStar className="text-secondary" />+ <IconHeart className="text-secondary" />)}tooltip={`${insight.favorited ? 'Remove from' : 'Add to'} favorite insights`}diff --git a/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsx b/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsxindex 3b37b756b9f8..04ddff12455b 100644--- a/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsx+++ b/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsx@@ -1,11 +1,10 @@import { useActions, useValues } from 'kea'import posthog from 'posthog-js'-import { IconFlag, IconHeart, IconHeartFilled, IconStar, IconStarFilled } from '@posthog/icons'+import { IconFlag, IconHeart, IconHeartFilled } from '@posthog/icons'import { LemonDropdown, ProfilePicture } from '@posthog/lemon-ui'import { TagSelect } from 'lib/components/TagSelect'-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { LemonButton } from 'lib/lemon-ui/LemonButton'import { LemonInput } from 'lib/lemon-ui/LemonInput/LemonInput'import { LemonSelect } from 'lib/lemon-ui/LemonSelect'@@ -32,7 +31,6 @@ export function SavedInsightsFilters({/** When true, inactive filters appear borderless. */borderless?: boolean}): JSX.Element {- const isAIFirst = useFeatureFlag('AI_FIRST')const { search, hideFeatureFlagInsights, favorited, tags, insightType, createdBy } = filtersconst { meFirstMembers, filteredMembers, membersLoading, search: memberSearch } = useValues(membersLogic)const { setSearch: setMemberSearch, ensureAllMembersLoaded } = useActions(membersLogic)@@ -206,16 +204,10 @@ export function SavedInsightsFilters({onClick={() => setFilters({ favorited: !favorited })}size="small"icon={- isAIFirst ? (- favorited ? (- <IconHeartFilled className="text-danger" />- ) : (- <IconHeart className="text-secondary" />- )- ) : favorited ? (- <IconStarFilled className="text-warning" />+ favorited ? (+ <IconHeartFilled className="text-danger" />) : (- <IconStar className="text-secondary" />+ <IconHeart className="text-secondary" />)}>diff --git a/frontend/src/scenes/sceneLogic.tsx b/frontend/src/scenes/sceneLogic.tsxindex 84ac164159b0..77a6c0d67147 100644--- a/frontend/src/scenes/sceneLogic.tsx+++ b/frontend/src/scenes/sceneLogic.tsx@@ -7,7 +7,7 @@ import posthog from 'posthog-js'import { useEffect, useState } from 'react'import api from 'lib/api'-import { FEATURE_FLAGS, TeamMembershipLevel } from 'lib/constants'+import { TeamMembershipLevel } from 'lib/constants'import { trackFileSystemLogView } from 'lib/hooks/useFileSystemLogView'import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'import { Spinner } from 'lib/lemon-ui/Spinner'@@ -1524,26 +1524,6 @@ export const sceneLogic = kea<sceneLogicType>([}}- const isAIFirst = posthog.isFeatureEnabled(FEATURE_FLAGS.AI_FIRST)- if (isAIFirst) {- router.actions.replace(- withForwardedSearchParams(urls.projectHomepage(), searchParams, forwardedRedirectQueryParams)- )- return- }-- const primaryDashboardId = teamLogic.values.currentTeam?.primary_dashboard- if (primaryDashboardId) {- router.actions.replace(- withForwardedSearchParams(- urls.dashboard(primaryDashboardId),- searchParams,- forwardedRedirectQueryParams- )- )- return- }-router.actions.replace(withForwardedSearchParams(urls.projectHomepage(), searchParams, forwardedRedirectQueryParams))diff --git a/frontend/src/scenes/settings/SettingsMap.tsx b/frontend/src/scenes/settings/SettingsMap.tsxindex d29e3f98f296..e39eae169bf0 100644--- a/frontend/src/scenes/settings/SettingsMap.tsx+++ b/frontend/src/scenes/settings/SettingsMap.tsx@@ -1748,7 +1748,6 @@ export const SETTINGS_MAP: SettingSection[] = [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 product.",component: <SidebarAutoSuggestSetting />,- flag: 'AI_FIRST',keywords: ['sidebar', 'suggest', 'products', 'apps', 'auto'],},{diff --git a/playwright/e2e/actions.cy.ts b/playwright/e2e/actions.cy.tsindex 5fdd74743279..241ae8d2d998 100644--- a/playwright/e2e/actions.cy.ts+++ b/playwright/e2e/actions.cy.ts@@ -30,8 +30,7 @@ test.describe('Action Events', () => {await createAction(page, actionName)// Test the action is immediately available- await page.click('[data-attr=nav-menu-insight]')- await page.click('[data-attr="menu-item-insight"]')+ await page.goto('/insights/new')await page.click('text=Add graph series')await page.click('[data-attr=trend-element-subject-1]')diff --git a/playwright/e2e/project-home-page.spec.ts b/playwright/e2e/project-home-page.spec.tsindex ef2196d8f7c8..e2d58ea1b3cf 100644--- a/playwright/e2e/project-home-page.spec.ts+++ b/playwright/e2e/project-home-page.spec.ts@@ -1,12 +1,8 @@import { expect, test } from '../utils/playwright-test-base'test.describe('Project Homepage', () => {- test('Shows home dashboard on load', async ({ page }) => {+ test('Shows AI-first homepage on load', async ({ page }) => {await page.goToMenuItem('projecthomepage')- await expect- .poll(async () => {- return await page.locator('[data-attr=insight-card]').count()- })- .toBeGreaterThan(1)+ await expect(page.locator('[data-attr=homepage-input]')).toBeVisible()})})diff --git a/playwright/page-models/insightPage.ts b/playwright/page-models/insightPage.tsindex 375990be6a92..f83ebcbababb 100644--- a/playwright/page-models/insightPage.ts+++ b/playwright/page-models/insightPage.ts@@ -38,7 +38,7 @@ export class InsightPage {this.editButton = page.getByTestId('insight-edit-button')this.cancelButton = page.getByTestId('insight-cancel-edit-button')this.topBarName = page.getByTestId('scene-name')- this.activeTab = page.getByRole('tab', { selected: true })+ this.activeTab = page.locator('.LemonTabs__tab--active')this.trends = new TrendsInsight(page)this.funnels = new FunnelsInsight(page)@@ -56,7 +56,7 @@ export class InsightPage {async goToNewInsight(type: InsightType): Promise<InsightPage> {await this.page.goto(urls.insightNew({ type }), { waitUntil: 'domcontentloaded' })- await this.page.getByRole('tab', { selected: true }).waitFor({ state: 'visible' })+ await this.activeTab.waitFor({ state: 'visible' })return this}diff --git a/playwright/utils/navigation.ts b/playwright/utils/navigation.tsindex 8f092336b7eb..11fcf0580ace 100644--- a/playwright/utils/navigation.ts+++ b/playwright/utils/navigation.ts@@ -12,6 +12,26 @@ type LowercaseEnum<T> = {* refactoring scenes though. */export type Identifier = LowercaseEnum<typeof Scene>+const IDENTIFIER_URL_FALLBACKS: Record<string, string> = {+ projecthomepage: urls.projectHomepage(),+ activity: urls.activity(),+ datamanagement: urls.eventDefinitions(),+ 'event-definitions': urls.eventDefinitions(),+ annotations: urls.annotations(),+ toolbar: urls.toolbarLaunch(),+ 'sql-editor': urls.sqlEditor(),+ settings: urls.settings(),+ surveys: '/surveys',+ cohorts: '/cohorts',+ dashboards: '/dashboard',+ people: '/persons',+ persons: '/persons',+ action: '/data-management/actions',+ 'product-analytics': '/insights',+ insight: '/insights/new',+ insights: '/insights',+}+export class Navigation {readonly page: Page@@ -24,13 +44,19 @@ export class Navigation {}async openMenuItem(name: string): Promise<void> {- // Use navbar-specific selector for items that have duplicates in LemonTree- const navbarSelector = this.page.getByTestId(`navbar-${name}`)- const menuSelector = this.page.getByTestId(`menu-item-${name}`)-- // Prefer navbar selector if it exists, fall back to menu-item- const element = (await navbarSelector.count()) > 0 ? navbarSelector : menuSelector- await element.click()+ // The legacy PanelLayoutNavBar exposed every scene as `menu-item-<name>` /+ // `navbar-<name>`. The AI-first navbar only renders a few `nav-item-*` test-ids+ // (and only when the parent collapsible section is expanded), so for known scenes+ // we navigate by URL — that's the most reliable cross-layout behavior.+ if (IDENTIFIER_URL_FALLBACKS[name]) {+ await this.page.goto(IDENTIFIER_URL_FALLBACKS[name])+ } else {+ // Fall back to legacy selectors for scenes we haven't mapped yet.+ const navbarSelector = this.page.getByTestId(`navbar-${name}`)+ const menuSelector = this.page.getByTestId(`menu-item-${name}`)+ const element = (await navbarSelector.count()) > 0 ? navbarSelector : menuSelector+ await element.click()+ }// Wait for navigation to complete and page to be readyawait this.page.waitForLoadState('domcontentloaded')// Additional wait with timeout for network to settle (catches lazy-loaded components)diff --git a/posthog/management/commands/sync_feature_flags.py b/posthog/management/commands/sync_feature_flags.pyindex 1e45f982bd86..ebbab97765b6 100644--- a/posthog/management/commands/sync_feature_flags.py+++ b/posthog/management/commands/sync_feature_flags.py@@ -26,7 +26,6 @@ INACTIVE_FLAGS = ["insight-horizontal-controls","flagged-feature-indicator","ai-only-mode",- "ai-first",]