-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[NO QA] [Odometer] Verify optimistic data is correct when offline #79497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NO QA] [Odometer] Verify optimistic data is correct when offline #79497
Conversation
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.
|
|
Update: We have to wait for the changes from this PR to be merged as it fixes some of the issues that allow us to reliably work with odometer expenses |
|
Update: Now working on resolving this issue Interesting note -> the category is disappearing every second change of the workspace no matter what workspace it is: Screen.Recording.2026-01-14.at.11.31.30.mov |
|
Interestingly, issue is also present for other distance expenses: Screen.Recording.2026-01-14.at.11.53.09.mov |
|
@DylanDylann @Julesssss I think we should actually create another issue for that since this issue isn't dependent on being offline and persists across other distance expenses both offline and online: Screen.Recording.2026-01-14.at.11.57.22.mov |
|
Agreed, TBH I am not sure if this is a bug, maybe we need to get confirmation from someone |
|
@DylanDylann Actually pretty good point, do we wait for @Julesssss? What's the procedure here? |
|
Let's hear a thought from @Julesssss |
Agree, created a separate issue: #79598 |
|
@DylanDylann 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] |
Reviewer Checklist
Screen.Recording.2026-01-15.at.16.31.21.mov |
DylanDylann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.3.4-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.4-6 🚀
|
Explanation of Change
Problem
When editing an odometer distance expense offline, the
odometerStartandodometerEndvalues were not being updated in the optimistic data. This caused the old values to appear when the user closed and reopened the edit form, even though the distance (quantity) was correctly updated.Root Cause
The
getUpdatedTransaction()function inTransactionUtils/index.tsdid not have handling forodometerStartandodometerEndfields intransactionChanges. While these values were passed toupdateMoneyRequestDistance(), they were not being applied to the transaction'scomment.odometerStartandcomment.odometerEndduring the optimistic update.Solution
odometerStartandodometerEndtoAdditionalTransactionChangestype (Transaction.ts) - allows these fields to be passed intransactionChangesgetUpdatedTransaction()(TransactionUtils/index.ts) - updatescomment.odometerStartandcomment.odometerEndwhen these fields are present intransactionChangesodometerStartandodometerEndtopendingFields- properly tracks these fieldsFixed Issues
$ #78961
PROPOSAL: N/A
Tests
No tests - issue concerned only offline
Offline tests
Prerequisites:
Actual tests:
Account -> TroubleshootForce offlineonDistancein order to edit the readings valuesSavethe RHP should close and you should see grayed out the following elements:AmountfieldDistancefieldChange notificationin the chatDistanceQA Steps
NO QA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.2026-01-15.at.12.17.33.mov
Screen.Recording.2026-01-15.at.12.18.17.mov