"use client"; import * as React from "react"; import Link from "next/link"; import { ChevronLeft, Menu } from "lucide-react"; import { useApp } from "@/components/app/store"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; /** * Compact 48 px page bar shared by Projects / Library / Prompts. * Phone: hamburger (opens the drawer) or a back link; title truncates; actions on the right (icon buttons). * Desktop: same bar, so pages keep a stable top edge across the workspace. */ export function WorkspacePageHeader({ title, subtitle, back, actions, leading, className }: { title: React.ReactNode; subtitle?: React.ReactNode; back?: string; actions?: React.ReactNode; leading?: React.ReactNode; className?: string }) { const { setSidebarOpen } = useApp(); return (
{back ? ( ) : ( )} {leading}

{title}

{subtitle ?

{subtitle}

: null}
{actions ?
{actions}
: null}
); } /** Scrollable page body under the header (the document never scrolls). */ export function WorkspacePageBody({ children, className, width = "max-w-5xl" }: { children: React.ReactNode; className?: string; width?: string }) { return (
{children}
); }