84252: Track distance - Amount and Rate are not greyed out after editing in offline mode#86104
84252: Track distance - Amount and Rate are not greyed out after editing in offline mode#86104amyevans merged 3 commits intoExpensify:mainfrom
Conversation
…ing in offline mode
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@thesahindia 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20f3202997
ℹ️ 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".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppiOS: HybridAppScreen.Recording.2026-03-25.at.12.59.58.PM.moviOS: mWeb SafariScreen.Recording.2026-03-25.at.1.07.28.PM.movMacOS: Chrome / SafariScreen.Recording.2026-03-25.at.3.05.28.AM.mov |
|
@abbasifaizan70, could you merge main? |
|
@thesahindia Updated with the latest main. Thanks |
|
🚧 @amyevans 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! 🧪🧪
|
|
✋ 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/amyevans in version: 9.3.44-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to staging by https://github.com/amyevans in version: 9.3.47-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.3.48-2 🚀
|

Explanation of Change
Updated the optimistic transaction merge in getUpdateMoneyRequestParams to include pendingFields, so offline edits to distance rate/amount are marked pending and render greyed out immediately.
I also added optimistic violation cleanup for distance edits (customUnitRateID, distance, or waypoints) to remove stale MODIFIED_AMOUNT distance violations before recalculation.
This prevents the “not greyed out” mismatch by correctly reflecting unsynced offline updates in the UI.
It also makes the distance violation clear offline as soon as the user switches back to a valid/original rate, instead of waiting until reconnect.
Fixed Issues
$ #84252
PROPOSAL: #84252 (comment)
Tests
Preconditions: Workspace has distance rates enabled.
Have at least two distance rates.
In a workspace, have a distance expense with the distance rate A selected.
Offline tests
Same as tests.
QA Steps
Same as tests.
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
c54339c0-c750-428a-ac2f-c5ffa94cb981.mp4
Android: mWeb Chrome
2981a806-8a53-4907-b405-ff3f19018acc.mp4
iOS: Native
7b307259-2c67-4fb1-bbe6-d9ddd02099ed.mp4
iOS: mWeb Safari
48ef69af-3b3e-4f14-88ef-92149cc3f7b0.mp4
MacOS: Chrome / Safari
Screen.Recording.2026-03-23.at.7.48.23.PM.mov