Repository navigation
Derive the distance draft expense type from the selected tab - #97310
danieldoglas merged 5 commits into
Conversation
|
@linhvovan29546 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] |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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: HybridApptelegram-cloud-document-5-6300690278470654991.mp4Android: mWeb Chrometelegram-cloud-document-5-6300690278470654992.mp4iOS: HybridAppScreen.Recording.2026-08-02.at.11.10.51.moviOS: mWeb SafariScreen.Recording.2026-08-02.at.11.00.28.movMacOS: Chrome / SafariScreen.Recording.2026-08-02.at.10.57.59.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 danieldoglas 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/danieldoglas in version: 9.4.49-0 🚀
|
|
🤖 Help site review: no docs changes required. This PR is a bug fix, not a behavior or copy change. It reorders how the distance draft expense type is derived — from The help site already describes the correct behavior this restores:
Since the fix simply aligns runtime behavior with what the articles already say, there is nothing to add or correct in @wildan-m, if you believe this change surfaced any new user-facing behavior, tab, or label that the help site should document, let me know the specifics and I'll draft the update. |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.4.49-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Tapping a Start or Stop waypoint on the Map tab opens the "Not here" page instead of the waypoint editor once an Odometer expense has been created earlier in the session. Leaving the flow clears the draft expense, so reopening it has to derive the expense type again — and that derivation preferred the last distance expense the user created over the tab that is actually on screen. The tab navigator restores the tab that was last selected, so the two disagree as soon as someone creates an Odometer expense and later switches to Map: the visible tab is Map, but the draft is rebuilt as an Odometer expense, which carries no waypoints. The Map tab renders placeholder Start and Stop rows regardless of the underlying draft, so the list looks normal until a row is tapped and the editor finds no waypoints to open.
Deriving the type from the selected tab keeps the rebuilt draft aligned with the tab the navigator is showing, so a Map tab always sits over a map expense with its waypoints seeded. The last-created type stays as the next fallback, so opening the flow before any tab has been selected still lands on the type used last.
Fixed Issues
$ #92598
PROPOSAL: #92598 (comment)
Tests
Offline tests
The rebuilt draft expense is derived entirely from locally stored values, so the behavior is unchanged offline. Turn off the network connection and repeat the steps above; the waypoint editor still opens on the Map tab.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Kapture.2026-07-29.at.23.38.56.mp4
Android: mWeb Chrome
Kapture.2026-07-29.at.23.42.39.mp4
iOS: Native
Kapture.2026-07-29.at.23.24.56.mp4
iOS: mWeb Safari
Kapture.2026-07-29.at.23.28.51.mp4
MacOS: Chrome / Safari
Kapture.2026-07-29.at.22.18.58.mp4