// Which layout a route gets inside the shell: the readable-width cap, the // wide body, or full-bleed. Kept apart from `Shell.tsx` so it is plain // functions of a path, with no DOM or CSS behind it, and can be tested. // Routes that opt out of `.shell-body`'s 60em readable-line-length cap // — mara screenshotted the issue report's 8-column table getting // clipped; that width is deliberate for the rest of the UI's cards/ // forms, but too narrow for a wide table. `.shell-body-wide` (Shell.css) is a // modifier alongside the base class, not a replacement, so every other // route's layout is untouched. `/agents` joined for the same reason — // its own table view (plus the list+detail split) hits the same cap. const WIDE_BODY_ROUTES = new Set(["/issues", "/agents", "/review"]); // `/agents/:name/terminal` (and a subagent's, under // `/agents/:name/subagents/:subagent/`) is full-bleed: the terminal fills // the whole viewport below the header bar, edge to edge (`shell-full` / // `shell-body-full` in Shell.css). It can't join the `Set` above — it's a // parameterized path, one literal string can't match every agent name. const FULL_BLEED_ROUTE_PATTERN = /^\/agents\/[^/]+(\/subagents\/[^/]+)?\/terminal$/; // The start page (`/`) is full-bleed too: its rain backdrop fills the whole // body below the header. export function isFullBleedRoute(location: string): boolean { return location === "/" || FULL_BLEED_ROUTE_PATTERN.test(location); } export function isWideBodyRoute(location: string): boolean { return WIDE_BODY_ROUTES.has(location); }