{searchSpaces.map((space) => (
diff --git a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
index a55909ab2..540a3dcc1 100644
--- a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
+++ b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
@@ -134,11 +134,16 @@ export function Sidebar({
const t = useTranslations("sidebar");
const [openDropdownChatId, setOpenDropdownChatId] = useState(null);
- // Inbox is rendered explicitly right below New Chat. Pull it out of the
- // nav items list so it doesn't also appear in the bottom NavSection.
+ // Inbox and Documents are rendered explicitly right below New Chat. Pull
+ // them out of the nav items list so they don't also appear in the bottom
+ // NavSection. Documents is only present in navItems on mobile.
const inboxItem = useMemo(() => navItems.find((item) => item.url === "#inbox"), [navItems]);
+ const documentsItem = useMemo(
+ () => navItems.find((item) => item.url === "#documents"),
+ [navItems]
+ );
const footerNavItems = useMemo(
- () => navItems.filter((item) => item.url !== "#inbox"),
+ () => navItems.filter((item) => item.url !== "#inbox" && item.url !== "#documents"),
[navItems]
);
@@ -202,6 +207,16 @@ export function Sidebar({
}
/>
)}
+ {documentsItem && (
+ onNavItemClick?.(documentsItem)}
+ isCollapsed={isCollapsed}
+ isActive={documentsItem.isActive}
+ tooltipContent={isCollapsed ? documentsItem.title : undefined}
+ />
+ )}
{/* Chat sections - fills available space */}