)}
);
}
const TERMINAL = new Set(["done", "failed", "cancelled"]);
function Row({
job,
selected,
onSelect,
onCancel,
}: {
job: Job;
selected: boolean;
onSelect: () => void;
onCancel: () => void;
}) {
const active = !TERMINAL.has(job.stage);
const failed = job.stage === "failed";
const percent = progressPercent(job);
// Keep the raw text on the title attribute: the plain version is for acting
// on, the original is for diagnosing.
const explained = failed ? explainJobError(job.error) : null;
return (