[Odometer] Add backup transaction for purpose of editing from confirmation#86022
Conversation
…o_confirmation_page' into jakubkalinski0/Odometer_add_backup_transaction_for_editing_from_confirmation
…o_confirmation_page' into jakubkalinski0/Odometer_add_backup_transaction_for_editing_from_confirmation
…o_confirmation_page' into jakubkalinski0/Odometer_add_backup_transaction_for_editing_from_confirmation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
ada69e9 to
f7c0578
Compare
…on_for_editing_from_confirmation
…on_for_editing_from_confirmation
|
TS check fail unrelated (at least I see no corelation) |
|
@jakubkalinski0 Hey, I noticed an issue on Android. I can’t save the cropped image. It only happens the first time I open the app. Screen.Recording.2026-03-28.at.00.40.45.mov |
|
@DylanDylann I am now testing it and cannot save the cropped image at all on android. Something fishy is going on, I will look into that |
|
Some big-ish changes were made to image processing about a week ago which could have something to do with this I will try to verify today before I go to sleep whether that could be the cause of that issue since it's also present on main. |
Yeah good idea. Missed this comment yesterday!
Yeah thanks for confirming. I'm happy with how the changes look currently. To be honest I am now wondering how important these improvements are... I might suggest we don't apply the partial transactionBackup changes to other expense edits if we can get avoid that refactor. Anyway that is a discussion for later. |
No problem man! Would you like me to introduce that in this PR or should we do that in a followup since Dylan already approved this PR in a current state? Btw I just came home from the office and will continue my investigation with the latest issue that Dylan found here (which I believe really is introduced by the PR I linked in this comment #86022 (comment) but we should wait for the definite proof) |
|
@jakubkalinski0 follow up is fine, assuming you don't need to make changes for the cropping issue 👍 |
Yeah, I will fix that today as I managed to identify the root cause of the issue. I will describe it with more details when I am done testing the fix |
…low in Android crop
|
Works now, sorry for the delay - I had to take care of something private. I will explain the issue to my best understanding in a moment works.webm |
|
The |
…on_for_editing_from_confirmation
|
Working well Screen.Recording.2026-03-31.at.11.10.38.mov |
|
We got a failed test; I think it’s flaky |
Yeah, I agree. Seems like a faulty test |
|
@jakubkalinski0 Could you merge main again to see if we get lucky? |
…on_for_editing_from_confirmation
|
@Julesssss All your |
|
Okay great, lets get this merged and move onto release 2 issues! |
|
🚧 @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.3.52-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes are required for this PR. This PR adds an internal backup/restore mechanism for editing odometer readings from the confirmation page. The changes are:
These are all internal behavior fixes — no new user-facing features, buttons, labels, or workflows are introduced. The user flow for creating/editing odometer expenses remains the same; it just works correctly now when canceling edits. Note: Pre-existing documentation gapThe Odometer distance method is not documented in the New Expensify help site at all. The |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.52-9 🚀
|
Explanation of Change
PR #85105 has to be merged before we can go ahead with this one
Adds backup transaction support for editing odometer readings from the confirmation page. On entry, a fresh backup is created (bypassing AsyncStorage race conditions). Canceling restores the backup and revokes new blob URLs. Saving cleans up the backup and revokes the old URLs. Also skips redundant image re-stitching when source images are unchanged. If user didn't press
"Save"then we interpret it as an intention to discard the changes and stick with the original images/readings.Fixed Issues
$ #85368 - main issue
$ #86355 - related small bug
PROPOSAL: N/A
Tests
We are testing the odometer expense creation flow which you start by doing the following:
Press
FAB-> go to"Track distance"-> choose"Odometer"tab"Next"to reach the confirmation page and verify the stitched receipt is shown."Distance"to land on the odometer screen."Save"and navigate back to the confirmation page.<back button instead of"Save"."Distace"to land on the odometer screen and verify that the odometer images and readings are the original ones, not the changed ones that we dicarded by tapping<back buttonThis test steps below verify that this issue is fixed -> Expense - Odometer photo is closed immediately after clicking rotate
11. Create a new odometer expense, add both readings and upload ONLY ONE ODOMETER IMAGE (start or end).
12. Press
"Next"to reach the confirmation page and verify the stitched receipt is shown.13. Press
"Distance"to land on the odometer screen.14. Click the uploaded photo.
15. Click
"Rotate".16. Verify that the photo is rotated and you are NOT brought back to the Odometer Tab (thats what happened in a bug described here #86355)
Offline tests
Same as 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
iOS needs to be tested on a physcical device
Android: Native
android.mp4
Android: mWeb Chrome
androidweb.mp4
iOS: mWeb Safari
ios.mp4
MacOS: Chrome / Safari
web.mp4