feat(app): add mobile image preview and save gestures#2342
Open
po1arbear wants to merge 2 commits into
Open
Conversation
po1arbear
marked this pull request as ready for review
July 23, 2026 06:25
Contributor
|
| Filename | Overview |
|---|---|
| packages/app/src/images/save-to-library-core.ts | Adds URI classification, data-image materialization, remote download normalization, and temporary-file cleanup for photo-library saves. |
| packages/app/src/images/save-to-library.native.ts | Implements the native filesystem and media-library adapter, including base64 writes and platform-aware permission handling. |
| packages/app/src/components/zoomable-image.native.tsx | Implements native pinch, pan, double-tap, long-press, measurement, and image-generation handling. |
| packages/app/src/components/zoomable-image-geometry.ts | Adds pure contained-image pan-bound and focal-translation calculations. |
| packages/app/src/components/attachment-lightbox.tsx | Integrates zoomable previews and native save feedback into the existing lightbox. |
| packages/app/src/components/message.tsx | Makes resolved assistant Markdown images pressable and connects them to preview and save behavior. |
| packages/app/app.config.js | Configures the Expo media-library plugin with save-only photo permissions. |
Sequence Diagram
sequenceDiagram
participant U as User
participant I as Assistant image
participant L as Lightbox
participant S as Image saver
participant P as Photo library
U->>I: Tap
I->>L: Open preview
U->>L: Pinch, pan, or double-tap
U->>I: Long press
I->>S: Save URI and MIME type
S->>S: Materialize or download if needed
S->>P: Save image
S-->>U: Pending, success, or error feedback
Reviews (5): Last reviewed commit: "feat(app): add mobile image preview and ..." | Re-trigger Greptile
po1arbear
force-pushed
the
codex/mobile-image-preview-download
branch
5 times, most recently
from
July 24, 2026 01:18
4abbc22 to
7701948
Compare
Open assistant images in a full-screen preview with double-tap, focal-point pinch zoom, and bounded panning. Save local, remote, and data images to the system photo library with platform-aware permissions, format preservation, cleanup, and localized status feedback.
po1arbear
force-pushed
the
codex/mobile-image-preview-download
branch
from
July 24, 2026 01:49
7701948 to
1dc08eb
Compare
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.
Summary
Root cause
User image attachments already used the lightbox, but images returned by assistants were rendered as plain React Native
Imageelements. They had no press or long-press behavior, so mobile users could neither inspect the full-resolution image nor save it.User impact
Assistant-returned images now follow standard mobile gallery behavior. A tap opens an immersive preview, zoom gestures keep the selected detail under the user's fingers, and a long press saves the image to Photos/the system gallery. The same save interaction also works from the existing attachment lightbox.
Validation
npm run build:app-depsnpm run build --workspace=@getpaseo/servernpm run lintnpm run typechecknpx vitest run packages/app/src/images/save-to-library-core.test.ts packages/app/src/components/zoomable-image-geometry.test.ts packages/app/src/components/attachment-lightbox.test.tsx packages/app/src/i18n/resources.test.ts --bail=1(60 tests)npm run format:checknpx expo config --type public --json