From d926a0f31af9c816a40f0ec216621d86ee25554c Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 15:44:01 +0000 Subject: [PATCH] fix: Prevent chat overwrite during loading phase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Expose isPending state from useChatSession hook - Include isPending in isStreaming prop to disable input during chat loading - Prevents users from accidentally overwriting chats while they're still loading Fixes #198 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Anthony --- frontend/src/hooks/useChatSession.ts | 3 ++- frontend/src/routes/_auth.chat.$chatId.tsx | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/hooks/useChatSession.ts b/frontend/src/hooks/useChatSession.ts index 234183ce6..c533cbf15 100644 --- a/frontend/src/hooks/useChatSession.ts +++ b/frontend/src/hooks/useChatSession.ts @@ -316,7 +316,8 @@ export function useChatSession( currentStreamingMessage, appendUserMessage, streamAssistant, - streamingError + streamingError, + isPending }; } diff --git a/frontend/src/routes/_auth.chat.$chatId.tsx b/frontend/src/routes/_auth.chat.$chatId.tsx index bf427119f..582bb11f0 100644 --- a/frontend/src/routes/_auth.chat.$chatId.tsx +++ b/frontend/src/routes/_auth.chat.$chatId.tsx @@ -190,7 +190,8 @@ function ChatComponent() { phase, currentStreamingMessage, appendUserMessage, - streamingError + streamingError, + isPending } = useChatSession(chatId, { getChatById, persistChat, @@ -587,7 +588,7 @@ END OF INSTRUCTIONS`;