diff --git a/components/frontend/src/app/projects/[name]/page.tsx b/components/frontend/src/app/projects/[name]/page.tsx index 5194df718..c64690f8d 100644 --- a/components/frontend/src/app/projects/[name]/page.tsx +++ b/components/frontend/src/app/projects/[name]/page.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { useParams, useSearchParams } from 'next/navigation'; -import { Star, Settings, Users, Loader2 } from 'lucide-react'; +import { Star, Settings, Users, Loader2, ChevronLeft, ChevronRight } from 'lucide-react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; @@ -10,6 +10,11 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; import { PageHeader } from '@/components/page-header'; import { Breadcrumbs } from '@/components/breadcrumbs'; +import { + ResizablePanelGroup, + ResizablePanel, + ResizableHandle, +} from "@/components/ui/resizable"; import { SessionsSection } from '@/components/workspace-sections/sessions-section'; import { SharingSection } from '@/components/workspace-sections/sharing-section'; @@ -22,14 +27,26 @@ export default function ProjectDetailsPage() { const params = useParams(); const searchParams = useSearchParams(); const projectName = params?.name as string; - + // Fetch project data for display name and description const { data: project, isLoading: projectLoading } = useProject(projectName); - + // Initialize active section from query parameter or default to 'sessions' const initialSection = (searchParams.get('section') as Section) || 'sessions'; const [activeSection, setActiveSection] = useState
(initialSection); + // Left panel visibility state (persisted to localStorage) + const [leftPanelVisible, setLeftPanelVisible] = useState(() => { + if (typeof window === 'undefined') return true; + const saved = localStorage.getItem('workspace-left-panel-visible'); + return saved === null ? true : saved === 'true'; + }); + + // Persist left panel visibility + useEffect(() => { + localStorage.setItem('workspace-left-panel-visible', String(leftPanelVisible)); + }, [leftPanelVisible]); + // Update active section when query parameter changes useEffect(() => { const sectionParam = searchParams.get('section') as Section; @@ -87,40 +104,94 @@ export default function ProjectDetailsPage() { {/* Divider */}
- {/* Content */} -
- {/* Sidebar Navigation */} - - - {/* Main Content */} - {activeSection === 'sessions' && } - {activeSection === 'sharing' && } - {activeSection === 'settings' && } +
+ + + + + )} + + +
+ {/* Main Content */} + {activeSection === 'sessions' && } + {activeSection === 'sharing' && } + {activeSection === 'settings' && } +
+
+