From 345c32edb8977a6477b3ec60e9112d1bc31ae1af Mon Sep 17 00:00:00 2001 From: Zane <75694352+zanesq@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:59:17 -0800 Subject: [PATCH] add collapsable chat nav (#6649) --- .../components/GooseSidebar/AppSidebar.tsx | 97 ++++++++++++------- 1 file changed, 62 insertions(+), 35 deletions(-) diff --git a/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx b/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx index 123db12a..204c2924 100644 --- a/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx +++ b/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx @@ -3,6 +3,7 @@ import React, { useEffect, useState } from 'react'; import { AppWindow, ChefHat, + ChevronRight, Clock, FileText, History, @@ -20,6 +21,7 @@ import { SidebarMenuItem, SidebarSeparator, } from '../ui/sidebar'; +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible'; import { Gear } from '../icons'; import { View, ViewOptions } from '../../utils/navigationUtils'; import { DEFAULT_CHAT_TITLE, useChatContext } from '../../contexts/ChatContext'; @@ -203,6 +205,7 @@ const AppSidebar: React.FC = ({ currentPath }) => { ?.enabled; const [searchParams] = useSearchParams(); const [recentSessions, setRecentSessions] = useState([]); + const [isChatExpanded, setIsChatExpanded] = useState(true); const activeSessionId = searchParams.get('resumeSessionId') ?? undefined; const { getSessionStatus, clearUnread } = useSidebarSessionStatus(activeSessionId); @@ -477,7 +480,7 @@ const AppSidebar: React.FC = ({ currentPath }) => { <> - {/* Home and New Chat */} + {/* Home */}
@@ -494,43 +497,67 @@ const AppSidebar: React.FC = ({ currentPath }) => {
-
- - - - Chat - - -
- {/* Recent Sessions */} - {recentSessions.length > 0 && ( - - - - {/* View All Link */} - - - - )} + {/* Chat with Collapsible Sessions */} + + + +
+ +
+ + + Chat + + {recentSessions.length > 0 && ( + + + + )} +
+
+
+ {recentSessions.length > 0 && ( + +
+ + {/* View All Link */} + +
+
+ )} +
+
+