Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions LifeOS/install/LIFEOS/PULSE/Observability/src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,28 @@ export default function DocsLayout({ children }: { children: React.ReactNode })

const docsTree = data?.tree ? filterDocsTree(data.tree) : [];

const openSearch = () => openPalette("wiki");

return (
<div className="flex h-[calc(100vh-3.5rem)]">
<WikiSidebar tree={docsTree} onSearchClick={() => openPalette("wiki")} />
<div className="flex-1 overflow-hidden">{children}</div>
<div className="flex h-[calc(100vh-3.5rem)] min-w-0 flex-col lg:flex-row">
<div className="lg:hidden px-3 pt-3">
<details className="glass rounded-2xl">
<summary className="cursor-pointer list-none px-4 py-3 text-xs text-ink-2">
Documentation navigation
</summary>
<WikiSidebar
tree={docsTree}
onSearchClick={openSearch}
className="w-auto max-h-[60vh] m-3"
/>
</details>
</div>
<WikiSidebar
tree={docsTree}
onSearchClick={openSearch}
className="hidden lg:flex"
/>
<div className="min-w-0 flex-1 overflow-hidden">{children}</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ interface TreeNode {
interface WikiSidebarProps {
tree: TreeNode[];
onSearchClick: () => void;
className?: string;
}

const CATEGORY_ICONS: Record<string, typeof BookOpen> = {
Expand Down Expand Up @@ -186,9 +187,9 @@ function TreeItem({ node, depth = 0 }: { node: TreeNode; depth?: number }) {
);
}

export default function WikiSidebar({ tree, onSearchClick }: WikiSidebarProps) {
export default function WikiSidebar({ tree, onSearchClick, className }: WikiSidebarProps) {
return (
<aside className="w-64 shrink-0 border-r border-line-1 bg-surface-1 overflow-y-auto h-[calc(100vh-3.5rem)]">
<aside className={cn("w-64 shrink-0 border-r border-line-1 bg-surface-1 overflow-y-auto h-[calc(100vh-3.5rem)]", className)}>
{/* Search trigger */}
<div className="p-3 border-b border-line-1">
<button
Expand Down