Repository navigation
feat(threads): keep drafts and continue them on web and desktop - #665
Merged
Merged
Conversation
nixuuu
force-pushed
the
feat/thread-drafts-web
branch
from
November 13, 2026 18:17
1cd5ceb to
6a81c11
Compare
nixuuu
force-pushed
the
feat/thread-drafts-web
branch
7 times, most recently
from
November 13, 2026 20:26
cd4b089 to
db2c706
Compare
nixuuu
force-pushed
the
feat/thread-drafts-web
branch
4 times, most recently
from
November 14, 2026 00:57
dde24f5 to
330a290
Compare
nixuuu
force-pushed
the
feat/thread-drafts-web
branch
3 times, most recently
from
November 14, 2026 02:10
8a489a2 to
c3cca7b
Compare
nixuuu
force-pushed
the
feat/thread-drafts-web
branch
from
November 14, 2026 02:50
c3cca7b to
4d3aa3e
Compare
nixuuu
marked this pull request as ready for review
November 14, 2026 03:01
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
## Change Mobile persists drafts in per-target Documents files scoped to pairing/certificate. Text, mentions, citations/notes, upload IDs/states and choices survive restart. Markers use memoized per-target subscriptions. The Drafts sheet supports append/replace with existing attachment IDs; one session cache/watch resumes from the gateway revision. Send/create uses **one RPC (2 → 1)** without saving first. Navigation changes only the screen lifetime; it does not abort HTTP delivery. The captured persistent draft clears before stale-screen guards run. On reopen, read-only recovery checks the receipt and native admission. The unknown-send warning stays hidden during active sends/reconciliation and appears only for unresolved outcomes. Edit/Discard then recover explicitly. Definite rejection restores editing, including Edit from here / Swap drafts. Late save responses cannot resurrect sent/forked drafts. Workspace tabs and visuals' thread view are retained after rebasing onto **bcc07e0db**. BackgroundTasksChip keeps its offline/away disabled condition. Migration remains **0140**, after visuals' 0139. Polish mobile docs cover persistence, handoff and recovery. No native dependency/configuration changes. ## Verification - Each layer passed install, gen:check, monorepo typecheck, lint, format:check and production web build with nice. - Current gateway /goal recovery follow-up passed draft integration **17/17**, linked send **2/2**, gateway/integration typechecks, lint and format:check with nice. Recovery now checks every native SendMessage receipt, including goals without turns/steers. Mobile sources are unchanged. Migration **1/1**, schema **23/23** passed after rebase. The slow-link test verifies same-thread writes and the source receipt remain unblocked, with zero idle SQL transactions. - iOS and Android production exports passed with nice after rebase. Fingerprints match baseline: iOS `74705db3a68907bc28379bb9b1080a227bc0755b`, Android `7d38be8f5c9bf842d62060c75820a206f99c87e3`. - Before the final /goal follow-up, full check:tmp passed: **2959 pass, 175 skip, 0 fail**, 561 files; private temp directory clean. Diagnostics boundary tests passed **7/7**. The full suite was not repeated locally for the narrow follow-up. - CI and final re-check of the gateway follow-up are pending. The stack stays draft as requested. - **Native device review pending:** known MacStudio device-host failure. Exports/typecheck do not replace device interaction coverage. ## Copy audit (docs/copy.md §8) - Draft uses the shared term and reserved width; empty markers are hidden from accessibility. - Handoff/recovery actions match web. The warning explains possible prior delivery without internal terms. - Before: in-flight sends showed a warning and recovery actions. After: both stay hidden until recovery finishes and delivery remains unknown. - Error/upload guidance remains actionable. Responsive web equivalents passed phone/dark review; native touch/layout review remains pending. Part of **stack 667**, depends on #665. Do not merge separately.
This was referenced Nov 16, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 24, 2026
) ## Summary - Keep one new-thread draft across project and worker changes in web, desktop, iOS, and Android. Reopening New thread restores the prompt. - Recover the most recent draft saved under a workspace in an earlier version. Keep any pending send bound to its original request. - Bind new sends to the selected workspace and keep receipt retries tied to the submitted request. ## Verification - Browser with two projects and two workers. Verified project and worker changes, leaving and returning, a reload, recovery of an earlier draft, and delivery to the selected worker. - 24 integration tests across composer drafts, linked delivery, and sandbox draft selections. - Web, mobile, and gateway type checks. Formatting and lint for edited sources. - Native iOS and Android runtime verification remains open. Repository-wide checks run in CI. ## Copy audit Added “Could not save this draft. Retry before sending.” for a recovered draft whose updated target could not be saved. The message names the failure and gives one recovery action. Fixes: #665 Fixes: #666
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.
Change
Thread/new-thread/side-thread composers retain bounded local drafts, including mentions, citations/notes, uploaded IDs and explicit choices. Per-target storage/subscriptions preserve other tabs' drafts and avoid rerendering every sidebar row. Markers reserve their width. Generic snapshot/restore preserves Edit from here / Swap drafts and workspace tabs.
Open drafts lists other-device prompts. Continue here appends without re-uploading; replacement is explicit. One shared page cache and resumable stream serve mounted composers. Stream failures back off from 2 to 60 seconds without re-listing on reconnect. Newer hints compare gateway clocks. Source conflicts fork draft/send IDs while preserving text.
Send/create uses one RPC instead of Save + Send (2 → 1). Navigation does not abort the send. Acknowledged sends clear their captured durable state even after navigation. Reopened pending drafts query GetComposerDraftDelivery before showing recovery; confirmed receipts/native admission clear them without resending. The unknown-send banner and Edit/Discard actions stay hidden while this client sends or the gateway reports an active attempt. Definite rejection preserves editable text; a truly unknown outcome exposes explicit recovery.
Verification
Copy audit (docs/copy.md §8)
Part of stack 667, depends on #664. Rebased onto bcc07e0; migration 0140. Do not merge separately.