refactor: Remove shouldHandleNavigation from createDistanceRequest#93545
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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc624a9a44
ℹ️ 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".
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.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d16314115
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
2 similar comments
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
|
Codex Review: Didn't find any major issues. 🎉 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". |
…de-to-keep-navigation-handling-in-the-UI-components
…de-to-keep-navigation-handling-in-the-UI-components
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
…de-to-keep-navigation-handling-in-the-UI-components # Conflicts: # src/libs/actions/IOU/Split.ts
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. 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". |
…de-to-keep-navigation-handling-in-the-UI-components
|
How is this one going? |
|
@TaduJR Could you please merge main again? |
Sure, but I just discovered main workflows are failing. Lets wait a little til they are resolved. |
…de-to-keep-navigation-handling-in-the-UI-components # Conflicts: # src/libs/actions/IOU/Split.ts
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 674b281178
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a41b73870
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
Done @linhvovan29546 Thanks! |
|
Reviewing... |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 Valforte 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/Valforte in version: 9.4.29-0 🚀
|
|
🤖 No help site changes required. This PR is a purely internal code refactor with no user-facing behavior changes, so nothing under Why no docs update is neededThe PR makes
The end-user workflows documented on the help site are unchanged:
The only behavior change is a small in-app highlight fix (the newly created expense now highlights correctly in the "Add expense from a report preview" flow). That's a transient visual detail not described in any help article, so no documentation covers it. @TaduJR — since no docs changes are needed, there's no linked help site PR to review. If you believe a user-facing behavior here should be documented, let me know and I'll draft one. |
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.4.31-0 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR against the help site articles under Why: This is an internal code refactoring — it moves navigation handling out of the
The help site documents how to create distance expenses, split expenses, duplicate expenses, etc. — none of those documented flows or their steps change here, which the PR's own QA steps ("Same as tests," verifying identical behavior) confirm. Since no changes are required, I did not create a draft docs PR. @TaduJR, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.31-0 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Part of #84631 (PR 5). The issue's goal: action files should only do API + Onyx writes — navigation belongs in the view layer.
This PR makes
createDistanceRequestnavigation-free, the same treatment PR 3+4 gaverequestMoney/trackExpense:shouldHandleNavigation,shouldDeferForSearch,backToReport) and moved navigation to the UI — the confirmation flow now goes through the sharedperformPostBatchCleanup, and skip-confirm already handled its own nav. The action keepshighlightTransactionOnSearchRouteIfNeeded, which is a pure-Onyx side effect, not navigation.{iouReport, chatReportID, transactionID}— so the UI can navigate to and highlight the new report/expense. The action mints these internally and the draft id is cleared after submit, so the UI can't derive them itself (same pattern asrequestMoney's{iouReport}).Duplicate.tsshouldHandleNavigation: falseworkaround now that the param is gone.While here, I also fixed a highlight bug in the shared cleanup helper (
cleanupAndNavigateAfterExpenseCreate): it suppressed the new-expense highlight whenever abackToReportwas set — even when that report is the chat you return to (the "Add expense from a report preview" flow). It now decides based on whether the destination is a chat, which is the real condition.Fixed Issues
$ #84631
PROPOSAL: #84631 (comment)
Tests
1. Create a distance expense via the review screen
2. One-tap create
3. Global create → Reports list highlight
4. "Add expense" from a report preview → highlight in the chat
5. Split distance
6. Track distance destination
7. GPS distance
8. Duplicate distance
9. Skip-confirm dismiss/reveal across surfaces
10. Offline
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android-Native.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Mac-Chrome.mp4