Fix: show a fallback for slide thumbnails that fail to load - #366
Draft
posthog-eu[bot] wants to merge 1 commit into
Draft
posthog-eu[bot] wants to merge 1 commit into
posthog-eu[bot] wants to merge 1 commit into
Conversation
The slide grid drew a bare <img> for each thumbnail with no error handling. When a slide's media 404s - which happens while the import worker is still uploading the pages - the browser showed its broken-image icon and the user could not recover in the app. Give the image fill in FillLayer a failed state: retry the fetch a few times with a growing delay (the media may still be uploading), then fall back to a placeholder icon instead of the broken-image glyph. Skeleton grid slides whose thumbnail name is not published yet, matching the guard the renderer already applies. Generated-By: PostHog Desktop Task-Id: 72c3ca67-2298-4ee6-b30b-5837232559a2
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
<img>(FillLayer) with noonError, retry, or placeholder.medias__pdf_to_imagesworker finishes uploading the pages, so/media/processedanswers404for a few seconds. The failure is silent: a failed<img>fires no event.Changes
FillLayernow retries a failed image fetch a few times with a growing delay (the media may still be uploading), then falls back to a placeholder icon instead of the broken-image glyph. Successful loads are unchanged.ImageRenderer) already applies.Testing
FillLayercomponent test: repeated load failures drop the bare<img>and render the fallback icon; a normal load keeps the image.@repo/layoutbuild (type-checked) andplugins/slidestype-check pass.Agent context
Promise.allupload path.Created with PostHog Desktop from this inbox report.