Skip to content

feat(chat): sync staged composer images and files with the draft - #483

Open
Adam-Dalloul wants to merge 3 commits into
xintaofei:mainfrom
Adam-Dalloul:feat/composer-draft-attachments
Open

feat(chat): sync staged composer images and files with the draft#483
Adam-Dalloul wants to merge 3 commits into
xintaofei:mainfrom
Adam-Dalloul:feat/composer-draft-attachments

Conversation

@Adam-Dalloul

@Adam-Dalloul Adam-Dalloul commented Aug 16, 2026

Copy link
Copy Markdown

Merge order

  1. #479 first (text-only draft sync)
  2. Then this PR (#483)
  3. iOS #6 pairs with #479
  4. iOS #7 stacks on iOS #6 and pairs with this PR

This branch already contains #479. Merge #479 first so this reviews as the attachment-ref delta.


#479 syncs the typed text only. An image or file attached on desktop stayed on that device, so the phone sent text without it (and the other way around).

This persists attachment refs, not bytes:

  • Images go through the existing uploads jail (/upload_attachment or a local stage_composer_attachment). The other device hydrates the thumbnail via jail-only read_upload_attachment.
  • Workspace files stay file:// links. The host agent can already read those paths. The phone shows a chip and sends resource_link.
  • The WS notify is still ids only. No text, no paths, no bytes on the firehose.

Old clients that omit attachments do not wipe the other side. [] is an explicit clear. First GET must finish before a new client sends the field.

256 KiB text cap is unchanged. Attachment metadata is 16 items, jail-checked, no raw bytes in SQLite.

No secrets. One extra concern on top of #479.

@Adam-Dalloul
Adam-Dalloul force-pushed the feat/composer-draft-attachments branch from 46a1110 to 698050f Compare August 16, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant