Skip to content

feat(studio): chat attachments, produced files, and previews - #978

Closed
jtenniswood wants to merge 1 commit into
studio/S12from
studio/S13
Closed

feat(studio): chat attachments, produced files, and previews#978
jtenniswood wants to merge 1 commit into
studio/S12from
studio/S13

Conversation

@jtenniswood

Copy link
Copy Markdown

Stack 13/21 — Studio: chat attachments, produced files, previews

First advanced-chat tier — a bounded delta onto PR 7's named seams.

  • lib/attachment-store.ts — IndexedDB store for sent attachment bytes (20-send bound), so attachments survive refreshes; sentAttachmentsRef merges them back on transcript rehydrate.
  • file-preview.tsx (+test) — image/PDF previews (the PDF iframe arm + the canvas crash fix).
  • Composer: AttachmentPill + picker; paste/drop images; HEIC/oversized images re-encode through a canvas before send.
  • message-bubble: AttachmentChip + produced-file chips read the daemon's real Write arg key and dedupe via lib/file-meta (from PR 4) — files a chat writes render as openable attachments.
  • chat-view: the AttachmentPanel arm + object-URL lifecycle.

~5 bounded chunks in the core chat files, matching the shape of the original commits. Core flows untouched — the e2e specs are structurally unaffected.

Demo at this stack point: paste an image into a chat, preview produced files and PDFs, refresh mid-conversation and keep your attachments.

Part of the stacked landing of #618.

🤖 Generated with Claude Code

First advanced-chat tier, a bounded delta onto the Chats core's named seams.
lib/attachment-store.ts keeps sent attachment bytes in IndexedDB (bounded to
the last 20 sends) so attachments survive refreshes; the hook merges them
back on transcript rehydrate. The composer gains the attachment pill and
picker with paste/drop; HEIC and oversized images re-encode through a canvas
before send. Message bubbles render attachment chips and dedupe
produced-file chips off the daemon's real Write arg key via lib/file-meta
(which reaches its final exported state here); file-preview.tsx renders
image and PDF previews; chat-view hosts the attachment side panel with the
object-URL lifecycle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jtenniswood jtenniswood added enhancement New feature or request ux ui WebUI Applies to the WebUI interface labels Sep 2, 2026
@jhrozek jhrozek closed this Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ui ux WebUI Applies to the WebUI interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants