Skip to content

Commit 5b74e4b

Browse files
ahalekellyclaude
andcommitted
fix(mobile): the tapped composer image opens the picker's original too
The strip's initial full-screen source now uses previewUri like the rest of the gallery, and the gallery test pins previewUri over dataUrl. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 55c48b7 commit 5b74e4b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/mobile/src/components/ComposerAttachmentStrip.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function ComposerImageAttachment(
148148
? { kind: "image", attachment, name: attachment.name, sourceIdentifier }
149149
: {
150150
kind: "image",
151-
uri: attachment.dataUrl ?? attachment.previewUri,
151+
uri: attachment.previewUri,
152152
name: attachment.name,
153153
sourceIdentifier,
154154
},

‎apps/mobile/src/lib/filePreviewGallery.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ describe("image preview groups", () => {
2020
name: `${id}.png`,
2121
mimeType: "image/png",
2222
sizeBytes: 3,
23-
previewUri: `data:image/png;base64,${id}`,
23+
previewUri: `file:///picker/${id}.png`,
24+
dataUrl: `data:image/png;base64,${id}`,
2425
...(fileBacked ? { fileUri: `file:///documents/${id}.png` } : {}),
2526
}));
2627
const delivered = (id: string) =>
@@ -64,6 +65,7 @@ describe("image preview groups", () => {
6465
expect(result.map(filePreviewKey)).toEqual([...new Set(gallery.map(filePreviewKey))]);
6566
}
6667
expect(composerImageGallery(attachments)).toEqual(local);
68+
if (!fileBacked) expect(local[0]).toMatchObject({ uri: "file:///picker/a.png" });
6769
},
6870
);
6971

0 commit comments

Comments
 (0)