fix(orchestrator): close operator rows the server no longer has

A 404 on Run, Close, a passkey signature or a rule accept closes the card with the notice "already done or removed elsewhere" instead of a lasting error; a selection reloads /api/state once and closes only the cards that are gone, other failures keep the old error. Tests run once on unify/skills-20261114 after the merge (operator order 2026-11-14).

🎯 Fix: 90 %
💥 Break: 3 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 87
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-14 21:21:07 +00:00
1 parent a2a03995cb
commit ec30d8c94e
6 files changed
+372 -13

No files matched your search

+2 -2
View File
@@ -16,12 +16,12 @@
ui.busy = true;
const prepared = await sendJson(`/api/rule-requests/${encodeURIComponent(item.id)}/sign`, {});
const signed = prepared.ok && prepared.data ? await assertion(prepared.data, label) : null;
if (!prepared.ok || !prepared.data) {
if ((!prepared.ok || !prepared.data) && !closeGone(prepared, [keyOf(item)], label)) {
toast(`${label}: not possible`, fail(prepared), false);
}
const result = signed ? await sendJson(`/api/rule-requests/${encodeURIComponent(item.id)}/accept`, {rule: prepared.data.payload, assertion: signed}) : null;
ui.busy = false;
if (result) {
if (result && !closeGone(result, [keyOf(item)], label)) {
toast(result.ok ? `Created: ${short(item.title)}` : `${label}: not created`, result.ok ? [] : fail(result), result.ok);
}
await load();