Files
archie/ui/src/tasks/status-pill.ts
T
sam 5418fc6512 feat(webui): task detail with a parked banner and a right rail
Header: breadcrumb, title, status pill, workflow and forge links, with
Start a new run as the page's one action; a parked task opens with its
park reason in an amber banner. The log/changes/configuration/debug tabs
take the main column; a right rail lists every attempt with its outcome
(replacing the pager inside the stage rail), the selected attempt's
stages, and the task's details.
2026-09-25 16:28:38 +10:00

11 lines
458 B
TypeScript

/** How a lifecycle status kind (from task-meta) reads as a status pill. */
export function pillFor(kind: string): {
tone: "neutral" | "warn" | "danger";
dot: "live" | "warn" | "danger" | "idle";
} {
if (kind === "danger") return { tone: "danger", dot: "danger" };
if (kind === "warn") return { tone: "warn", dot: "warn" };
if (kind === "ok" || kind === "info") return { tone: "neutral", dot: "live" };
return { tone: "neutral", dot: "idle" };
}