From febcbf6d2e2e508dec722e36cd966bb3a17ae176 Mon Sep 17 00:00:00 2001 From: mawkone Date: Thu, 4 Jun 2026 12:37:44 -0700 Subject: [PATCH] fix(frontend): update TimelineToolGroup to visually propagate error status with red color and X icon --- .../components/vibn-chat/chat-panel.tsx | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/vibn-frontend/components/vibn-chat/chat-panel.tsx b/vibn-frontend/components/vibn-chat/chat-panel.tsx index 26c46b4..61be5d3 100644 --- a/vibn-frontend/components/vibn-chat/chat-panel.tsx +++ b/vibn-frontend/components/vibn-chat/chat-panel.tsx @@ -65,7 +65,12 @@ interface Message { type TimelineEntry = | { kind: "thought"; text: string } - | { kind: "tool"; name: string; status: "running" | "done"; result?: string } + | { + kind: "tool"; + name: string; + status: "running" | "done" | "error"; + result?: string; + } // A text segment from one round of the assistant's tool loop. // Each text SSE event from the server starts a new entry; subsequent // streaming chunks for that same round append to the most-recent @@ -589,6 +594,7 @@ function TimelineToolGroup({ const [expanded, setExpanded] = useState(false); const count = entries.length; const allDone = entries.every((e) => e.status === "done"); + const hasError = entries.some((e) => e.status === "error"); return (
- {!allDone ? ( + {hasError ? ( + + ) : !allDone ? ( )} - - {category} {count > 1 ? `(x${count})` : ""} {!allDone ? "..." : " ✓"} + + {category} {count > 1 ? `(x${count})` : ""} + {hasError ? " ✗" : !allDone ? "..." : " ✓"} = 0; i--) { const e = tl[i]; if ( @@ -1304,7 +1321,7 @@ export function ChatPanel({ ) { newTl.unshift({ ...e, - status: "done", + status: isToolErr ? "error" : "done", result: ev.result, }); updated = true;