diff --git a/surfsense_web/components/assistant-ui/thread.tsx b/surfsense_web/components/assistant-ui/thread.tsx index da23553f8..b3aff3e2d 100644 --- a/surfsense_web/components/assistant-ui/thread.tsx +++ b/surfsense_web/components/assistant-ui/thread.tsx @@ -73,6 +73,7 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, + DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import type { Document } from "@/contracts/types/document.types"; @@ -559,6 +560,7 @@ const ComposerAction: FC = ({ isBlockedByOtherUser = false Manage Documents )} + { setAddMenuOpen(false); diff --git a/surfsense_web/components/layout/providers/LayoutDataProvider.tsx b/surfsense_web/components/layout/providers/LayoutDataProvider.tsx index d6d4ed6e0..9d3ecdf92 100644 --- a/surfsense_web/components/layout/providers/LayoutDataProvider.tsx +++ b/surfsense_web/components/layout/providers/LayoutDataProvider.tsx @@ -117,7 +117,6 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid // Inbox sidebar state const [isInboxSidebarOpen, setIsInboxSidebarOpen] = useState(false); - const [isInboxDocked, setIsInboxDocked] = useState(false); // Documents sidebar state (shared atom so Composer can toggle it) const [isDocumentsSidebarOpen, setIsDocumentsSidebarOpen] = useAtom(documentsSidebarOpenAtom); @@ -432,7 +431,6 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid if (!prev) { setIsAllSharedChatsSidebarOpen(false); setIsAllPrivateChatsSidebarOpen(false); - setIsDocumentsSidebarOpen(false); setIsAnnouncementsSidebarOpen(false); } return !prev; @@ -457,7 +455,6 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid setIsInboxSidebarOpen(false); setIsAllSharedChatsSidebarOpen(false); setIsAllPrivateChatsSidebarOpen(false); - setIsDocumentsSidebarOpen(false); } return !prev; }); @@ -562,17 +559,15 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid setIsAllSharedChatsSidebarOpen(true); setIsAllPrivateChatsSidebarOpen(false); setIsInboxSidebarOpen(false); - setIsDocumentsSidebarOpen(false); setIsAnnouncementsSidebarOpen(false); - }, [setIsDocumentsSidebarOpen]); + }, []); const handleViewAllPrivateChats = useCallback(() => { setIsAllPrivateChatsSidebarOpen(true); setIsAllSharedChatsSidebarOpen(false); setIsInboxSidebarOpen(false); - setIsDocumentsSidebarOpen(false); setIsAnnouncementsSidebarOpen(false); - }, [setIsDocumentsSidebarOpen]); + }, []); // Delete handlers const confirmDeleteChat = useCallback(async () => { @@ -701,9 +696,7 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid markAsRead: statusInbox.markAsRead, markAllAsRead: statusInbox.markAllAsRead, }, - isDocked: isInboxDocked, - onDockedChange: setIsInboxDocked, - }} + }} announcementsPanel={{ open: isAnnouncementsSidebarOpen, onOpenChange: setIsAnnouncementsSidebarOpen, diff --git a/surfsense_web/components/layout/ui/shell/LayoutShell.tsx b/surfsense_web/components/layout/ui/shell/LayoutShell.tsx index 64acc2a0f..5bfbcfee0 100644 --- a/surfsense_web/components/layout/ui/shell/LayoutShell.tsx +++ b/surfsense_web/components/layout/ui/shell/LayoutShell.tsx @@ -40,8 +40,6 @@ interface InboxProps { totalUnreadCount: number; comments: TabDataSource; status: TabDataSource; - isDocked?: boolean; - onDockedChange?: (docked: boolean) => void; } interface LayoutShellProps { @@ -308,19 +306,6 @@ export function LayoutShell({ isResizing={isResizing} /> - {/* Docked Inbox Sidebar - renders as flex sibling between sidebar and content */} - {inbox?.isDocked && ( - - )} - {/* Docked Documents Sidebar - renders as flex sibling between sidebar and content */} {documentsPanel?.isDocked && ( - {/* Floating Inbox Sidebar - positioned absolutely on top of content */} - {inbox && !inbox.isDocked && ( + {/* Inbox Sidebar - slide-out panel */} + {inbox && ( )} diff --git a/surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx b/surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx index 7c57fdef1..209f6662b 100644 --- a/surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx @@ -10,7 +10,6 @@ import { CheckCheck, CheckCircle2, ChevronLeft, - ChevronRight, History, Inbox, LayoutGrid, @@ -148,8 +147,6 @@ interface InboxSidebarProps { status: TabDataSource; totalUnreadCount: number; onCloseMobileSidebar?: () => void; - isDocked?: boolean; - onDockedChange?: (docked: boolean) => void; } export function InboxSidebar({ @@ -159,8 +156,6 @@ export function InboxSidebar({ status, totalUnreadCount, onCloseMobileSidebar, - isDocked = false, - onDockedChange, }: InboxSidebarProps) { const t = useTranslations("sidebar"); const router = useRouter(); @@ -821,35 +816,6 @@ export function InboxSidebar({ )} - {!isMobile && onDockedChange && ( - - - - - - {isDocked ? "Collapse panel" : "Expand panel"} - - - )} @@ -1092,17 +1058,6 @@ export function InboxSidebar({ ); - if (isDocked && open && !isMobile) { - return ( - - ); - } - return ( {inboxContent}