import type { WorkerInfo } from "../types"; interface Props { workers: WorkerInfo[]; } const STATE_COLORS: Record = { idle: "var(--text-muted)", processing: "var(--processing)", retry: "#f97316", stopped: "var(--error)", }; export function WorkerPanel({ workers }: Props) { return (

Workers

{workers.map((w) => (
{w.worker_id} {w.state}
{w.current_chunk !== undefined && (
chunk #{w.current_chunk}
)}
done: {w.processed} err: {w.errors} retry: {w.retries}
))} {workers.length === 0 && (
No workers started
)}
); }