@@ -9,10 +9,10 @@ import { useCommandCenterStore } from "@posthog/ui/features/command-center/comma
99import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFlag" ;
1010import { useInboxAllReports } from "@posthog/ui/features/inbox/hooks/useInboxAllReports" ;
1111import {
12+ CUSTOMIZABLE_NAV_ITEM_IDS ,
13+ CUSTOMIZABLE_NAV_ITEMS ,
14+ type CustomizableNavItemId ,
1215 isNavItemVisible ,
13- MORE_NAV_ITEM_IDS ,
14- MORE_NAV_ITEMS ,
15- type MoreNavItemId ,
1616} from "@posthog/ui/features/sidebar/constants" ;
1717import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore" ;
1818import { useTasks } from "@posthog/ui/features/tasks/useTasks" ;
@@ -163,8 +163,10 @@ export function SidebarNavSection({
163163 } ;
164164
165165 const navItemOverrides = useSidebarStore ( ( s ) => s . navItemOverrides ) ;
166- const hidden = new Set < MoreNavItemId > (
167- MORE_NAV_ITEM_IDS . filter ( ( id ) => ! isNavItemVisible ( navItemOverrides , id ) ) ,
166+ const hidden = new Set < CustomizableNavItemId > (
167+ CUSTOMIZABLE_NAV_ITEM_IDS . filter (
168+ ( id ) => ! isNavItemVisible ( navItemOverrides , id ) ,
169+ ) ,
168170 ) ;
169171 const [ moreExpanded , setMoreExpanded ] = useState ( false ) ;
170172 const [ customizeOpen , setCustomizeOpen ] = useState ( false ) ;
@@ -175,8 +177,9 @@ export function SidebarNavSection({
175177 // More row so the current page stays visible in the nav. Search, Usage and
176178 // Contexts never take over: Search opens the command menu in place, Usage
177179 // leaves for the settings chrome and Contexts is a toggle, not a page.
178- const moreItemActive : Record < MoreNavItemId , boolean > = {
180+ const moreItemActive : Record < CustomizableNavItemId , boolean > = {
179181 search : false ,
182+ inbox : isInboxActive ,
180183 agents : isAgentsActive ,
181184 skills : isSkillsActive ,
182185 "mcp-servers" : isMcpServersActive ,
@@ -185,7 +188,7 @@ export function SidebarNavSection({
185188 contexts : false ,
186189 activity : isActivityActive ,
187190 } ;
188- const activeHiddenItem = MORE_NAV_ITEMS . find (
191+ const activeHiddenItem = CUSTOMIZABLE_NAV_ITEMS . find (
189192 ( { id } ) => hidden . has ( id ) && moreItemActive [ id ] ,
190193 ) ;
191194 const takeoverLabel =
@@ -253,13 +256,15 @@ export function SidebarNavSection({
253256 </ Box >
254257 ) }
255258
256- < Box >
257- < InboxItem
258- isActive = { isInboxActive }
259- onClick = { withNavTrack ( "inbox" , navigateToInbox ) }
260- pullRequestCount = { inboxPullRequestCount }
261- />
262- </ Box >
259+ { ! hidden . has ( "inbox" ) && (
260+ < Box >
261+ < InboxItem
262+ isActive = { isInboxActive }
263+ onClick = { withNavTrack ( "inbox" , navigateToInbox ) }
264+ pullRequestCount = { inboxPullRequestCount }
265+ />
266+ </ Box >
267+ ) }
263268
264269 { ! hidden . has ( "agents" ) && (
265270 < Box >
@@ -343,6 +348,14 @@ export function SidebarNavSection({
343348 onClick = { withNavTrack ( "search" , openCommandMenu , true ) }
344349 />
345350 ) }
351+ { hidden . has ( "inbox" ) && (
352+ < InboxItem
353+ depth = { 1 }
354+ isActive = { isInboxActive }
355+ onClick = { withNavTrack ( "inbox" , navigateToInbox , true ) }
356+ pullRequestCount = { inboxPullRequestCount }
357+ />
358+ ) }
346359 { hidden . has ( "agents" ) && (
347360 < AgentsItem
348361 depth = { 1 }
0 commit comments