Repository navigation
fix(mobile): reuse gallery resources for workspace image taps - #40576
juliusmarminge merged 6 commits into
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
ThreadMarkdownImage already treats a missing srcFragment as empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…hows-the-same-workspace-ima
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidencePooled iPhone 18 Pro, iOS 27.2, same viewport and appearance. Each commit used its own fresh server database and Metro bundle. Synthetic workspace PNGs and the exact assistant Markdown reply were seeded through the scenario helpers and replay provider. Open the thread, tap red, then swipe left once. Base repeats red; head advances directly to blue.
Directly tapping blue on head also selects page 2 of 2: recording. |




Mobile chat built different resource identities for a tapped workspace image and its gallery entry, creating an extra page. Thumbnails and gallery entries now use the same resolved resource, so the gallery opens on the tapped image in message order and preserves its URL fragment.
Fixes #40575
Reproduction on main
Commit da57ea2bf9 (main). The gallery opens at 1 of 3 and the first swipe advances to a second copy of the red image. The cause is at
apps/mobile/src/lib/filePreviewGallery.ts:8. Followed the steps under Evidence in the app on iPhone 18 Pro (iOS 27.0): With two synthetic workspace PNGs and the exact Markdown supplied by a replay, tapping the red image opened the viewer at 1 of 3. One left swipe advanced to 2 of 3 and showed the same red image again.Evidence
Environment: iPhone 18 Pro, iOS 27.0, iOS Simulator on macOS
Steps:
3. Tap the red image in the final reply.
4. Swipe left once in the full-screen viewer.
Proven: the bug shows on main at da57ea2bf9 and no longer shows on head 145b323f90.
Tests
pnpm exec vp test run apps/mobile/src/lib/filePreview.test.ts -t 'one page per workspace image'passed on head.pnpm exec vp run check:changedpassed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol and Claude Opus 5.5