From b19e2db4aedbb896432f4b926d2154911c8eb79b Mon Sep 17 00:00:00 2001 From: Chukwudi Nwobodo Date: Mon, 9 Mar 2026 06:45:16 +0000 Subject: [PATCH] fix(web): block image uploads during plan mode questions Use an error toast instead of a persisted banner when users try to attach images while plan mode questions are pending. Closes #499 --- apps/web/src/components/ChatView.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 798dcc9e41..64c15ba2fc 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -2034,6 +2034,14 @@ export default function ChatView({ threadId }: ChatViewProps) { const addComposerImages = (files: File[]) => { if (!activeThreadId || files.length === 0) return; + if (pendingUserInputs.length > 0) { + toastManager.add({ + type: "error", + title: "Attach images after answering plan questions.", + }); + return; + } + const nextImages: ComposerImageAttachment[] = []; let nextImageCount = composerImagesRef.current.length; let error: string | null = null;