fix(web): keep chat media at a stable size while it loads - #9938
Merged
Merged
MacroscopeApp / Macroscope - Correctness Check
succeeded
Sep 5, 2026 in 1m 55s
No issues identified (3 code objects reviewed).
• Reviewed files modified since
03a9de5; other PR files not modified since then were skipped.
• Merge Base:363cde4
• Head:6d6472c
Details
| ✅ | File Path | U3 Bytes | Comments Posted | Reason |
|---|---|---|---|---|
| ➖ | apps/web/src/components/ChatMarkdown.workspace-images.test.tsx |
572 | Excluded by default ignore patterns | |
| ✅ | apps/web/src/components/ChatMarkdown.tsx |
2309 | 0 |
Billed Total: 10.00KB of diff | $0.50 (This review was charged at our per-review byte minimum of 10.00KB. Learn more here)
Filtered Issues Details
apps/web/src/components/ChatMarkdown.tsx
- line 1461: While a standalone image is loading, the hidden
<img>at this line does not receiveprops.imageProps. Consequently authored image attributes such asalign(explicitly included inimagePropsfor layout) are absent from the loading frame; e.g. a standalone<img align="left">does not float untilonLoadreplaces the frame with the settled image, producing incorrect alignment and an additional layout shift. [ Already posted ] - line 2996: When a workspace asset's signed URL is renewed after it has decoded, this new
ChatMarkdownAssetImagepath keeps the existingloadedSrcbut passes the new non-nullsrc.ChatMarkdownImagetherefore considers it settled and immediately replaces the visible<img>source with the not-yet-loaded URL, rather than retaining the decoded bitmap while the replacement downloads. Signed-URL refreshes can consequently show a blank/broken image during loading, defeating the intended no-flicker behavior. [ Already posted ]
Loading