Skip to content

feat(ui): add image lightbox for tool result screenshots#4

Merged
Vrtak-CZ merged 2 commits intocookielab:mainfrom
mvacha:feat/pictures
Feb 20, 2026
Merged

feat(ui): add image lightbox for tool result screenshots#4
Vrtak-CZ merged 2 commits intocookielab:mainfrom
mvacha:feat/pictures

Conversation

@mvacha
Copy link
Copy Markdown
Contributor

@mvacha mvacha commented Feb 18, 2026

Summary

  • Fix broken image click behavior — clicking tool result images (e.g. chrome-devtools screenshots) previously opened about:blank due to data: URLs in <a target="_blank"> links
  • Replace with a fullscreen lightbox overlay: click to view full size, click again or press Escape to dismiss
  • Animated open/close with fade + scale transition (200ms)
  • Extract ImageLightbox as a reusable component in src/frontend/components/ui/ for future use

Test plan

  • Open a session containing tool result images (e.g. take_screenshot from chrome-devtools)
  • Click a thumbnail — verify fullscreen lightbox opens with animation
  • Click the backdrop or press Escape — verify lightbox closes with animation
  • Verify no about:blank tabs are opened
  • Run bun run check && bun run typecheck && bun test — all pass

🤖 Generated with Claude Code

mvacha and others added 2 commits February 18, 2026 17:00
Replace broken <a target="_blank"> links (which opened about:blank for
data: URLs) with a fullscreen lightbox overlay. Click any tool result
image to view it full size; click again or press Escape to dismiss.
Includes fade + scale transition animation (200ms).

Extracted ImageLightbox as a reusable component in ui/ for future use.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ImageLightbox, SmartToolOutput, BashToolContent, DiffView,
  ErrorBoundary, SearchModal to architecture tree and components guide
- Add useFetch hook and format-detector util to architecture tree
- Update test count from 161/14 to 469/44 and list all test files
- Update image rendering descriptions in README and CONTENT_TYPES

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Vrtak-CZ Vrtak-CZ merged commit b126d9d into cookielab:main Feb 20, 2026
1 check 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.

2 participants