import { useEffect, useState } from "react"; import { Outlet, useLocation } from "react-router-dom"; import { Sidebar } from "./Sidebar"; import { TopBar } from "./TopBar"; import { FloatingQAChat } from "@/components/ai-steward/FloatingQAChat"; import { MobileProjectBottomNav, PMFlowOsHeader, ResponsiveAICopilot } from "@/features/pmflow-os/components/PMFlowOsFrame"; export default function Layout() { const location = useLocation(); const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false); const isProjectLaunchSurface = location.pathname === "/project-launch"; const isPMFlowOsSurface = [ "/command-center", "/structured-extraction", "/change-review", "/memory-writeback-result", "/work-graph", "/execution-bridge", "/release-growth", "/team-layer", "/project-memory", ].includes(location.pathname); useEffect(() => { setMobileSidebarOpen(false); window.scrollTo({ top: 0, left: 0, behavior: "auto" }); const main = document.querySelector("main"); if (main instanceof HTMLElement) { main.scrollTop = 0; } }, [location.pathname, location.search]); return (