export type OrchestratorStepType = | "planning" | "replanning" | "plan-orders" | "pr" | "pr-update" | "cleanup" | "verification"; export type OrchestratorStepStatus = "running" | "completed" | "failed" | "pending"; export interface OrchestratorStepNodeProps { type: OrchestratorStepType; taskId: string; status: OrchestratorStepStatus; label: string; hasQuestions?: boolean; } const TYPE_COLORS: Record< OrchestratorStepType, { accent: string; bg: string; border: string; text: string; dot: string } > = { planning: { accent: "#75aafc", bg: "bg-[#0d1a30]", border: "border-[#75aafc]", text: "text-[#75aafc]", dot: "bg-[#75aafc]", }, replanning: { accent: "#75aafc", bg: "bg-[#0d1a30]", border: "border-[#75aafc]", text: "text-[#75aafc]", dot: "bg-[#75aafc]", }, "plan-orders": { accent: "#c084fc", bg: "bg-[#1a0d30]", border: "border-[#c084fc]", text: "text-[#c084fc]", dot: "bg-[#c084fc]", }, pr: { accent: "#34d399", bg: "bg-[#0a1a14]", border: "border-[#34d399]", text: "text-[#34d399]", dot: "bg-[#34d399]", }, "pr-update": { accent: "#34d399", bg: "bg-[#0a1a14]", border: "border-[#34d399]", text: "text-[#34d399]", dot: "bg-[#34d399]", }, cleanup: { accent: "#7788aa", bg: "bg-[#141a24]", border: "border-[#7788aa]", text: "text-[#7788aa]", dot: "bg-[#7788aa]", }, verification: { accent: "#7788aa", bg: "bg-[#141a24]", border: "border-[#7788aa]", text: "text-[#7788aa]", dot: "bg-[#7788aa]", }, }; const TYPE_LABELS: Record = { planning: "PLANNING", replanning: "REPLANNING", "plan-orders": "PLAN ORDERS", pr: "PR", "pr-update": "PR UPDATE", cleanup: "CLEANUP", verification: "VERIFICATION", }; const STATUS_LABELS: Record = { pending: "PENDING", running: "RUNNING", completed: "DONE", failed: "FAILED", }; export function OrchestratorStepNode({ type, taskId, status, label, hasQuestions, }: OrchestratorStepNodeProps) { const colors = TYPE_COLORS[type]; const typeLabel = TYPE_LABELS[type]; const statusLabel = STATUS_LABELS[status]; return (
{/* Type badge */}
{/* Status dot */} {status === "running" && ( )} {status === "completed" && ( )} {status === "failed" && ( )} {status === "pending" && ( )} {typeLabel}
{hasQuestions && ( )} {statusLabel}
{/* Label */} {label} {/* Task link */} {status === "running" ? "View running task" : "View task"}
); }