generated from coulomb/repo-seed
fix(dashboard): resolve button calls /resolve endpoint, not PATCH
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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}`);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user