From 7e0e4f1dfc299cc5174dbacb2f6e99a407c6ed45 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Thu, 7 May 2026 13:04:09 -0700 Subject: [PATCH] fix(v2 managed agents ui): only treat assistant in_progress as active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User messages from opencode have no completed_at and normalize to status=in_progress, which made hasInProgress always true → Stop button stuck on. Filter to assistant-only. --- ui/litellm-dashboard/src/app/sessions/[sid]/view.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/app/sessions/[sid]/view.tsx b/ui/litellm-dashboard/src/app/sessions/[sid]/view.tsx index 771a0167d0d..c992e23e6b7 100644 --- a/ui/litellm-dashboard/src/app/sessions/[sid]/view.tsx +++ b/ui/litellm-dashboard/src/app/sessions/[sid]/view.tsx @@ -174,8 +174,14 @@ export default function SessionThreadView() { const messagesEndRef = useRef(null); const scrollContainerRef = useRef(null); + // Only ASSISTANT messages count as "in flight". User messages from opencode + // have no completed_at so they normalize as in_progress, but they're not + // running anything — only assistant turns are. const hasInProgress = useMemo( - () => messages.some((m) => m.status === "in_progress"), + () => + messages.some( + (m) => m.role === "assistant" && m.status === "in_progress", + ), [messages], );