Skip to content

feat(web): add evidence image lightbox with gallery grid and fullscreen navigation#470

Open
arielshad wants to merge 15 commits intomainfrom
feat/evidence-image-lightbox
Open

feat(web): add evidence image lightbox with gallery grid and fullscreen navigation#470
arielshad wants to merge 15 commits intomainfrom
feat/evidence-image-lightbox

Conversation

@arielshad
Copy link
Copy Markdown
Contributor

Summary

  • Evidence thumbnail gallery: Transforms the evidence section in the merge review drawer from a flat expandable list into a 3-column square thumbnail grid for image evidence, with non-image evidence (video, test output, terminal) continuing to render as expandable list items below
  • Fullscreen lightbox dialog: Clicking any thumbnail opens a fullscreen lightbox overlay (Radix Dialog, bg-black/90) with the image at natural aspect ratio (object-contain, up to 90vh), prev/next navigation buttons, keyboard arrow key support, wrap-around navigation, image counter, truncated description, and download button
  • Zero new dependencies: Built entirely from existing Radix Dialog primitives, Lucide icons, and Tailwind CSS, following the established InlineAttachments fullscreen dialog pattern

What Changed

File Change
src/presentation/web/components/common/evidence-lightbox/ New lightbox component with dialog, navigation state, keyboard handling
src/presentation/web/components/common/evidence-lightbox/evidence-lightbox.stories.tsx Storybook stories: Default, LightboxOpen, SingleImage, ManyImages, MixedEvidence
src/presentation/web/components/common/merge-review/merge-review.tsx EvidenceList separates images into gallery grid vs non-image expandable list
src/presentation/web/components/common/merge-review/merge-review.stories.tsx Updated stories with evidence data including image and non-image types
tests/unit/presentation/web/components/common/evidence-lightbox/ 28 unit tests covering rendering, navigation, keyboard, gallery grid, mixed types

Evidence

Gallery Grid

Evidence thumbnail gallery grid

Lightbox Open

Fullscreen lightbox dialog

Lightbox Navigation

Lightbox after navigation

Storybook Stories

Story Screenshot
Default Gallery Default
Lightbox Open LightboxOpen
Single Image SingleImage
Many Images ManyImages
Mixed Evidence MixedEvidence
MergeReview Integration WithEvidence
MergeReview ReadOnly ReadOnly

Tests

  • 28 unit tests passing across 2 test files (evidence-lightbox + evidence-list-gallery)
  • Full suite: 4777 tests passing across 350 files, zero failures

Test plan

  • Unit tests: 28 tests covering dialog rendering, bottom bar controls, prev/next navigation, keyboard navigation, wrap-around, thumbnail gallery grid, mixed evidence types, single image behavior, lightbox integration
  • Full regression: 4777 tests passing, zero failures
  • Storybook stories: Default, LightboxOpen, SingleImage, ManyImages, MixedEvidence
  • Manual verification: Gallery grid, lightbox open/close, navigation, keyboard arrows, download button
  • Build: Clean compilation with zero errors
  • Lint: Zero warnings or errors

🤖 Generated with Claude Code

arielshad and others added 12 commits March 24, 2026 00:55
…mage lightbox

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rd support

New standalone EvidenceLightbox component in common/evidence-lightbox/ that
displays evidence images in a fullscreen Radix Dialog with prev/next navigation,
keyboard arrow support, wrap-around, image counter, description, and download
button. Includes 20 unit tests covering all functionality.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split EvidenceList into image gallery grid and non-image expandable list.
Image evidence renders as a 3-column CSS grid of clickable square thumbnails
that open the EvidenceLightbox component. Non-image evidence continues to
render as expandable EvidenceItem entries below the gallery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Stories cover: default gallery grid, lightbox open state, single image,
many images, mixed evidence types, and controlled lightbox. Uses a
GalleryWithLightbox wrapper to demonstrate thumbnail grid + lightbox
integration matching EvidenceList behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Increase timeouts for feature-create-drawer repository selector tests
that use userEvent.type() with multi-character strings. Also fix
port.service test to use toBeGreaterThanOrEqual instead of exact port
match, since port availability depends on host environment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Dev Release Published

Artifact Version Install
npm 1.149.1-pr470.181ab7c npm install -g @shepai/cli@1.149.1-pr470.181ab7c

Published from commit daa4043 | View CI

@arielshad arielshad force-pushed the feat/evidence-image-lightbox branch from daa4043 to a77b221 Compare March 23, 2026 23:13
@github-actions
Copy link
Copy Markdown
Contributor

Dev Release Published

Artifact Version Install
npm 1.149.1-pr470.e87a8eb npm install -g @shepai/cli@1.149.1-pr470.e87a8eb

Published from commit a77b221 | View CI

Remove comment line in port.service.test.ts that conflicted with main
branch changes. Update spec yaml timestamps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Dev Release Published

Artifact Version Install
npm 1.150.1-pr470.1a21b64 npm install -g @shepai/cli@1.150.1-pr470.1a21b64

Published from commit 31ea4dd | View CI

arielshad and others added 2 commits March 24, 2026 19:26
Resolve merge conflict in port.service.test.ts by keeping the
explanatory comment from main about port occupation assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Clear SHEP_SKIP_RECOVERY env var in recoverAll tests so recovery
  logic is actually exercised when running inside a shep subprocess
- Update evidence rendering test to use getByAltText since image
  evidence descriptions are now alt text on gallery thumbnails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Dev Release Published

Artifact Version Install
npm 1.151.2-pr470.ec33cce npm install -g @shepai/cli@1.151.2-pr470.ec33cce

Published from commit 76ea425 | View CI

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