fix: preserve chat input text across window resize (#4717)

Adds a Recoil atom (chatInputDraftAtom) to store the chat input draft,
which persists the text when the chat component unmounts/remounts during
mobile/desktop mode transitions.

Changes:
- Add chatInputDraftAtom to ClientConfigStore
- Update ChatTextField to save draft on input change
- Restore draft when component mounts
- Clear draft when message is sent

Closes #3615
This commit is contained in:
John Costa
2026-01-17 14:33:02 -08:00
committed by GitHub
parent a82efb0e9a
commit 9f169ce96e
2 changed files with 21 additions and 2 deletions
@@ -73,6 +73,12 @@ export const chatAuthenticatedAtom = atom<boolean>({
default: false,
});
// Stores chat input draft to preserve text across mobile/desktop mode switches
export const chatInputDraftAtom = atom<string>({
key: 'chatInputDraftAtom',
default: '',
});
export const websocketServiceAtom = atom<WebsocketService>({
key: 'websocketServiceAtom',
default: null,