Skip to content

feat(web): Inbox reply attachments use the composer's strip and intake - #1195

Merged
Jacksondr5 merged 3 commits into
j5code/inbox-reply-editorfrom
j5code/inbox-reply-strip
Nov 23, 2026
Merged

Jacksondr5 merged 3 commits into
j5code/inbox-reply-editorfrom
j5code/inbox-reply-strip

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Problem

An Inbox reply took attachments through J5's own list and checks, which fell short of the composer:

  • Thumbnails were 32px and couldn't be opened; files had no preview.
  • HEIC was refused and large images weren't shrunk.
  • One bad file refused the whole batch, and empty files weren't caught.
  • A file lost after a reload added a second copy when re-attached, and the old one kept blocking.
  • A failed upload gave no reason.
  • Dragging over the reply showed no highlight.
  • An image that the browser couldn't save gave no sign it would be lost on reload (Inbox reply: say when an attached image won't survive a reload #1141).

Closes #1175, closes #1141. Stacked on #1184, which puts the composer's editor in the reply.

What changed

All of it is in J5 files: AnswerAttachments.tsx, plus the attachment lines in HumanInboxPage.tsx (the Inbox) and AdjudicationDock.tsx (the Captain's pinned ask).

  • Intake: upstream's useComposerAttachmentIntake, per answer. It's wired to the answer's own draft, which already lives in the composer draft store.
    • Each file is checked on its own, so one bad file is reported and the rest are kept.
    • Empty files are refused with a reason.
    • HEIC is converted and large images are shrunk.
    • A re-picked file replaces its "Attach again" marker in place.
    • The reply's exact-text mode is kept: a long paste stays text and no inline chips are inserted.
  • Strip: upstream's ComposerAttachmentMediaRow, ComposerAttachmentFileList and ComposerFilePreviewDialog.
  • Uploads. These start the way the composer starts them: an effect over the answer's draft, which also restarts them after a reload.
  • Waiting on preparation. An answer waits while an image is still being converted or shrunk; until then Answer shows "Wait for the image to finish preparing." Sending earlier would leave the image out, and it could land in the cleared draft afterwards.
  • Errors. A refused file shows in the same alert as a send that failed (AnswerErrorAlert, renamed from feat(web): Inbox replies are typed in the composer's editor #1184's AnswerSendErrorAlert). Upstream likewise shows both in one banner.
  • A video restored after a reload. Upstream keeps a finished upload's id, so the video comes back with no bytes. It's listed as a file row whose preview plays the uploaded copy on the ask's server, rather than as a Play tile.
  • Drop highlight. The composer's "Drop files to attach" overlay shows while files are dragged over the reply. In the Inbox the whole reply area takes the drop, as the composer's whole form does; the pinned ask's whole body already did. Upstream's overlay is inset for a padded form and a reply has no padding, so J5 draws it slightly outside the reply.
  • Removal. J5's stageAnswerAttachments and its tests are gone; upstream's intake does that work now.
  • Unchanged: words are still required to answer, and attachments still need a server that takes uploads (only images when it takes no files).

UI changes

Before and after are the same ask on the same server state, in the Inbox. A real Claude Haiku 5.5 turn wrote it on a server at #1184's head 9181a06. Base was captured there; then upgrade ran this branch's build on that home. Light theme, 1280×800.

Before After
Same ask and the same three files (a PNG, a markdown file, an empty text file); before: 32px thumbnails, and the empty file accepted, then failing with no reason; after: the composer's image tile and file row, and the empty file refused with its reason in the answer's alert while the others are kept Same ask and the same three files (a PNG, a markdown file, an empty text file); before: 32px thumbnails, and the empty file accepted, then failing with no reason; after: the composer's image tile and file row, and the empty file refused with its reason in the answer's alert while the others are kept, before Same ask and the same three files (a PNG, a markdown file, an empty text file); before: 32px thumbnails, and the empty file accepted, then failing with no reason; after: the composer's image tile and file row, and the empty file refused with its reason in the answer's alert while the others are kept, after
After a reload: the image comes back as a tile, and a file whose contents were lost shows Attach again in its row new After a reload: the image comes back as a tile, and a file whose contents were lost shows Attach again in its row, after
Clicking the image tile opens it in the composer's image viewer new Clicking the image tile opens it in the composer's image viewer, after
Clicking the markdown file opens the composer's file preview new Clicking the markdown file opens the composer's file preview, after
Dragging files over the reply shows the composer's Drop files to attach highlight around the whole reply new Dragging files over the reply shows the composer's Drop files to attach highlight around the whole reply, after
  • Row 02 is the base-attached answer opened in the head build after a reload: the empty file that base accepted is now a lost marker. Rows 01, 03, 04 and 05 come after clearing it and attaching the same three files again.
  • The drag in row 05 was dispatched with a file DataTransfer, since the Browser panel can't drag from the desktop.
  • The pinned ask, the storage-full badge (Inbox reply: say when an attached image won't survive a reload #1141) and the preparation hold are in the tester's captures under Live testing.

Live testing

Verdict: pass on web, in both the Inbox reply and the Captain's pinned ask. The crew tester ran it. Reports: artifacts/test-reports/inbox-reply-strip/6501bcb050.md, plus 2806f57dfe.md for the rebase.

Which commit each part ran at:

  • 578f432: HEIC conversion.
  • 8181762: the full run of preparation, interrupted upload and retry, reload, restored video and drop.
  • 6501bcb: repeated the batch with the empty-file alert, the storage-full badges, the Inbox preparation hold, the pinned-ask drop and previews, a restart, and delivery on both surfaces.
  • 2806f57, the head: a re-smoke after the rebase onto feat(web): Inbox replies are typed in the composer's editor #1184's f10bdcb. A real ask was answered with two lines, an image and a file, using Enter under the default setting. The ask closed, and the stored text, both attachments and the delivery were checked.

Between those commits only rebases and the reviewed fixes changed, so not every unchanged path was rerun at every head (the tester's call, agreed).

What passed, on both surfaces:

  • Batches and conversion. A valid image and file plus an empty file: the empty one is refused with its reason in the answer's alert. HEIC is converted, and an image over 10 MiB is shrunk.
  • Previews. Image and file previews open.
  • Upload failure. A real interrupted XHR shows the failure, and retry succeeds.
  • Reload. Images come back. A lost file shows "Attach again", and re-picking it takes its original slot, with no duplicate and nothing left blocking. A restored MP4 plays.
  • Drop. The highlight shows, and a drop on the pinned ask goes to the answer only, not the Captain's composer.
  • Storage full. Real localStorage-full warning badges (Inbox reply: say when an attached image won't survive a reload #1141).
  • Preparation. Answer is held with its reason while an image prepares, and the native send can't leave the image out.
  • Delivery. Real Claude Haiku 5.5 answers carried an image and a file on both surfaces.

Not exercised live:

  • The desktop app (Electron).
  • An OS-native drag: drops were dispatched with a DataTransfer.
  • Natural network timing: the upload progress was held at 39% deliberately.
  • An upload failure from a stopped server or a revoked grant: an aborted XHR was used instead.
  • The wording of the pinned ask's retry tooltip, which wasn't read.

The tester's captures: the same ask data, viewport and theme on base (#1184) and head. The Inbox is scrolled to keep its taller after-state in view. Rows 07 and 08 are from 8181762.

Before After
Inbox reply with an empty file in a valid batch Inbox reply with an empty file in a valid batch, before Inbox reply with an empty file in a valid batch, after
Inbox reply attachment detail Inbox reply attachment detail, before Inbox reply attachment detail, after
Pinned reply with an empty file in a valid batch Pinned reply with an empty file in a valid batch, before Pinned reply with an empty file in a valid batch, after
Pinned attachment intake detail Pinned attachment intake detail, before Pinned attachment intake detail, after
Pinned image persistence warning with storage full new Pinned image persistence warning with storage full, after
Inbox image persistence warning with storage full new Inbox image persistence warning with storage full, after
Interrupted upload offers retry with its reason new Interrupted upload offers retry with its reason, after
Answer waits while a HEIC image prepares new Answer waits while a HEIC image prepares, after

Videos.

Before (base): dropping a file on the reply shows no highlight.

pinned-reply-attachment-drop-before-public.mp4

After: the drop highlight, the image viewer and the file preview.

pinned-reply-attachment-drop-and-previews-after-public.mp4

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior: AnswerAttachments.browser.test.tsx checks that a batch with an empty file keeps the others with the reason, and that a re-picked file takes its marker's place. It also covers Inbox reply: say when an attached image won't survive a reload #1141's badge on an image a reload would lose; that test fails before this change. Further cases: an answer is held while an image is preparing, and a video restored without bytes is a file row with no dead Play tile.
  • UI changes: captures above, including the pinned ask, plus before/after videos
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: none edited
  • Upstream product: no change to what upstream's product does
  • Surfaces:
    • Entry points: the Inbox reply and the Captain's pinned ask; paste, drop and the attach button.
    • Clients: web and desktop. Mobile's composer parts are shelved by the design.
    • Contracts: none.
    • Connection modes: uploads go to the ask's own server.
  • Docs: covered by Inbox mirrors the thread: definition, user docs and a What's new highlight #1178 (Captain-owned)

Claude Opus 5.5 in Claude Code (J5 Code crew, web-builder seat)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 23, 2026 3:05am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 7 billable files and costs up to $1.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 47 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 58 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f10bdcb and 2806f57.

Files selected for processing: 7

  • apps/web/src/j5/a2a/AdjudicationDock.tsx
  • apps/web/src/j5/a2a/AnswerAttachments.browser.test.tsx
  • apps/web/src/j5/a2a/AnswerAttachments.tsx
  • apps/web/src/j5/a2a/AnswerErrorAlert.tsx
  • apps/web/src/j5/a2a/HumanInboxPage.tsx
  • apps/web/src/j5/a2a/answerAttachments.logic.test.ts
  • apps/web/src/j5/a2a/answerAttachments.logic.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
@github-actions github-actions Bot added the size:XL 500-999 effective changed lines (test files excluded in mixed PRs). label Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
@Jacksondr5
Jacksondr5 force-pushed the j5code/inbox-reply-strip branch from 8181762 to 6501bcb Compare November 23, 2026 02:39
@Jacksondr5
Jacksondr5 force-pushed the j5code/inbox-reply-strip branch from 6501bcb to d17b354 Compare November 23, 2026 02:57
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 and others added 3 commits November 22, 2026 22:04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…awn around it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns its upload, and file errors use the answer's alert

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jacksondr5
Jacksondr5 force-pushed the j5code/inbox-reply-strip branch from d17b354 to 2806f57 Compare November 23, 2026 03:04
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
@Jacksondr5
Jacksondr5 merged commit 894c19e into j5/main Nov 23, 2026
34 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/inbox-reply-strip branch November 23, 2026 03:26

This branch was successfully deployed

1 active deployment
Preview — 2806f57d Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inbox: reply attachments use the composer's attachment strip and intake Inbox reply: say when an attached image won't survive a reload

1 participant