fix(composer): persist unsent drafts across session switches (#605) - #643
Open
cagdasyurekli wants to merge 1 commit into
Open
fix(composer): persist unsent drafts across session switches (#605)#643cagdasyurekli wants to merge 1 commit into
cagdasyurekli wants to merge 1 commit into
Conversation
…ng#605) - Persist draft text, attachments, and pendingSkill per session in localStorage - Restore draft when switching back to a conversation or remounting Composer - Clear stored draft upon send or when draft content is emptied - Add automated regression tests covering draft persistence across session switches, unmount/remount, and clearing on send
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #605
Summary
Fixes an issue where unsent message drafts, attachments, and chosen skills in the composer were unconditionally wiped whenever the user switched conversations or navigated away and returned.
Changes
ocw:composer-draft:${sessionId}).resetKey/sessionIdchange), saves the outgoing session's draft and restores the incoming session's draft (or leaves it empty if none exists).Composer.skills.test.tsxcovering draft persistence across session switches, draft clearance on send, and remount restoration.