"use client"; import { ReactNode, useState, useMemo } from "react"; import { usePathname } from "next/navigation"; import { LeftRail } from "./left-rail"; import { RightPanel } from "./right-panel"; interface AppShellProps { children: ReactNode; workspace: string; projectId: string; projectName?: string; } export function AppShell({ children, workspace, projectId, projectName }: AppShellProps) { const pathname = usePathname(); const [activeSection, setActiveSection] = useState("home"); // Derive active section from pathname const derivedSection = useMemo(() => { if (pathname.includes('/overview')) return 'home'; if (pathname.includes('/design')) return 'design'; return activeSection; }, [pathname, activeSection]); const displayProjectName = projectName || "Product"; return (
{/* Left Rail - App Navigation */} {/* Main Content Area */}
{children}
{/* Right Panel - Activity & AI Chat */}
); }