Repository navigation
Migrate money request merchant, description and date steps to dynamic - #98393
mjasikowski merged 9 commits into
Conversation
… routes
Replaces the legacy `backTo` param on MONEY_REQUEST_STEP_MERCHANT,
MONEY_REQUEST_STEP_DESCRIPTION and MONEY_REQUEST_STEP_DATE with dynamic routes,
following the MONEY_REQUEST_STEP_TAX_RATE query-param template.
- add `expense-merchant`, `expense-description` and `expense-date` entries to
DYNAMIC_ROUTES and drop the static route definitions
- rename the pages to Dynamic* and resolve the back path with useDynamicBackPath
- register the new DYNAMIC_STEP_* screens in the linking config, navigation types,
modal stack navigator and the step HOC unions
- update every call site (confirmation list fields, MoneyRequestView,
SplitExpenseEditPage) to createDynamicRoute
- add OldRoutes redirects (with the optional reportActionID variants) and unit tests
Part 1 of Expensify#83852.
9cc060c to
42ab058
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cc060c0cd
ℹ️ 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✅ Changes either increased or maintained existing code coverage, great job!
|
… and date steps An incomplete split bill still renders `MoneyRequestConfirmationList` with editable Merchant/Description/Date rows for its original actor, so those taps append the `expense-*` suffix to `/r/:reportID/split/:reportActionID`. Without the split details screen in `entryScreens`, `getStateFromPath` rejects the suffix and the app falls through to `/not-found`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-08-12.at.22.31.12.mov |
|
@suneox conflicts |
commented
Aug 13, 2026
|
commented
Aug 14, 2026
|
@suneox could you sync with main? |
…-request-part-1-suneox
commented
Aug 14, 2026
Updated. The flaky test failure has been fixed |
commented
Aug 17, 2026
|
@suneox could you sync with main? |
…-request-part-1-suneox
commented
Aug 17, 2026
Done |
commented
Aug 17, 2026
|
🚧 mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
commented
Aug 17, 2026
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
commented
Aug 17, 2026
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
commented
Aug 18, 2026
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.4.55-0 🚀
|
commented
Aug 18, 2026
|
🤖 No help site changes required. I reviewed the changes in this PR against Expensify's help articles under Why: This PR is a purely internal navigation refactor. It migrates the merchant, description, and date money-request steps off the legacy I also searched No draft docs PR was created since there's nothing to document. @suneox, if you believe a user-facing behavior did change here and should be documented, let me know and I'll draft the help site update. |
commented
Aug 18, 2026
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.4.55-4 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
Part 1 of #83852 migrates three money request steps off the legacy
backToparam and onto dynamic routes:MONEY_REQUEST_STEP_MERCHANT(expense-merchant),MONEY_REQUEST_STEP_DESCRIPTION(expense-description) andMONEY_REQUEST_STEP_DATE(expense-date). Each one follows the query-param template already used byMONEY_REQUEST_STEP_TAX_RATE/MONEY_REQUEST_STEP_TAGonmain: the params that used to live in the path (action,iouType,transactionID,reportID, optionalreportActionID) become query params of the dynamic suffix, the page is renamed toDynamic*and resolves its back destination withuseDynamicBackPathinstead of readingroute.params.backTo.Every call site (the confirmation list merchant/description/date fields,
MoneyRequestViewandSplitExpenseEditPage) now navigates withcreateDynamicRoute, and every screen those taps come from is listed inentryScreensso no entry point is silently blocked. The suffixes are namespacedexpense-*because dynamic route paths must be globally unique and baredescription/date-selectare already taken.OldRoutes.tskeeps the legacy URLs working (with a dedicated longer pattern for the optionalreportActionIDsegment), covered by new unit tests intests/navigation/getMatchingNewRouteTest.ts.Fixed Issues
$ #83852
PROPOSAL:
Tests
DYNAMIC_ROUTES.MONEY_REQUEST_STEP_MERCHANT — edit the merchant of an expense
Case 1.1 — Confirmation page → Merchant → save → back
Target:
src/components/MoneyRequestConfirmationList/sections/MerchantField.tsx:138Precondition: you are on the Confirmation step of a new expense sent to a workspace chat.
<confirmation-url>/expense-merchant?action=create&iouType=submit&transactionID=…&reportID=…and the Merchant page opens.Case 1.2 — Expense report view (RHP) → Merchant → save → back
Target:
src/components/ReportActionItem/MoneyRequestView.tsx:1280/expense-merchant?action=edit&iouType=…&transactionID=…&reportID=…appended.Case 1.3 — Header back button (no save)
Target:
src/pages/iou/request/step/DynamicIOURequestStepMerchant.tsx/not-foundpage appears.Case 1.4 — Refresh / deep link
Case 1.5 — Legacy URL redirect
Target:
src/libs/Navigation/linkingConfig/OldRoutes.tstransactionIDandreportIDof an expense./edit/submit/merchant/<transactionID>/<reportID>./r/<reportID>/expense-merchant?action=edit&iouType=submit&transactionID=<transactionID>&reportID=<reportID>and renders the Merchant page (no/not-found)./edit/submit/merchant/<transactionID>/<reportID>/<reportActionID>and verify the new URL also carries&reportActionID=….Case 1.6 — Save while offline
DYNAMIC_ROUTES.MONEY_REQUEST_STEP_DESCRIPTION — edit the description of an expense
Case 2.1 — Confirmation page → Description → save → back
Target:
src/components/MoneyRequestConfirmationList/sections/DescriptionField.tsx:151/expense-description?action=create&iouType=submit&transactionID=…&reportID=…appended.Case 2.2 — Expense report view (RHP) → Description → save → back
Target:
src/components/ReportActionItem/MoneyRequestView.tsx:1254/expense-description?action=edit&…appended and the Description page opens.Case 2.3 — Split expense edit → Description → back
Target:
src/pages/iou/SplitExpenseEditPage.tsx:332Precondition: an expense in the Split expense flow.
/expense-description?action=edit&iouType=split-expense&transactionID=<OPTIMISTIC_TRANSACTION_ID>&reportID=…appended.Case 2.4 — Refresh / deep link
Case 2.5 — Legacy URL redirect
/edit/submit/description/<transactionID>/<reportID>./r/<reportID>/expense-description?action=edit&iouType=submit&transactionID=…&reportID=…and renders the Description page./r/<reportID>/description(report description) and verify it still opens the report description page, unaffected by the new mapping.DYNAMIC_ROUTES.MONEY_REQUEST_STEP_DATE — edit the date of an expense
Case 3.1 — Confirmation page → Date → pick a date → back
Target:
src/components/MoneyRequestConfirmationList/sections/DateField.tsx:154/expense-date?action=create&iouType=submit&transactionID=…&reportID=…appended.Case 3.2 — Expense report view (RHP) → Date → back
Target:
src/components/ReportActionItem/MoneyRequestView.tsx:1305/expense-date?action=edit&…appended.Case 3.3 — Split expense edit → Date → back
Target:
src/pages/iou/SplitExpenseEditPage.tsx:435/expense-date?action=edit&iouType=split-expense&…appended.Case 3.4 — Refresh / deep link
Case 3.5 — Legacy URL redirect
/edit/submit/date/<transactionID>/<reportID>./r/<reportID>/expense-date?action=edit&iouType=submit&transactionID=…&reportID=…and renders the Date page.Cross-cutting — entry allow-list and no regression on similarly named routes
Case 4.1 — Entry from Search / expense report view
Target:
src/ROUTES.ts(entryScreensof the three new dynamic routes)/not-found), which provesentryScreensis complete.Case 4.2 — No regression on similarly named routes
/r/<reportID>/descriptionis unchanged.Case 4.3 — Automated tests
tests/navigationsuite is 42 suites / 488 tests passing).Offline tests
QA Steps
Test case 1: Edit the merchant of an expense from the confirmation page
/expense-merchant?action=create&iouType=submit&transactionID=...&reportID=....expense-merchant, and the merchant row shows the new value.Test case 2: Edit the description of an expense from the expense detail
/expense-description?action=edit&iouType=...&transactionID=...&reportID=....Test case 3: Edit the date of an expense from the expense detail
/expense-date?action=edit&iouType=...&transactionID=...&reportID=....Test case 4: Open merchant, description and date from an expense report
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
CleanShot.2026-08-12.at.12.11.20.1.mp4
+++ Case 1.1 — Confirmation page → Merchant → save → back
+++
+++ Case 1.2 — Expense report view (RHP) → Merchant → save → back
+++
+++ Case 1.3 — Header back button (no save)
+++
+++ Case 1.4 — Refresh / deep link
+++
+++ Case 1.5 — Legacy URL redirect
+++
+++ Case 1.6 — Save while offline
+++
+++ Case 2.1 — Confirmation page → Description → save → back
+++
+++ Case 2.2 — Expense report view (RHP) → Description → save → back
+++
+++ Case 2.3 — Split expense edit → Description → back
+++
+++ Case 2.4 — Refresh / deep link
+++
+++ Case 2.5 — Legacy URL redirect
+++
+++ Case 3.1 — Confirmation page → Date → pick a date → back
+++
+++ Case 3.2 — Expense report view (RHP) → Date → back
+++
+++ Case 3.3 — Split expense edit → Date → back
+++
+++ Case 3.4 — Refresh / deep link
+++
+++ Case 3.5 — Legacy URL redirect
+++
+++ Case 4.1 — Entry from Search / expense report view
+++
+++ Case 4.2 — No regression on similarly named routes
+++