Repository navigation
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0ce58a8b6
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 858832d8f4
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95ad1748f0
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5a8fcd368
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb309633fe
ℹ️ 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".
|
@codex review |
|
@MelvinBot review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a5679ec4e
ℹ️ 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".
|
🤖 Code review — the approach (fire-and-forget 1. The replace-receipt flow probably never gets the upgrade — but still pays the delay
So on the one flow you added 2. Deferring
|
# Conflicts: # src/libs/ReceiptStorage/index.native.ts # src/libs/prepareRequestPayload/index.native.ts
|
From AI analysis: 1. Scanned receipts are less detailed on iPhone when you submit straight away iOS only. Needs this build and the current production App Store build.
Expected: small print equally legible in both builds. Submitting immediately is required: the fast capture is uploaded before the full-resolution replacement lands, and it is the fast capture whose quality dropped. Pausing on the confirmation screen hides it. Scanning two receipts in quick succession also triggers it.
Fix: keep the iOS 2. With rotation lock on, a sideways-held receipt is saved on its side Both platforms. Needs this build and the current production build.
Expected: receipt upright and readable, as on production. On iPhone this also happens with the flash off. Turning rotation lock off makes it go away on both platforms.
Fix: revert to the default, or, if the trade-off against the flat-hold case is intended, say so in the comment — rotation lock is a common setting and this is the scenario it breaks. 3. After ~50 scans in one sitting, early receipts go back to looking blurry One continuous session. Don't force-quit or restart the app, or the counter resets.
Expected: still the sharp version from step 3. Tapping Submit, or backing out before the picture sharpens, cancels the improvement for that receipt so it won't count toward the 51.
Fix: |
|
@OlimpiaZurek Can you please try to reproduce #100592 (comment) on your side? Bug #2 is true on android orientation-locked, flash-on but not blocker since already happening on main when flash-off. |
|
Bug: scan expense is not created. stuck on confirmation screen after tapping "Create expense" button. Not consistently reproducible. bug.mp4 |
Final reviewVerdict: No blockers. The claim/swap coordination holds up, CI is green, and earlier review threads are resolved. I recommend one fix before merge (1) and a few small cleanups. Regressions
Code quality
Checked and sound
I didn't test this in the app. The change is native-only, and this run could only test on web. |
I was able to reproduce it, but not consistently. It shows up when the sharper photo replaces the snapshot. On Android the snapshot is a screenshot of the camera preview, and the full photo frames the scene slightly differently, so the same receipt sits a few pixels off. It happens once per scan, and the image stays still afterwards. I tried expo-image's transition to soften it, but on Android it fades in from blank, which looked worse, so I left it as it is. |
Yes, that's the trade-off of |
I couldn't reproduce it on my side. I'm also not sure it's related to these changes, since this PR doesn't touch the submit or location flow. |
|
Looks like no blockers remaining. |
|
🚧 Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 Julesssss 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/Julesssss in version: 9.5.7-0 🚀
|
|
No help site update needed. This PR improves the quality of scanned receipt photos in the background without changing any step, label, or workflow, so no sentence in an existing article is now incorrect. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.5.7-3 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
In the common case, portrait with flash off, the app doesn't take a photo.
captureReceiptcallstakeSnapshot, which saves the frame the preview is already showing, so the receipt misses exposure metering, per-shot focus and multi-frame stacking. That's the quality users are reporting.Going back to
takePhotofor that path would undo the latency win from #84951, #90774.This keeps both. At the shutter,
takeSnapshotruns as it does today and navigation happens on it, so the shutter feels the same.takePhotoruns alongside it, awaited by nothing, and when it lands it's rotated upright and written over the receipt file under the same filename.The rest is the coordination that makes replacing a file under a live receipt safe:
receiptUpgrades, keyed by durable name.takePhoto, so a second one started over a capture still running made the two contend and the nexttakeSnapshotpaid for it. A shutter that would stack captures keeps its snapshot.takePhotowithCamera is closed.canUpgradeReceiptQuality.ReceiptStoragegainedoverwrite, which swaps a receipt's bytes under the same name and puts the original back if the swap fails.Flash and landscape captures already use takePhoto, and get no upgrade. On iOS they now take a 12 MP photo instead of ~3 MP, because the camera format is set once per session( That's about 2% of iOS captures) . Picking 12 MP only when an upgrade can run would reconfigure the session whenever flash or orientation changes. Multi-scan gets no upgrade and is otherwise unchanged.
Also added a telemetry span.
ManualReceiptUpgraderecords how each attempt ended inupgrade_outcome, with the resolution on the upgraded case, andupgrade_attemptedonManualReceiptCaptureMeasurements(debug build)
The upgrade costs 16ms, 2.1%. It does not slow the camera:
ManualReceiptCapturestayed flat at 109-118msFixed Issues
$ #99615
#83503
Tests
Offline tests
QA Steps
Same as tests.
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari