From c5ccafbb8018f0c1dc0a3fa74d9cad7d95489606 Mon Sep 17 00:00:00 2001 From: dotta Date: Wed, 8 Apr 2026 07:52:06 -0500 Subject: [PATCH] fix(ui): show shimmer and icon on initial Working... state for new agent runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eliminates two visual glitches when a new agent run starts: 1. The initial "Working..." was rendered as plain text without the shimmer animation or agent icon — now matches the proper working state styling. 2. A brief blank flash occurred when transcript chunks arrived but hadn't produced parseable parts yet — fixed by deriving waitingText from parts availability instead of the hasOutput flag. Co-Authored-By: Paperclip --- ui/src/components/IssueChatThread.tsx | 13 ++++++++++--- ui/src/lib/issue-chat-messages.ts | 12 +++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ui/src/components/IssueChatThread.tsx b/ui/src/components/IssueChatThread.tsx index 1372fa1c..220de8ec 100644 --- a/ui/src/components/IssueChatThread.tsx +++ b/ui/src/components/IssueChatThread.tsx @@ -818,7 +818,7 @@ function IssueChatAssistantMessage() { const runHref = runId && runAgentId ? `/agents/${runAgentId}/runs/${runId}` : null; const chainOfThoughtLabel = typeof custom.chainOfThoughtLabel === "string" ? custom.chainOfThoughtLabel : null; const hasCoT = message.content.some((p) => p.type === "reasoning" || p.type === "tool-call"); - const isFoldable = !isRunning && hasCoT && !!chainOfThoughtLabel; + const isFoldable = !isRunning && !!chainOfThoughtLabel; const [folded, setFolded] = useState(isFoldable); const [prevFoldKey, setPrevFoldKey] = useState({ messageId: message.id, isFoldable }); @@ -900,8 +900,15 @@ function IssueChatAssistantMessage() { }} /> {message.content.length === 0 && waitingText ? ( -
- {waitingText} +
+ + {agentIcon ? ( + + ) : ( + + )} + {waitingText} +
) : null} {notices.length > 0 ? ( diff --git a/ui/src/lib/issue-chat-messages.ts b/ui/src/lib/issue-chat-messages.ts index 09c615f6..47e0a29e 100644 --- a/ui/src/lib/issue-chat-messages.ts +++ b/ui/src/lib/issue-chat-messages.ts @@ -593,22 +593,17 @@ function normalizeLiveRuns( function createLiveRunMessage(args: { run: LiveRunForIssue; transcript: readonly IssueChatTranscriptEntry[]; - hasOutput: boolean; }) { - const { run, transcript, hasOutput } = args; + const { run, transcript } = args; const { parts, notices, segments } = buildAssistantPartsFromTranscript(transcript); const waitingText = run.status === "queued" ? "Queued..." - : hasOutput + : parts.length > 0 ? "" : "Working..."; - const content = parts.length > 0 - ? parts - : waitingText - ? [{ type: "text", text: waitingText } satisfies TextMessagePart] - : []; + const content = parts; const message: ThreadAssistantMessage = { id: `live-run:${run.id}`, @@ -712,7 +707,6 @@ export function buildIssueChatMessages(args: { message: createLiveRunMessage({ run, transcript: transcriptsByRunId?.get(run.id) ?? [], - hasOutput: hasOutputForRun?.(run.id) ?? false, }), }); }