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.
This commit is contained in:
Josh Hawkins
2026-09-18 06:55:36 -05:00
parent 885d6776fd
commit 56c6416556
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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")}
>
+1 -1
View File
@@ -362,7 +362,7 @@ export default function ChatPage() {
role="user"
content={msg.content}
messageIndex={i}
onEditSubmit={handleEditSubmit}
onEditSubmit={isLoading ? undefined : handleEditSubmit}
isComplete
showStats={showStats}
/>