From 4a8942f310587f535dd00fc2fc38b5e33cbe7617 Mon Sep 17 00:00:00 2001 From: tegwick Date: Wed, 11 Mar 2026 22:16:17 +0100 Subject: [PATCH] fix(dashboard): resolve button calls /resolve endpoint, not PATCH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PATCH /decisions/{id}/ is a blind field-setter with no decided_at logic. POST /decisions/{id}/resolve is the correct endpoint — it auto-sets decided_at and emits a decision_resolved progress event. Fixes: resolved decisions showing last in the sorted list because decided_at was never populated. Co-Authored-By: Claude Sonnet 4.6 --- dashboard/src/decisions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/src/decisions.md b/dashboard/src/decisions.md index 3784b5e..825bb3a 100644 --- a/dashboard/src/decisions.md +++ b/dashboard/src/decisions.md @@ -347,10 +347,10 @@ if (filtered.length === 0) { placeholder: "Why is this resolved, and what was decided?", confirmLabel: "Resolve", onConfirm: async (rationale) => { - const res = await fetch(`${API}/decisions/${d.id}/`, { - method: "PATCH", + const res = await fetch(`${API}/decisions/${d.id}/resolve`, { + method: "POST", headers: {"Content-Type": "application/json"}, - body: JSON.stringify({status: "resolved", rationale, decided_by: "human"}), + body: JSON.stringify({rationale, decided_by: "human"}), }); if (!res.ok) throw new Error(`API error ${res.status}`); },