From 2b8c29493ae4cf47699cb3fb66e043ae23cbc87e Mon Sep 17 00:00:00 2001 From: BinBandit Date: Mon, 9 Mar 2026 12:07:37 +1100 Subject: [PATCH] fix(web): add dismiss button to thread error banner 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 05b3eee271c..b284523c529 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 && ( + + + + )}
);