You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Overwritten chats when they aren't fully loaded #198
When you have a very long chat there is a glitch that happens while its loading if you type something, and submit it, it will overwrite your entire chat and also relabel it as a new title. And you will lose 100% of your original chat log, and images.
@claude can you investigate this and fix it on a new branch? I believe in cases where users try to load a chat and it isn't fully loaded yet, they might still be allowed to "chat with it" and thus overwrite their previous chat with a brand new one.
It's possible a very simple fix to this will be to disable the input box (we do this a lot for various reasons already) until the chat is fully loaded.
I successfully investigated and fixed the issue where users can overwrite chats while they're still loading.
Todo List:
Analyze codebase to understand chat loading mechanism
Find existing patterns for disabling input boxes
Identify chat loading state management
Implement input box disabling during chat loading
Run formatting, linting, and build commands
Test the implementation
Commit and push changes
Problem Analysis:
The issue occurred because the chat input wasn't disabled during the loading phase when fetching existing chat data. The input was only disabled during streaming responses, allowing users to accidentally overwrite chat content while the original chat was still loading.
Solution Implemented:
Exposed isPending state from the useChatSession hook (useChatSession.ts:320)
Updated chat route to destructure and use the isPending state (_auth.chat.$chatId.tsx:194)
Enhanced input disabling logic to include loading state alongside streaming state (_auth.chat.$chatId.tsx:591)
Technical Details:
The ChatBox component already had robust input disabling patterns using the isStreaming prop
The useChatSession hook was already tracking loading state via React Query's isPending but wasn't exposing it
The fix follows existing code conventions and patterns perfectly
Result:
Now when users navigate to a chat that's still loading, the input box will be disabled until the chat content is fully loaded, preventing accidental overwrites.
Activity
AnthonyRonning commentedon Aug 16, 2025
@claude can you investigate this and fix it on a new branch? I believe in cases where users try to load a chat and it isn't fully loaded yet, they might still be allowed to "chat with it" and thus overwrite their previous chat with a brand new one.
It's possible a very simple fix to this will be to disable the input box (we do this a lot for various reasons already) until the chat is fully loaded.
claude commentedon Aug 16, 2025
Claude finished @AnthonyRonning's task —— View job •
claude/issue-198-20250816-1541• Create PR ➔Fixed Chat Overwrite Bug ✅
I successfully investigated and fixed the issue where users can overwrite chats while they're still loading.
Todo List:
Problem Analysis:
The issue occurred because the chat input wasn't disabled during the loading phase when fetching existing chat data. The input was only disabled during streaming responses, allowing users to accidentally overwrite chat content while the original chat was still loading.
Solution Implemented:
isPendingstate from theuseChatSessionhook (useChatSession.ts:320)isPendingstate (_auth.chat.$chatId.tsx:194)_auth.chat.$chatId.tsx:591)Technical Details:
ChatBoxcomponent already had robust input disabling patterns using theisStreamingpropuseChatSessionhook was already tracking loading state via React Query'sisPendingbut wasn't exposing itResult:
Now when users navigate to a chat that's still loading, the input box will be disabled until the chat content is fully loaded, preventing accidental overwrites.
fix: Prevent chat overwrite during loading phase