done column: drop checkmark glyph and verify-unverified button

This commit is contained in:
2026-04-15 07:03:19 +02:00
parent f6488b6bbe
commit d6e8d264c5

View File

@@ -20,68 +20,33 @@ export function DoneColumn({ items, onMutate }: DoneColumnProps) {
onMutate(); onMutate();
}; };
const verifyUnverified = async () => { const actions = items.length > 0 ? [{ label: "Clear", onClick: clear }] : undefined;
await api.post("/api/execute/verify-unverified");
// Server processes sequentially in the background; each plan_update
// SSE will trigger a pipeline reload as items get verified.
};
const unverifiedCount = items.filter((i) => i.status === "done" && i.verified !== 1).length;
const actions = [];
if (unverifiedCount > 0) {
actions.push({ label: `Verify ${unverifiedCount}`, onClick: verifyUnverified });
}
if (items.length > 0) {
actions.push({ label: "Clear", onClick: clear });
}
return ( return (
<ColumnShell title="Done" count={items.length} actions={actions.length > 0 ? actions : undefined}> <ColumnShell title="Done" count={items.length} actions={actions}>
{items.map((item) => { {items.map((item) => (
const verified = item.status === "done" && item.verified === 1; <div key={item.id} className="group rounded border bg-white p-2">
const mark = verified ? "✓✓" : item.status === "done" ? "✓" : "✗"; <Link
const markTitle = verified to="/review/audio/$id"
? "Done — ffprobe confirms the on-disk file matches the plan" params={{ id: String(item.item_id) }}
: item.status === "done" className="text-xs font-medium truncate block hover:text-blue-600 hover:underline"
? "Done — awaiting post-job verification" >
: "Error"; {item.name}
return ( </Link>
<div key={item.id} className="group rounded border bg-white p-2"> <div className="flex items-center gap-1.5 mt-0.5">
<div className="flex items-start gap-1.5"> <Badge variant={item.status === "done" ? "done" : "error"}>{item.status}</Badge>
<span <div className="flex-1" />
title={markTitle} <button
className={`font-mono text-xs shrink-0 ${ type="button"
verified ? "text-green-700" : item.status === "done" ? "text-gray-400" : "text-red-600" onClick={() => reopen(item.item_id)}
}`} title="Send this item back to the Review column to redecide and re-queue"
> className="text-[0.68rem] px-1.5 py-0.5 rounded border border-gray-300 bg-white text-gray-700 hover:bg-gray-100 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"
{mark} >
</span> Back to review
<div className="min-w-0 flex-1"> </button>
<Link
to="/review/audio/$id"
params={{ id: String(item.item_id) }}
className="text-xs font-medium truncate block hover:text-blue-600 hover:underline"
>
{item.name}
</Link>
<div className="flex items-center gap-1.5 mt-0.5">
<Badge variant={item.status === "done" ? "done" : "error"}>{item.status}</Badge>
<div className="flex-1" />
<button
type="button"
onClick={() => reopen(item.item_id)}
title="Send this item back to the Review column to redecide and re-queue"
className="text-[0.68rem] px-1.5 py-0.5 rounded border border-gray-300 bg-white text-gray-700 hover:bg-gray-100 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"
>
Back to review
</button>
</div>
</div>
</div>
</div> </div>
); </div>
})} ))}
{items.length === 0 && <p className="text-sm text-gray-400 text-center py-8">No completed items</p>} {items.length === 0 && <p className="text-sm text-gray-400 text-center py-8">No completed items</p>}
</ColumnShell> </ColumnShell>
); );