You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Odometer - Photo is not cropped after saving cropped photo #85365
Version Number: 9.3.38-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#83556 Email or phone of affected tester (no customers):applausetester+sjddjois2j1d@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #83556 - "[Odometer] Image stitching" by @jakubkalinski0 (High confidence) Related Issues: None
Recommendation: REVERT
PR #83556 introduced image stitching for odometer photos but did not implement proper crop handling for individual odometer images. The crop functionality updates the main transaction receipt instead of the individual odometer image, causing the cropped changes to be lost.
Labels: No label changes made. Both DeployBlockerCash and DeployBlocker labels were added by an Expensify org member, so per the investigation guidelines, I am not removing them. An internal engineer should review whether the DeployBlocker label is appropriate for this frontend-only issue.
📋 Detailed Analysis
Evidence
PR #83556 introduced the odometer image stitching feature which combines start and end odometer photos into a single receipt image. The PR modified:
Added src/libs/stitchOdometerImages/ library for combining images
Modified IOURequestStepDistanceOdometer.tsx to call stitching and set the combined image as the receipt
Modified TransactionReceiptModalContent.tsx to handle display of stitched receipts
The bug is reproducible on staging (v9.3.38-0) where this PR was merged, and does not exist in production where this feature does not exist.
Verification
The issue occurs in the crop flow within TransactionReceiptModalContent.tsx. When a user:
Creates an odometer distance request with both start and end photos
Proceeds to the confirmation page (images are stitched at this point)
Goes back to edit an individual photo (Start or End)
Crops the photo and clicks Save
Root Cause Location: /home/runner/_work/App/App/src/pages/media/AttachmentModalScreen/routes/TransactionReceiptModalContent.tsx lines 332-391
The saveCrop function does not have any special handling for odometer images:
When cropping an individual odometer photo (Start or End), the code calls setMoneyRequestReceipt() which updates the main transaction receipt, not the individual odometer image (odometerStartImage or odometerEndImage).
The correct behavior should be:
Call setMoneyRequestOdometerImage() to update the individual odometer image
Re-trigger the stitching logic to regenerate the combined receipt with the newly cropped image
Since the individual odometer images are not updated, the crop changes are lost. The main receipt gets temporarily replaced with just the cropped individual photo, but this is incorrect as it should be a stitched combination of both images.
Please re-state the problem that we are trying to solve in this issue.
When viewing an individual odometer photo (start or end) from the confirmation page and using the Crop tool, the crop does not persist — the photo reverts to its original uncropped state after saving.
What is the root cause of that problem?
PR #83556 introduced odometer image stitching. Individual odometer photos are stored in transaction.comment.odometerStartImage / transaction.comment.odometerEndImage, which is a different storage location than regular receipts (transaction.receipt.source).
The saveCrop function in TransactionReceiptModalContent.tsx (line 332-391) correctly crops the displayed odometer image, but then saves the result by calling setMoneyRequestReceipt(), which writes to transaction.receipt.source. It never updates the actual individual odometer image stored in transaction.comment. The correct function setMoneyRequestOdometerImage() (defined at src/libs/actions/IOU/index.ts:1662-1681) exists but is never called from saveCrop.
So the crop result is written to the wrong storage location, and the next time the odometer image is displayed, it reads from the unchanged transaction.comment.odometerStartImage/odometerEndImage — showing the original uncropped photo. The same issue applies to rotateReceipt (line 259-305).
What changes do you think we should make in order to solve the problem?
In TransactionReceiptModalContent.tsx:
saveCrop: When isOdometerImage is true, call setMoneyRequestOdometerImage(transactionID, imageType, croppedFileObject, isDraftTransaction) instead of setMoneyRequestReceipt(). After updating the individual image, trigger re-stitching of the two images so transaction.receipt.source (the combined receipt) also reflects the crop.
rotateReceipt: Apply the same odometer-aware logic — when isOdometerImage is true, save the rotated result via setMoneyRequestOdometerImage() and re-stitch.
What alternative solutions did you explore? (Optional)
An alternative would be to hide the Crop/Rotate buttons entirely for individual odometer images (similar to how they're already hidden for the stitched receipt via isStitchedOdometerReceipt). However, this removes useful functionality rather than fixing it, and the bug report clearly shows users expect to be able to crop these photos.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@situchan / @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
changed the title [-][Due for payment 2026-03-30] [$250] Odometer - Photo is not cropped after saving cropped photo[/-][+]Odometer - Photo is not cropped after saving cropped photo[/+]on Mar 23, 2026
Activity
melvin-bot commentedon Mar 16, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #83556
melvin-bot commentedon Mar 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 16, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Mar 16, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #83556 - "[Odometer] Image stitching" by @jakubkalinski0 (High confidence)
Related Issues: None
Recommendation: REVERT
PR #83556 introduced image stitching for odometer photos but did not implement proper crop handling for individual odometer images. The crop functionality updates the main transaction receipt instead of the individual odometer image, causing the cropped changes to be lost.
Labels: No label changes made. Both
DeployBlockerCashandDeployBlockerlabels were added by an Expensify org member, so per the investigation guidelines, I am not removing them. An internal engineer should review whether theDeployBlockerlabel is appropriate for this frontend-only issue.📋 Detailed Analysis
Evidence
PR #83556 introduced the odometer image stitching feature which combines start and end odometer photos into a single receipt image. The PR modified:
src/libs/stitchOdometerImages/library for combining imagesIOURequestStepDistanceOdometer.tsxto call stitching and set the combined image as the receiptTransactionReceiptModalContent.tsxto handle display of stitched receiptsThe bug is reproducible on staging (v9.3.38-0) where this PR was merged, and does not exist in production where this feature does not exist.
Verification
The issue occurs in the crop flow within
TransactionReceiptModalContent.tsx. When a user:Root Cause Location:
/home/runner/_work/App/App/src/pages/media/AttachmentModalScreen/routes/TransactionReceiptModalContent.tsxlines 332-391The
saveCropfunction does not have any special handling for odometer images:Root Cause
When cropping an individual odometer photo (Start or End), the code calls
setMoneyRequestReceipt()which updates the main transaction receipt, not the individual odometer image (odometerStartImageorodometerEndImage).The correct behavior should be:
setMoneyRequestOdometerImage()to update the individual odometer imageSince the individual odometer images are not updated, the crop changes are lost. The main receipt gets temporarily replaced with just the cropped individual photo, but this is incorrect as it should be a stitched combination of both images.
DylanDylann commentedon Mar 16, 2026
cc @jakubkalinski0
MelvinBot commentedon Mar 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When viewing an individual odometer photo (start or end) from the confirmation page and using the Crop tool, the crop does not persist — the photo reverts to its original uncropped state after saving.
What is the root cause of that problem?
PR #83556 introduced odometer image stitching. Individual odometer photos are stored in
transaction.comment.odometerStartImage/transaction.comment.odometerEndImage, which is a different storage location than regular receipts (transaction.receipt.source).The
saveCropfunction inTransactionReceiptModalContent.tsx(line 332-391) correctly crops the displayed odometer image, but then saves the result by callingsetMoneyRequestReceipt(), which writes totransaction.receipt.source. It never updates the actual individual odometer image stored intransaction.comment. The correct functionsetMoneyRequestOdometerImage()(defined atsrc/libs/actions/IOU/index.ts:1662-1681) exists but is never called fromsaveCrop.So the crop result is written to the wrong storage location, and the next time the odometer image is displayed, it reads from the unchanged
transaction.comment.odometerStartImage/odometerEndImage— showing the original uncropped photo. The same issue applies torotateReceipt(line 259-305).What changes do you think we should make in order to solve the problem?
In
TransactionReceiptModalContent.tsx:saveCrop: WhenisOdometerImageis true, callsetMoneyRequestOdometerImage(transactionID, imageType, croppedFileObject, isDraftTransaction)instead ofsetMoneyRequestReceipt(). After updating the individual image, trigger re-stitching of the two images sotransaction.receipt.source(the combined receipt) also reflects the crop.rotateReceipt: Apply the same odometer-aware logic — whenisOdometerImageis true, save the rotated result viasetMoneyRequestOdometerImage()and re-stitch.What alternative solutions did you explore? (Optional)
An alternative would be to hide the Crop/Rotate buttons entirely for individual odometer images (similar to how they're already hidden for the stitched receipt via
isStitchedOdometerReceipt). However, this removes useful functionality rather than fixing it, and the bug report clearly shows users expect to be able to crop these photos.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.38 remaining items
melvin-bot commentedon Mar 23, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 23, 2026
@situchan / @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon Mar 23, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)Julesssss commentedon Mar 23, 2026
Fix on production. Payment handled for @DylanDylann here #83945.
[-][Due for payment 2026-03-30] [$250] Odometer - Photo is not cropped after saving cropped photo[/-][+]Odometer - Photo is not cropped after saving cropped photo[/+]Julesssss commentedon Apr 6, 2026
Reopening for @situchan payment ONLY.
mallenexpensify commentedon Apr 7, 2026
Payment Summary
Contributor+: @situchan due $250 via NewDot
laurenreidexpensify commentedon Apr 16, 2026
Payment Approved - $250 in New Expensify @situchan