The two review tabs, runs and try-out, are one: /review. It is a column of three sections: try a classification and the classifier settings, each a folded bar (the settings' bar says what they are now), then the recent runs, always open. The settings had been pinned under the try-out form; they are now a section of their own. A new Disclosure primitive is the folding bar, a native details wearing the Panel's classes, so the folded and open sections read as the same surface. /review-runs and /review-tryout are gone, with no redirect.
30 lines
1.5 KiB
TypeScript
30 lines
1.5 KiB
TypeScript
// 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);
|
|
}
|