From db57ccf50cdd6183da479663beccd7f769b1e611 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Mar 2026 00:13:39 +0800 Subject: [PATCH] fix: keep stop button enabled until task fully ends --- openai_pool_orchestrator/static/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openai_pool_orchestrator/static/app.js b/openai_pool_orchestrator/static/app.js index 9f51330..f9d4bd7 100755 --- a/openai_pool_orchestrator/static/app.js +++ b/openai_pool_orchestrator/static/app.js @@ -1004,7 +1004,7 @@ function syncTaskChrome() { const hasLiveRun = Boolean(state.task.run_id) && !state.task.finished_at; const isActive = ['starting', 'running'].includes(status); const isStopping = status === 'stopping'; - const canStop = ['starting', 'running', 'stopping', 'failed'].includes(status) || hasLiveRun; + const canStop = !['idle', 'stopped', 'finished'].includes(status); DOM.btnStart.disabled = hasLiveRun || isStopping; DOM.btnStop.disabled = !canStop; DOM.progressFill.className = isActive