import AppHeader, { type Crumb } from "./AppHeader"; import AppRail from "./AppRail"; export type { Crumb }; // --------------------------------------------------------------------------- // The shell: the rail (fixed, left) and the page head, rendered as the FIRST // children of a page's own `flex h-full flex-col` column -- the shape every // page here already has. The rail is out of flow and the body pads for it // (app/globals.css, `body:has(.app-rail)`), so no page changes shape to get it. // // On a phone (below md) the rail is not drawn: the PHONE DOCK at the foot of // the screen carries the places (PhoneDock.tsx, rendered by AppRail), and the // head becomes the place bar and a title in flow (AppHeader). // // `rail="collapsed"` is a bench (canvas "Clip bench"): no rail, a compact head // whose mark links home, and the whole width for the work. // // SERVER ONLY (the rail reads the cookie and the job registries). A client page // renders from its server page and itself. // --------------------------------------------------------------------------- export default function AppShell({ active, crumbs, note, actions, meta, below, sheet, rail = "open", }: { /** The rail entry that is lit. */ active: string; crumbs: Crumb[]; note?: React.ReactNode; actions?: React.ReactNode; meta?: React.ReactNode; /** A full-width row at the foot of the head (a piece's stage stepper). */ below?: React.ReactNode; /** Page actions on a phone only, in the ⋯ sheet (AppHeader). */ sheet?: React.ReactNode; rail?: "open" | "collapsed"; }) { return ( <> {rail === "open" && } ); }