Skip to content

fix(transcript): open generated images in the lightbox on click - #183

Merged
touch2be merged 1 commit into
akemmanuel:masterfrom
touch2be:fix/generated-image-lightbox
Oct 26, 2026
Merged

touch2be merged 1 commit into
akemmanuel:masterfrom
touch2be:fix/generated-image-lightbox

Conversation

@touch2be

Copy link
Copy Markdown
Collaborator

Problem

Images created with image generation (generate_image, #176) are shown inline in the transcript, but clicking them did nothing. ToolImages rendered a plain <img> without a click handler; the lightbox was only wired up for markdown images (![alt](path)) and @image mentions.

Fix

  • Each image in ToolImages is now a button (zoom cursor, hover/focus ring, attachments.openImage label) that opens the existing ImageMentionLightbox.
  • The lightbox resolves the saved Host path through the same attachmentBaseUrl as the inline preview, so Desktop Local, Remote Hosts, and bearer-token Hosts behave like the thumbnail.
  • Escape, the backdrop, or the close button dismiss it.
  • This covers pinned generated images and images in expanded tool output (e.g. read on an image file).

Tests

  • New ToolImages.test.tsx: click opens the lightbox with the same image source and saved path; Escape closes it.
  • vp check and the message-list / MarkdownRenderer tests pass.

🤖 Generated with Claude Code

Images from `generate_image` (and other tool image output) rendered as a
plain <img> in ToolImages with no click handler, so they could not be
enlarged; only markdown images and @image mentions opened the lightbox.

Each tool image is now a button that opens the existing
ImageMentionLightbox with the saved Host path, resolved through the same
attachment base URL as the inline preview. Escape, the backdrop, or the
close button dismiss it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@touch2be
touch2be merged commit debdfd3 into akemmanuel:master Oct 26, 2026
2 checks passed
@touch2be touch2be mentioned this pull request Oct 26, 2026
2 tasks done
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