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();
};
const verifyUnverified = async () => {
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 });
}
const actions = items.length > 0 ? [{ label: "Clear", onClick: clear }] : undefined;
return (
<ColumnShell title="Done" count={items.length} actions={actions.length > 0 ? actions : undefined}>
{items.map((item) => {
const verified = item.status === "done" && item.verified === 1;
const mark = verified ? "✓✓" : item.status === "done" ? "✓" : "✗";
const markTitle = verified
? "Done — ffprobe confirms the on-disk file matches the plan"
: item.status === "done"
? "Done — awaiting post-job verification"
: "Error";
return (
<div key={item.id} className="group rounded border bg-white p-2">
<div className="flex items-start gap-1.5">
<span
title={markTitle}
className={`font-mono text-xs shrink-0 ${
verified ? "text-green-700" : item.status === "done" ? "text-gray-400" : "text-red-600"
}`}
>
{mark}
</span>
<div className="min-w-0 flex-1">
<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>
<ColumnShell title="Done" count={items.length} actions={actions}>
{items.map((item) => (
<div key={item.id} className="group rounded border bg-white p-2">
<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>
))}
{items.length === 0 && <p className="text-sm text-gray-400 text-center py-8">No completed items</p>}
</ColumnShell>
);