Repository navigation
fix(mobile): iPhone chat pictures were empty gray boxes - #9087
michaelmonetized wants to merge 1 commit into
Conversation
Chat markdown like  was handed to iOS Image as a relative path. The phone cannot load files off the host machine that way, so users got empty boxes. Pass the app image renderer into the iOS markdown tree, skip Image for workspace paths, and load signed asset URLs with expo-image.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a focused iOS image bug fix, but it also propagates the host renderer into existing rich-markdown paths, activating signed workspace-asset resolution, caching, previews, and a new native image-loading path. That production behavior change is non-trivial enough to warrant human review. You can add or adjust custom eligibility rules. Learn more. |
|
Note This comment is posted by Julius' dot The second image shows loaded pictures, but the description says an after screenshot could not be captured without an iOS Simulator. Which client and PR build produced that image, and was the changed iOS rendering path exercised? Please report the focused test commands and results too, so the supplied verification can be matched to this fix. |
|
Note Written by Hi! We are cleaning up open PRs, and this one appears to have been created with an older model ( |
What Changed
Pictures in iPhone chat were empty gray boxes.
The phone was trying to open a computer file path like
media/shots/poster.pngas if that file already lived on the phone. It does not. So you got a blank box with the caption under it.This change:
expo-imageinstead of hiding a React NativeImageat opacity 0 (iOS often never paints that).Why
A real thread looked like this:
Web can ask the T3 server for that file. The iPhone was skipping that step and drawing an empty 16:9 box.
UI Changes
Before: chat pictures on iPhone are empty rounded gray rectangles. The caption still shows.
After: the phone asks the server for the picture, then draws it.
I could not take an after screenshot here. This machine has no iOS Simulator. The tests cover the path (
media/shots/poster.pngis a workspace file, and those image paragraphs stay in the rich markdown chunk the host renderer owns).Checklist
Built with Grok 4.6 in T3 Code.
Note
Low Risk
Scoped to iOS markdown image rendering and thread list refresh keys; no auth or data-model changes, with regression tests added.
Overview
Fixes empty gray image placeholders in iPhone chat when markdown uses workspace-relative paths (e.g.
media/shots/poster.png) instead of direct URLs.On iOS native markdown,
renderImageis threaded fromSelectableMarkdownTextthroughNativeMarkdownBlockso the thread feed’s signed-URL renderer runs for images in lists, blockquotes, and mixed paragraphs—not only via context. The fallbackImagepath is restricted to http(s), data, blob, and protocol-relative URLs; other hrefs show an explicit “Image unavailable” placeholder instead of a broken 16:9 box.In the thread feed, markdown image loading switches to
expo-image(with disk cache) and drops the opacity-0 loading trick that often never painted on iOS.LegendListextraDatanow includesenvironmentIdandworkspaceRootso rows refresh when workspace image resolution changes.Tests cover workspace image paragraphs staying in rich markdown chunks and
classifyMarkdownImageSourcebehavior for nested workspace paths vs blocked bare paths.Reviewed by Cursor Bugbot for commit 3b357f6. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix empty gray image boxes in iPhone chat by switching to
expo-imageand propagatingrenderImageImagewithexpo-imageinThreadMarkdownImageRequest(ThreadFeed.tsx), settingcachePolicyto memory-disk andcontentFitto contain. The image renders at full opacity with a loading overlay instead of being hidden during load.renderImageprop that flows throughNativeMarkdownBlock,NativeMixedParagraph,NativeList,NativeMarkdownImage, andSelectableMarkdownTextso the host can control image rendering (NativeMarkdownBlock.ios.tsx).DIRECT_MARKDOWN_IMAGE_HREF_PATTERNto block non-direct hrefs (anything not http(s), data, blob, or protocol-relative) in the fallbackImagepath; those now render a placeholder labeled "Image unavailable".renderImagehandles them.ThreadFeedaddsenvironmentIdandworkspaceRoottolistAppearanceDataextraData, so rows depending on those values re-render on change.Macroscope summarized 3b357f6.