feat(chat): two-way composer draft sync across desktop and mobile - #479
Open
Adam-Dalloul wants to merge 1 commit into
Open
feat(chat): two-way composer draft sync across desktop and mobile#479Adam-Dalloul wants to merge 1 commit into
Adam-Dalloul wants to merge 1 commit into
Conversation
Adam-Dalloul
force-pushed
the
feat/composer-draft-sync
branch
from
August 16, 2026 17:03
184bbf3 to
4d48967
Compare
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.
Merge order
#479, text-only draft sync)#483(images/files on the same draft)#6pairs with this PR (needs these endpoints)#7stacks on iOS#6and pairs with#483#483includes this commit. Merge this on its own; do not squash#483first.Unsent composer text is localStorage-only today, so a sentence typed on desktop is gone on the phone (and the other way around).
This persists the visible composer string for a persisted conversation and syncs it last-write-wins, same origin+revision pattern as
tabs://changed.Security
get_composer_draft/put_composer_draftonly.get_by_id). New-tabdraft:keys stay local.[A-Za-z0-9_-].conversation_id,revision,origin,cleared). The body is never on the firehose, so a WS/log dump cannot leak what the user is typing.Clients
Desktop/web: after the existing 300ms local draft save, PUT the visible text. On open / reconnect / notify, GET and apply if the revision is newer and
originis not this browser.iOS native follow-up is
#6oncodeg-ios. A phone using the web UI is covered by this PR alone.Tests
conversation_composer_draft_service.textfield.composer-draft-sync.test.tsfor key parsing and echo suppression.No secrets. One concern.