Fix 'Waiting for you to add expenses' when creating distance expense offline#85298
Fix 'Waiting for you to add expenses' when creating distance expense offline#85298flodnv merged 7 commits intoExpensify:mainfrom
Conversation
…distance expense offline
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.
|
|
@eVoloshchak 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: 9b84fb9b12
ℹ️ 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".
|
@abbasifaizan70, is there a unit test we could implement to test this? |
|
@eVoloshchak updated the PR, added the test cases, and also fixed AI feedback. Please have a look. Thanks. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-27.at.22.59.37.movAndroid: mWeb ChromeScreen.Recording.2026-03-27.at.22.57.42.moviOS: HybridAppScreen.Recording.2026-03-27.at.22.54.09.moviOS: mWeb SafariScreen.Recording.2026-03-27.at.22.56.07.movMacOS: Chrome / SafariScreen.Recording.2026-03-27.at.22.52.14.mov |
|
I updated the PR title for you |
|
@flodnv added feedback replies. Thanks |
flodnv
left a comment
There was a problem hiding this comment.
Thanks! I hope this does not cause regressions 😅
|
🚧 @flodnv 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/flodnv in version: 9.3.52-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is an internal bug fix that corrects which existing next-step message is displayed when creating distance expenses offline. Specifically, it changes the condition for detecting whether a report contains transactions (from checking No new features, settings, workflows, or user-facing terminology were added or changed — the same messages ("submit" / "add") existed before; they just now appear at the correct time. |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.52-9 🚀
|
Explanation of Change
Updated next-step logic to treat reports with transactionCount > 0 as containing expenses, and used that same condition for manual-submit next-step selection so offline distance reports show submit messaging instead of add messaging.
Also fixed changeTransactionsReport to update optimistic transactionCount when moving expenses between reports, ensuring next-step generation stays correct and related unit tests pass.
Fixed Issues
$ #82307
PROPOSAL: #82307 (comment)
Tests
Action Performed:
Prerequisite: Account has at least one workspace.
Prerequisite 2: Distance expense previously created so waypoints are already saved.
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
Screen.Recording.2026-03-16.at.1.17.36.AM.mov
Android: mWeb Chrome
Screen.Recording.2026-03-16.at.1.18.59.AM.mov
iOS: Native
Screen.Recording.2026-03-16.at.1.09.45.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-03-16.at.1.12.19.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-15.at.4.05.20.AM.mov
Screen.Recording.2026-03-15.at.4.18.47.AM.mov