Repository navigation
fix: sharing 10-bit hdr heic image on iOS - #101102
Conversation
|
|
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@mountiny |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3145e8482e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppIMG_2889.MP4Android: mWeb ChromeIMG_2894.MP4iOS: HybridAppIMG_2889.MP4iOS: mWeb SafariIMG_2894.MP4MacOS: Chrome / Safari2026-09-15.10.40.53.mov |
|
Okay IMG_2893.MP42026-09-15.10.39.57.movBut I think it's a separate issue And just checked |
Yeah, could you create one? I can prepare a follow-up implementation |
@MelvinBot |
Let me try 😁 |
|
Created #101177 and assigned I dug into why the two picker paths behave differently: the gallery path never sees the The document-picker path keeps the real filename, so Full details, permalinks, and two related findings (chat attachments skip the extension check entirely; view run · no recording available |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.80-0 🚀
|
|
@war-in @ZhenjaHorbach Could you please confirm if we should test this PR on Android app? "10-bit HDR HEIC attachment fails to upload" on Android app. Is this a separate issue or WAD? and1.mp4 |
I suppose yes But I think we can investigate this |
|
Yeah, we definitely should make sharing such images possible on Android too 👍 |
@MelvinBot |
|
|
@MelvinBot |
|
|
@MelvinBot |
|
Created Android - Attachment - 10-bit HDR HEIC images fail to upload (HEIC→JPEG conversion not fixed on Android) and assigned The short version of why Android is still broken: this PR's patch only touches the iOS side of Both platforms share the JS entry point at |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.80-0 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Patches
expo-image-manipulatorso HEIC→JPEG conversion works for 10-bit HDR HEICs.ImageFixOrientationTransformerbuilt itsCGContextwithbitsPerComponentcopied from the source;CGBitmapContextrejects 10 bpc, so it returned nil and threwImageContextLostExceptionevery time. Patch is expo/expo#50011 verbatim — skip the redraw when already upright, else redraw viadrawInNewContext.Credit to @rinej for #100301, which was the inspiration and early investigation behind this PR — it identified the
CGContextbit-depth mismatch as the root cause and confirmed the failure is deterministic per file rather than memory-related.Fixed Issues
$ #100133
PROPOSAL:
Tests
Pre-requisite: a 10-bit HDR HEIC. Either take a photo/screenshot on an iPhone with Settings → Camera → Formats set to High Efficiency, or use the public matrix4.HEIC sample (2752x2064, 10 bits/sample, Display P3).
Test 1 — HEIC attachment in chat
Test 2 — no regression for ordinary images and rotated photos
Offline tests
N/A
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-09-14.at.16.49.43.mov
iOS: mWeb Safari
MacOS: Chrome / Safari