diff --git a/surfsense_web/components/layout/ui/shell/LayoutShell.tsx b/surfsense_web/components/layout/ui/shell/LayoutShell.tsx index 138e1c74b..c9bbe8efc 100644 --- a/surfsense_web/components/layout/ui/shell/LayoutShell.tsx +++ b/surfsense_web/components/layout/ui/shell/LayoutShell.tsx @@ -352,6 +352,9 @@ export function LayoutShell({ onPlaygroundItemClick={ playgroundSidebar ? handlePlaygroundSidebarToggle : undefined } + isPlaygroundSidebarOpen={ + playgroundSidebar ? !isPlaygroundSidebarCollapsed : undefined + } chats={chats} activeChatId={activeChatId} onNewChat={onNewChat} diff --git a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx index 4f867aa72..7862ae90e 100644 --- a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx @@ -53,6 +53,7 @@ interface SidebarProps { navItems: NavItem[]; onNavItemClick?: (item: NavItem) => void; onPlaygroundItemClick?: (item: NavItem) => void; + isPlaygroundSidebarOpen?: boolean; chats: ChatItem[]; activeChatId?: number | null; onNewChat: () => void; @@ -91,6 +92,7 @@ export function Sidebar({ navItems, onNavItemClick, onPlaygroundItemClick, + isPlaygroundSidebarOpen, chats, activeChatId, onNewChat, @@ -246,7 +248,7 @@ export function Sidebar({ label={playgroundItem.title} onClick={() => (onPlaygroundItemClick ?? onNavItemClick)?.(playgroundItem)} isCollapsed={isCollapsed} - isActive={playgroundItem.isActive} + isActive={isPlaygroundSidebarOpen ?? playgroundItem.isActive} badge={New} tooltipContent={isCollapsed ? playgroundItem.title : undefined} />