From 59e2944fb72d8ef8c3b55fec3be766abe48df820 Mon Sep 17 00:00:00 2001 From: 0x1f99d Date: Mon, 9 Mar 2026 12:24:56 +1100 Subject: [PATCH] fix(web): add dismiss button to thread error banner (#588) The thread error banner had no way to be dismissed. Users hitting unrecoverable errors (e.g. missing gh CLI during PR creation) were stuck with a persistent error banner and no way to clear it. Add a dismiss (X) button to ThreadErrorBanner using the existing AlertAction component, wired to clear the thread error via setThreadError(id, null). Closes #496 --- apps/web/src/components/ChatView.tsx | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 05b3eee271c165a8476a5affac64e6ce55128e08..b284523c529898593a2e7b0f4dd562db6062232f 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -123,7 +123,7 @@ import { } from "../keybindings"; import ChatMarkdown from "./ChatMarkdown"; import ThreadTerminalDrawer from "./ThreadTerminalDrawer"; -import { Alert, AlertDescription, AlertTitle } from "./ui/alert"; +import { Alert, AlertAction, AlertDescription, AlertTitle } from "./ui/alert"; import { BotIcon, ChevronDownIcon, @@ -3434,7 +3434,10 @@ export default function ChatView({ threadId }: ChatViewProps) { {/* Error banner */} - + setThreadError(activeThread.id, null)} + /> {/* Messages */} @@ -4095,7 +4098,13 @@ const ChatHeader = memo(function ChatHeader({ ); }); -const ThreadErrorBanner = memo(function ThreadErrorBanner({ error }: { error: string | null }) { +const ThreadErrorBanner = memo(function ThreadErrorBanner({ + error, + onDismiss, +}: { + error: string | null; + onDismiss?: () => void; +}) { if (!error) return null; return (
@@ -4104,6 +4113,18 @@ const ThreadErrorBanner = memo(function ThreadErrorBanner({ error }: { error: st {error} + {onDismiss && ( + + + + )}
); -- 2.54.0