iOS: Fix cached images not displaying offline#87986
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@mkhutornyi 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] |
PR ReviewSummary: Clean extraction of image source logic into a pure, testable function. The core fix — bypassing session-expiry checks when offline so All CI checks pass. ✅ What's good
Minor observations
Neither of these are blockers for this PR. |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
trjExpensify
left a comment
There was a problem hiding this comment.
Good from product, cached images should display! 👍
|
@mollfpr, Friendly bump. thanks. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mollfpr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mollfpr in version: 9.3.61-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are needed for this PR. The fix is purely technical — it corrects the internal image source logic so cached receipt images display correctly on iOS when offline. No user-facing features, workflows, settings, or terminology were added or changed. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.3.61-4 🚀
|
Explanation of Change
This change fixes offline receipt rendering on iOS at the point where the image source is decided.
Before this update, if an attachment/receipt session had expired,
Image/index.tsxreturnedundefinedand triggered reauthentication. That was fine online, but offline, it meantExpoImagenever received a source at all, so it had no chance to reuse the already cached native image. The result was a loading state instead of the cached receipt.Now the image source decision is centralized in
getImageSource(). When the app is offline, we still pass the authenticated source with the existingcacheKeyand auth header, even if the session is stale, so native can display the cached file. When the app is online and the session has expired, the old behavior stays the same: the source is withheld, and reauthentication is triggered.Fixed Issues
$ #86666
PROPOSAL: #86666 (comment)
Tests
Offline tests
Same as Tests.
QA Steps
Same as Tests.
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
REC-2026041593430.PM.mp4
Android: mWeb Chrome
REC-2026041594238.PM.mp4
iOS: Native
REC-2026041585808.PM.mp4
iOS: mWeb Safari
REC-2026041590630.PM.mp4
MacOS: Chrome / Safari
REC-2026041580502.PM.mp4