Registry Mirror
Skip to content

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Owner-approved design (.product/approved/inbox-image-viewer, "A · Peek").

What changed

  • Images in a message open in the same file viewer as attached files: full screen, with the comment box, Mark up, Actual size and Download. Enter or Space on an image opens it too.
  • One order for the thread: per message, the images in its text in text order, then its attached files. ] [ and the arrows step through all of it, with the same guards, end note ("Last file in this thread"), unsaved-comment question, one Back to the thread, and a spoken step.
  • The peek replaces the stepper's list: a picture list above the bar, one row per message, the open file ringed, comment counts and paperclips. ← → ↑ ↓ Home End while it is open, Enter opens, Esc or Tab closes, and focus returns to the pill. On a phone the count opens it as a bottom sheet, three across.
  • The store copies each image a message shows when the message lands, under the image route's rules (in the project or the worktree it was sent from, image by bytes, 10 MB / 50 MP, O_NOFOLLOW plus dev/ino). Each copy is recorded on the message as inline_images, which uses the attachment record plus ref. A message sent before this gets its copies on the first read of its thread, marked captured: "on_open". Comments, the export (path plus the message it was in), "Changed since sent" with the sent version, Open in, the door and the deletion sweeps all go through the attachment code.
  • Plan review and annotate get the light version: full screen, ← → across the document's images, "2 of 4 · in “Options”", and the same peek. They have no pen and no comments.

Wire: inline_images is additive, on the message and on GET threads/:id/attachments, and never inside attachments. Older phone apps draw nothing extra. Documented in adr/implementation/inbox-mobile.md (7.14). The @plannotator/ui changes are additive (ImagePeek, ImageLightbox images, Viewer onImageClick / imageLightboxStepping) and noted in packages/ui/HANDOFF.md. The guides.show manifest is regenerated because its CSS picked up the new Tailwind classes.

Tested

  • Server and store: packages/server/inbox-inline-images.test.ts covers capture, keying, the caps, changed since sent, capture on first read, annotations and the deletion sweep. There is a door case in inbox-devices.test.ts, and a thread-state model property in store.test.ts shows that capture on open changes nothing the model sees and replays the same.
  • DOM: inlineImages.test.tsx (opening from the body), attachmentStepping.test.tsx (peek keys, focus return, the phone sheet, inline-before-attached order), and ImageLightbox.test.tsx (the light version).
  • e2e on the compiled binary: tests/e2e/inbox-image-viewer.spec.ts runs in desktop Chromium, on an iPhone in WebKit, and on annotate's light version. The full Inbox e2e suite passes (268), as do the full bun test suite and the CI DOM list.

@backnotprop
backnotprop merged commit e375bcd into main Oct 15, 2026
32 checks passed
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