fix(web): show a preview-failed state when an image won't load - #674
Conversation
Replace the browser broken-image icon with a designed fallback, and keep signed-in React islands from blanking the rest of the shell.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-auth | ee6cdce | Commit Preview URL Branch Preview URL |
Aug 14 2026, 06:45 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-web | ee6cdce | Commit Preview URL Branch Preview URL |
Aug 14 2026, 06:46 PM |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Maintained by uploads.sh — re-uploading a file with the same name updates it everywhere it is embedded. |


In plain terms
A corrupt or unreachable image on the public file page used to show the browser’s broken-image icon. That looks like a dead page even when the file record is fine. The stage now swaps to a preview-failed state, and a render crash in the signed-in React islands no longer blanks the rest of the shell.
What it does / what it is not
/500page if the Worker itself throws, instead of a Cloudflare 1101.How to try it
The 25-byte cache probe from the original report is still live:
https://uploads.sh/f/default/gh/_cachetest/probe-1783465136.png
Locally,
pnpm dev:weband open the same path onhttp://localhost:4321— the page talks to the production API, so the broken file is the same one.Technical notes
error(orcomplete && naturalWidth === 0) on<img>/<video>. The file record can be fine while the object 404s, fails to decode, or never arrives.media-load.ts; the visible shell isMediaFallback.astro. ImagePreview and MediaStage bind directly. The gallery grid usesdata-media-load+bindMediaFallbacks.WorkspaceFileTable,ScreenshotsByPath) wrap inIslandErrorBoundary. Other account/admin pages are vanilla JS and already have per-flow error copy.<img onError>instead of a silent emptybackground-image.Test plan
pnpm --filter @uploads/web test(619 passing)/f/default/does-not-exist.png) still showsfile.not_found/500still renders the branded application-error card