From e5f7e87f42bb1cb1a1f7157130fcee8be4910aa1 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Sat, 31 Jan 2026 23:33:20 +0530 Subject: [PATCH] refactor: update sidebar layout for shared and private chats to optimize space usage --- .../components/layout/ui/sidebar/Sidebar.tsx | 11 ++++++----- .../layout/ui/sidebar/SidebarSection.tsx | 18 +++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx index 070462341..db04bf6dc 100644 --- a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx @@ -125,11 +125,12 @@ export function Sidebar({
) : (
- {/* Shared Chats Section - takes half the space */} + {/* Shared Chats Section - takes only space needed, max 50% */} @@ -151,9 +152,9 @@ export function Sidebar({ } > {sharedChats.length > 0 ? ( -
+
4 ? "pb-8" : ""}`} + className={`flex flex-col gap-0.5 max-h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent ${sharedChats.length > 4 ? "pb-8" : ""}`} > {sharedChats.slice(0, 20).map((chat) => ( - {/* Private Chats Section - takes half the space */} + {/* Private Chats Section - fills remaining space */}
@@ -56,15 +56,15 @@ export function SidebarSection({ )}
- +
-
- {children} -
- + {children} +
+
); }