Adds mission control UI with human gate actions via tRPC, kanban columns from
the shared lifecycle enum, and gate co-pilot using resolveModel('gate-copilot').
Co-authored-by: Cursor <cursoragent@cursor.com>
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
import type { ConvoyStatus } from "./schemas";
|
|
|
|
export type KanbanColumn = {
|
|
status: ConvoyStatus;
|
|
label: string;
|
|
};
|
|
|
|
/** Kanban columns for mission control (Epic 5). */
|
|
export const MISSION_CONTROL_KANBAN_COLUMNS: KanbanColumn[] = [
|
|
{ status: "draft", label: "Planning" },
|
|
{ status: "convoy_review", label: "Awaiting plan approval" },
|
|
{ status: "ready", label: "Ready to build" },
|
|
{ status: "in_progress", label: "Building" },
|
|
{ status: "pr_review", label: "Awaiting merge" },
|
|
{ status: "merged", label: "Awaiting prod" },
|
|
{ status: "released", label: "Done" },
|
|
{ status: "blocked", label: "Blocked" },
|
|
];
|
|
|
|
/** Statuses surfaced in the human gate inbox. */
|
|
export const GATE_INBOX_STATUSES: ConvoyStatus[] = [
|
|
"convoy_review",
|
|
"pr_review",
|
|
"merged",
|
|
];
|
|
|
|
export function gateLabelForStatus(status: ConvoyStatus): string | null {
|
|
switch (status) {
|
|
case "convoy_review":
|
|
return "Gate 1 — Plan approval";
|
|
case "pr_review":
|
|
return "Gate 2 — PR merge";
|
|
case "merged":
|
|
return "Gate 3 — Prod promote";
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
|
|
export function humanGateActorForStatus(status: ConvoyStatus): string | null {
|
|
switch (status) {
|
|
case "convoy_review":
|
|
return "human-gate-1";
|
|
case "pr_review":
|
|
return "human-gate-2";
|
|
case "merged":
|
|
return "human-gate-3";
|
|
default:
|
|
return null;
|
|
}
|
|
}
|