fix(web): render stored HEIC attachments - #10429
Open
Gigioxx wants to merge 1 commit into
Open
Conversation
Contributor
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a contained web bug fix that preserves native rendering for ordinary images and adds a tested, client-side fallback for previously broken stored HEIC previews. It does not change stored data, APIs, product defaults, deployment behavior, or sensitive functionality. Not approved because:
Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more. |
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.
Stored HEIC photos uploaded from another client render as broken images on Desktop. Upload-time conversion only helps newly attached files.
Reuse the existing HEIC decoder when native image decoding fails, through one shared component used by the timeline, composer thumbnails, and lightbox. Ordinary images stay on the native path. Converted preview URLs are released on unmount, and navigation discards unfinished conversions. Stored attachments remain unchanged.
Fixes #10356.
Verified 34 focused tests, web typecheck, scoped lint, and formatting. In Chromium against an isolated server, all eight stored HEIC images went from
naturalWidth: 0to1280; lightbox navigation and a restored HEIC composer draft also rendered correctly. Web and Desktop share these components; the packaged Electron app was not rebuilt. Mobile and workspace-file previews are unchanged. React Doctor reports no compiler errors; its async-state/error-forwarding warnings remain on the cancellation-guarded fallback, whose stale-decode behavior is tested.Model: GPT-6. Harness: Codex in T3 Code.