diff --git a/surfsense_web/components/sidebar/AppSidebarProvider.tsx b/surfsense_web/components/sidebar/AppSidebarProvider.tsx index ca05b0e3f..a90845673 100644 --- a/surfsense_web/components/sidebar/AppSidebarProvider.tsx +++ b/surfsense_web/components/sidebar/AppSidebarProvider.tsx @@ -57,7 +57,7 @@ export function AppSidebarProvider({ useAtom(deleteChatMutationAtom); useEffect(() => { - setChatsQueryParams((prev) => ({ ...prev, search_space_id: searchSpaceId, skip: 0, limit: 5 })); + setChatsQueryParams((prev) => ({ ...prev, search_space_id: searchSpaceId, skip: 0, limit: 4 })); }, [searchSpaceId]); const { @@ -84,7 +84,7 @@ export function AppSidebarProvider({ queryFn: () => notesApiService.getNotes({ search_space_id: Number(searchSpaceId), - page_size: 5, // Get 5 notes (changed from 10) + page_size: 4, // Get 4 notes for compact sidebar }), enabled: !!searchSpaceId, }); @@ -196,8 +196,8 @@ export function AppSidebarProvider({ return dateB - dateA; // Descending order (most recent first) }); - // Limit to 5 notes - return sortedNotes.slice(0, 5).map((note) => ({ + // Limit to 4 notes for compact sidebar + return sortedNotes.slice(0, 4).map((note) => ({ name: note.title, url: `/dashboard/${note.search_space_id}/editor/${note.id}`, icon: "FileText", diff --git a/surfsense_web/components/sidebar/app-sidebar.tsx b/surfsense_web/components/sidebar/app-sidebar.tsx index 78864da2d..d4a127a66 100644 --- a/surfsense_web/components/sidebar/app-sidebar.tsx +++ b/surfsense_web/components/sidebar/app-sidebar.tsx @@ -443,24 +443,20 @@ export const AppSidebar = memo(function AppSidebar({ - - + + -
- -
+ -
- -
-
+ +
{pageUsage && ( diff --git a/surfsense_web/components/ui/sidebar.tsx b/surfsense_web/components/ui/sidebar.tsx index 3170148eb..edc846ba7 100644 --- a/surfsense_web/components/ui/sidebar.tsx +++ b/surfsense_web/components/ui/sidebar.tsx @@ -352,7 +352,7 @@ function SidebarContent({ className, ...props }: React.ComponentProps<"div">) { data-slot="sidebar-content" data-sidebar="content" className={cn( - "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", + "flex min-h-0 flex-1 flex-col gap-2 overflow-hidden group-data-[collapsible=icon]:overflow-hidden", className )} {...props} @@ -365,7 +365,7 @@ function SidebarGroup({ className, ...props }: React.ComponentProps<"div">) {
);