diff --git a/src/ui/src/components/DocList.tsx b/src/ui/src/components/DocList.tsx index 9d3a91f..ae97cbc 100644 --- a/src/ui/src/components/DocList.tsx +++ b/src/ui/src/components/DocList.tsx @@ -422,6 +422,12 @@ export function DocList() { return n; }); + // Collapse/expand every section at once. allCollapsed reflects current state so + // the single button flips its action and label. + const allCollapsed = sections.length > 0 && sections.every((s) => collapsedSections.has(s.label)); + const collapseAll = () => setCollapsedSections(new Set(sections.map((s) => s.label))); + const expandAll = () => setCollapsedSections(new Set()); + const selectStyle: React.CSSProperties = { width: 'auto' }; return ( @@ -573,6 +579,16 @@ export function DocList() { )) )} + {!search && sections.length > 0 && ( + + )} {/* List */}