From 56c6416556d65f364e9a9734e75f17a50c87fff7 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 17 Sep 2026 16:55:39 -0500 Subject: [PATCH] don't edit a chat message while a reply streams The edit button stayed active while a reply streamed. `submitConversation` returns early while loading, but the message bubble still closed its editor, so the edit was silently lost. The edit button is hidden while a reply streams, and an editor that's already open keeps its draft with send disabled until the reply ends. --- web/src/components/chat/ChatMessage.tsx | 2 +- web/src/pages/Chat.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/chat/ChatMessage.tsx b/web/src/components/chat/ChatMessage.tsx index f9f441b92f..c5d9a207f8 100644 --- a/web/src/components/chat/ChatMessage.tsx +++ b/web/src/components/chat/ChatMessage.tsx @@ -133,7 +133,7 @@ export function MessageBubble({ variant="select" size="icon" className="size-9 rounded-full" - disabled={!draftContent.trim()} + disabled={!draftContent.trim() || onEditSubmit == null} onClick={handleEditSubmit} aria-label={t("send")} > diff --git a/web/src/pages/Chat.tsx b/web/src/pages/Chat.tsx index 6242dd88dc..4e96889dfd 100644 --- a/web/src/pages/Chat.tsx +++ b/web/src/pages/Chat.tsx @@ -362,7 +362,7 @@ export default function ChatPage() { role="user" content={msg.content} messageIndex={i} - onEditSubmit={handleEditSubmit} + onEditSubmit={isLoading ? undefined : handleEditSubmit} isComplete showStats={showStats} />