+ {/* Mobile: stacked, with a Sheet drawer for folders. */}
+
+
+ {contentPane}
+
+
+ {/* Desktop (sm+): resizable two-pane split. autoSaveId persists the
+ * user's chosen split width to localStorage so it survives reloads.
+ * Min/max defends against the user collapsing the sidebar to zero
+ * width or starving the content pane. */}
+
+
+
+
+
+
+
{contentPane}
+
+
);
}
diff --git a/src/components/documents/folder-tree-sidebar.tsx b/src/components/documents/folder-tree-sidebar.tsx
index a23d9382..f2bc1015 100644
--- a/src/components/documents/folder-tree-sidebar.tsx
+++ b/src/components/documents/folder-tree-sidebar.tsx
@@ -18,17 +18,11 @@ interface FolderTreeSidebarProps {
}
/**
- * Collapsed-by-default tree. Each row shows a chevron that toggles its
- * children; clicking the row label selects the folder. The "All
- * documents" + "Root" pseudo-rows at the top let reps filter to the
- * full set or to docs without a folder.
+ * Mobile-only Sheet trigger that opens the folder tree in a drawer.
*
- * Designed for unlimited depth — only the top level renders by default
- * so deep trees don't blow out the page; reps drill in by expanding.
- *
- * On mobile (< sm) the sidebar collapses into a Sheet drawer triggered by
- * a "Show folders" button so the main listing isn't pushed below a
- * full-width folder stack.
+ * Desktop rendering lives in `documents-hub.tsx` as one panel of a
+ * `` so power users on wide monitors can drag the
+ * split. Both surfaces render the same `` underneath.
*/
export function FolderTreeSidebar({ selectedFolderId, onSelect, footer }: FolderTreeSidebarProps) {
const [mobileOpen, setMobileOpen] = useState(false);
@@ -39,43 +33,32 @@ export function FolderTreeSidebar({ selectedFolderId, onSelect, footer }: Folder
};
return (
- <>
- {/* Mobile-only trigger that opens the drawer; hidden at sm+. */}
-
-
-
-
-
-
-
- Folders
-
-
-
-
-
-
-
-
- {/* Desktop sidebar: hidden on mobile (the Sheet trigger replaces it). */}
-
- >
+