Repository navigation
Sync unsent composer text across devices #16535
josephv123
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
What I've typed in a composer but haven't sent yet stays on the device where I typed it. If I start a prompt on desktop and pick up my phone (or open app.t3.codes on another machine), the box is empty on that other client.
Today composer drafts are stored per client:
apps/web/src/composerDraftStore.tspersists tolocalStorage.apps/mobile/src/state/use-composer-drafts.tswrites a drafts file on the device.Neither one goes through the server, so a draft never reaches another client connected to the same environment. That's at odds with how the rest of a thread works, since messages, queue, and status already sync everywhere.
Proposed behavior
The unsent text in a thread's composer syncs across every client connected to that environment. If I type on desktop, then open the same thread on mobile, I see the same text and can keep editing it or send it from there.
Smallest useful scope
Text only, for existing threads, stored server-side per thread and pushed to subscribed clients. Leave attachments, model/trait selections, and new-thread drafts for later.
Open questions
Related
#6895 proposes modeling unsent drafts as real threads and mentions server-side draft text (
thread.draft.set) as a follow-up step that would give cross-device sync. This discussion is narrower: it only asks for the composer contents to sync, without changing how threads or the sidebar work.All reactions