From 581e5e3b4cd83fa7a310761ab58060438bfae1d4 Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 22 Jun 2026 23:21:00 +0200 Subject: [PATCH] fix(dashboard): send graceful=true not =1 for the kill query param MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The kill endpoint deserializes ?graceful as a strict bool (true/false), so the dashboard's ?graceful=1 failed with 'provided string was not true or false' and graceful shutdown silently broke. The stop and bulk-stop buttons build the param at two call sites in tabs.js; send graceful=true instead (a hard kill still omits the param entirely). Keeps the API contract strict — the FE one-liner damocles and I agreed on, superseding the lax-bool deserializer in the closed #1917. Fixes #1914. --- frontend/packages/dashboard/src/tabs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index 3cb099e5..bfa66b06 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -283,7 +283,7 @@ window.marked = marked; // Single-agent POST helper shared by all menu items. async function agentMenuPost(actionPath, name, body, graceful) { - const url = actionPath + encodeURIComponent(name) + (graceful ? '?graceful=1' : ''); + const url = actionPath + encodeURIComponent(name) + (graceful ? '?graceful=true' : ''); try { const resp = await fetch(url, { method: 'POST', @@ -1208,7 +1208,7 @@ window.marked = marked; : new URLSearchParams(opts.body || {}); const url = opts.perAgentBodyFor ? opts.action - : opts.action + encodeURIComponent(name) + (graceful ? '?graceful=1' : ''); + : opts.action + encodeURIComponent(name) + (graceful ? '?graceful=true' : ''); try { const resp = await fetch(url, { method: 'POST',