Repository navigation
Fix OOM in ReceiptPreviews and ReceiptCell - #98769
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7e98596de
ℹ️ 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".
|
|
||
| function ReceiptPreviewItem({item, isInLandscapeMode}: ReceiptPreviewItemProps) { |
There was a problem hiding this comment.
Extracted this into a separate component to use hooks.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-08-25.at.8.15.56.PM.movScreen.Recording.2026-08-25.at.8.20.25.PM.movoffline:
iOS: mWeb SafariMacOS: Chrome / Safari |
|
@QichenZhu It's loading forever after selecting 30 receipts. I use iPhone 17 ios 26.5 simulator.
|
|
@eh2077, are there any console errors? How long does it take to load on |
|
@eh2077 the PR branch and main take about the same time. pr.movmain.mov |
|
@QichenZhu thanks! I'll retest it |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny 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/mountiny in version: 9.4.61-0 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR against Expensify's help site content under There is no user-facing behavior change: no new feature, setting, tab, button, or workflow. The receipt scan and preview flows behave identically from a user's perspective — the only difference is under-the-hood image handling. Help site articles document user-facing features and workflows, none of which are affected here. Because no changes are required, I did not create a draft docs PR. @QichenZhu, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR (Note: no linked help site PR was created, since no documentation updates were needed for this internal fix.) |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.61-4 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
Prevent
ReceiptPreviewsandReceiptCellfrom loading the original local file when the thumbnail is not ready, which can cause OOM.Fixed Issues
$ #93846
PROPOSAL:
Tests
This PR focuses on the Sentry crash on iOS HybridApp only. For mWeb, Web, and Android, just test the normal expense creation flow.
Precondition: download the HEIC image from #68778 (comment), duplicate it 30 copies, and import them into iOS
Offline tests
N/A.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionhttps://expensify.slack.com/archives/C049HHMV9SM/p1778663561704459
https://expensify.slack.com/archives/C049HHMV9SM/p1783323431995659
Avatar, 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.N/A. This needs to be tested on physical devices.
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-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios-native.mov
Screen.Recording.2026-08-20.at.9.28.17.PM.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
mac-web.mov