Repository navigation
fix(mobile): show embedded images in Markdown previews - #31304
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ebbbef31-82f5-4ec7-9264-aea8d9c2da03
📒 Files selected for processing: 11
mobile/src/components/MobileMarkdown.rendering.test.tsxmobile/src/components/MobileMarkdown.tsxmobile/src/components/mobile-markdown-blocks.tsxmobile/src/files/MobileFileMarkdownPreview.test.tsmobile/src/files/MobileFileMarkdownPreview.tsxmobile/src/files/MobileFilePreviewBody.tsxmobile/src/files/MobileFilePreviewScreen.tsxmobile/src/files/MobileMarkdownPreviewImage.test.tsxmobile/src/files/MobileMarkdownPreviewImage.tsxmobile/src/files/mobile-markdown-image-source.test.tsmobile/src/files/mobile-markdown-image-source.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Markdown file previews replaced embedded images with alt-text links, hiding screenshots and diagrams that are essential to reading project documentation. Standalone images now render in the document and expand in the existing full-screen image viewer.
Relative image paths resolve from the document directory and use the existing workspace
files.readPreviewRPC, including on headless and remote hosts. Unsupported/outside-workspace paths are refused; failed loads offer Retry. Terminal artifact grants are not reused. Public HTTP(S) image URLs use the native image loader.Related to #24468; this change covers Markdown file previews.
Reproduction: open Files →
architecture.mdcontaining. Before: only the alt-text link appears. After: the diagram is visible within the document.Validation: native iPhone simulator before/after and full-screen expansion; 49 focused tests; mobile typecheck; production mobile bundle build; changed-code quality gate.
Before / after:
Credit to @dudupii for reporting and diagnosing #24468 and implementing the broader image solution in #24469. I reviewed that PR's authored-source/display-source separation, paired-host image reads, file-preview rendering, and zoom scope. Related editor integration remains in #25594, which preserves @dudupii's authored commit. This PR independently covers standalone images in the read-only file preview and its existing full-screen viewer; editor image serialization, inline images, and pinch zoom remain separate. #24468 stays open for that broader editor/device scope.