feat(sessions): add image artifact viewer - #3875
Merged
Merged
Conversation
Normalize image artifact MIME types and add lightweight zoom and pan controls by extending the existing image preview primitives. Generated-By: PostHog Code Task-Id: 577e32f4-830b-4174-a9c4-efa9464652a1
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Replace the custom image gesture hook with react-zoom-pan-pinch, allow zooming out to 10%, and cover toolbar clicks and trackpad pinch behavior. Generated-By: PostHog Code Task-Id: 577e32f4-830b-4174-a9c4-efa9464652a1
Contributor
🦔 ReviewHog reviewed this pull requestFound 0 must fix, 0 should fix, 1 consider. Published 1 finding (view the review). |
Contributor
|
ReviewHog Alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏 |
Contributor
There was a problem hiding this comment.
ReviewHog Report
Changes
Issues: 1 issue
Files (5)
packages/ui/package.jsonpackages/ui/src/features/sessions/components/ArtifactPreview.tsxpackages/ui/src/features/sessions/components/artifactPreviewDocument.tspackages/ui/src/primitives/SafeImagePreview.tsxpackages/ui/src/primitives/hooks/useImagePanAndZoom.ts
Show the existing artifact preview error state when image bytes cannot be decoded. Generated-By: PostHog Code Task-Id: 577e32f4-830b-4174-a9c4-efa9464652a1
puemos
marked this pull request as ready for review
July 28, 2026 15:39
tatoalo
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Image artifacts can render blank when object storage serves them as
application/octet-stream, and the existing preview has no image navigation controls.Why: Generated images should be inspectable directly beside the task conversation without downloading them.
Changes
react-zoom-pan-pinchfor reliable controls, drag panning, and trackpad gestures, with zoom from 10% to 800%.How did you test this?
pnpm testinpackages/ui(2,295 tests)pnpm typecheckinpackages/uipnpm buildinapps/webAutomatic notifications
Created with PostHog Code