Repository navigation
Migrate money request participants step to a dynamic route - #98937
mjasikowski merged 6 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e55a3f4bd
ℹ️ 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.
|
f0052a1 to
375c137
Compare
…-request-part-2-suneox
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f67ec7e8c5
ℹ️ 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: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-08-20.at.22.43.26.mov |
|
🚧 mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.4.58-0 🚀
|
No help site changes requiredI reviewed the changes in this PR and no updates to Why: This is an internal navigation/routing refactor — it migrates the money request participants step from
The user-facing behavior is unchanged: the Choose recipient picker, the confirmation flow, submit-to-employer, categorize, and share-with-accountant flows all work exactly as before — only the internal URL structure changed. Help articles document product features and workflows, not internal URL/route structures, so there is nothing to update. I also searched @suneox, let me know if you believe a specific article should be updated and I'll take another look. |
|
Deploy Blocker #99145 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.4.58-4 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
This is part 2 of migrating the money request steps from
backTo/forwardToto dynamic URL navigation. It replaces the static:action/:iouType/participants/:transactionID/:reportIDroute with theexpense-participantsdynamic suffix, following the query-param suffix pattern already used onmainbyexpense-merchant,expense-tagandtaxRate: the params that used to live in the path are now query params on the suffix, and the page derives its back path fromuseDynamicBackPathinstead of abackToparam.Fixed Issues
$ #83852
PROPOSAL:
Tests
DYNAMIC_ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS— recipient / workspace picker for an expenseCase 2.1 — Global create (Manual tab) → participants → back
Target:
src/libs/IOUUtils.tsnavigateToParticipantPageviasrc/libs/IOUAmountSubmission.tssubmitGlobalCreatePrecondition: the account has no default expense policy, so
shouldUseDefaultExpensePolicyis false and the flow reaches the participant picker.Steps:
Expected:
/create/create/start/<transactionID>/<reportID>/expense-participants?action=create&iouType=create&transactionID=…&reportID=…and the Choose recipient page opens.expense-participantssuffix is gone from the URL and the amount you entered is still there.Case 2.2 — Global create (Scan tab) → participants
Target:
src/pages/iou/request/step/IOURequestStepScan/components/NavigateGlobalCreateContext.tsxPrecondition: same as Case 2.1.
Steps:
Expected: the URL gains
/expense-participants?action=create&iouType=create&…and the recipient picker opens; back returns to the create page (Scan tab) with the uploaded receipt still there.Case 2.3 — Global create (Distance tab) → participants
Target:
src/pages/iou/request/step/IOURequestStepDistance/handleMoneyRequestStepDistanceNavigation.tsPrecondition: same as Case 2.1.
Steps:
Expected: the URL gains
/expense-participants?…and the recipient picker opens; back returns to the create page (Distance tab) with the waypoints still there.Case 2.4 — Drag & drop a receipt on the Inbox → participants
Target:
src/hooks/useReceiptScanDrop.tsxPrecondition: same as Case 2.1. Web only (drag & drop is web-only).
Steps:
Expected: the URL is
/create/create/start/<optimisticTransactionID>/<reportID>/expense-participants?action=create&iouType=create&…, the recipient picker opens (not/not-found), and back returns to the create page.Case 2.5 — Drag & drop a receipt in Search → participants
Target:
src/pages/Search/SearchPageWide.tsx→ same hook as Case 2.4Precondition: same as Case 2.4.
Steps:
/search/...).Expected: same as Case 2.4 — the base path is the create page, not
/search/..., and the recipient picker opens normally.Case 2.6 — Confirmation → tap the To field → pick a recipient → back to Confirmation
Target:
src/components/MoneyRequestConfirmationList.tsxnavigateToParticipantPagePrecondition: you are on the Confirmation step of a new expense with the To field still editable (
canEditParticipant), and theNEW_MANUAL_EXPENSE_FLOWbeta is off (with it on the picker opens inline instead of navigating).Steps:
Expected:
<confirmation-url>/expense-participants?action=create&iouType=create&transactionID=…&reportID=…and the recipient picker opens.Case 2.7 — Incomplete split bill (Split details) → tap To
Target:
SCREENS.SPLIT_DETAILS.DYNAMIC_ROOTin the route'sentryScreensPrecondition: an incomplete split bill exists in a group chat and you are signed in as the original actor, so
MoneyRequestConfirmationListrenders the editable fields.Steps:
/r/<reportID>/split/<reportActionID>).Expected: the URL is
/r/<reportID>/split/<reportActionID>/expense-participants?…and the recipient picker opens — not/not-found; back returns to Split details.Case 2.8 — Submit a tracked expense with multiple workspaces → workspaces-only picker
Target:
src/libs/ReportUtils.tscreateDraftTransactionAndNavigateToParticipantSelector(multiple-workspaces branch)Precondition: the account is a member of 2 or more submit-enabled workspaces and has a tracked expense in the Self DM.
submitDestination = EMPLOYER.Steps:
Expected:
/r/<selfDMReportID>/expense-participants?action=submit&iouType=submit&transactionID=…&reportID=…&isWorkspacesOnly=true.Case 2.9 — Submit a tracked expense,
SUBMITaction (not workspaces-only)Target:
src/libs/ReportUtils.tscreateDraftTransactionAndNavigateToParticipantSelector(submit branch)Precondition: a tracked expense in the Self DM;
submitDestination = FRIEND, orfilteredPoliciesCount > 0withactionName = SUBMIT.Steps:
Expected:
/r/<selfDMReportID>/expense-participants?action=submit&iouType=submit&transactionID=…&reportID=…with noisWorkspacesOnly./create/submit/confirmation/...)./not-found.Case 2.10 — Categorize a tracked expense → participants
Target: same call site as Case 2.9 with
actionName = CATEGORIZEPrecondition: a tracked expense in the Self DM and at least one workspace.
Steps:
Expected:
/expense-participants?action=categorize&iouType=submit&…and the header reads Categorize.…/category?…) and then Confirmation, with no/not-found.Case 2.11 — Share with an accountant → participants (dynamic route stacked on a dynamic route)
Target:
src/pages/iou/request/step/DynamicIOURequestStepAccountant.tsxnavigateToNextStepPrecondition: the account is an admin of at least one workspace (otherwise the flow creates a draft workspace instead) and has a tracked expense.
Steps:
Expected:
/accountant?action=share&…appended.<…>/accountant/expense-participants?action=share&iouType=…&transactionID=…&reportID=…(two stacked suffixes) and the recipient picker opens — not/not-found./accountantstill in the URL,expense-participantsgone).Case 2.12 — Back from Confirmation to participants (global create, participants not auto-assigned)
Target:
src/pages/iou/request/step/IOURequestStepConfirmation.tsxnavigateBackPrecondition: the expense was started from global create (
transaction.isFromGlobalCreate === true), participants were not auto-assigned, and the receipt is not a test receipt.Steps:
Expected:
/create/<iouType>/start/<transactionID>/<reportID>/expense-participants?…— no blank screen, no/not-found.Case 2.13 — Legacy URL redirect (backward compatibility), pasted cold
Target:
src/libs/Navigation/linkingConfig/OldRoutes.tsPrecondition: you know a live draft
transactionIDandreportID(copy them from the address bar in Case 2.1). Paste each URL into a new tab so it goes throughgetStateFromPathon a cold load.Steps:
https://dev.new.expensify.com:8082/create/create/participants/<transactionID>/<reportID>and press Enter.…/submit/submit/participants/<transactionID>/<reportID>?isWorkspacesOnly=true.…/r/<reportID>/expense-participants?action=create&iouType=create&transactionID=…&reportID=….Expected:
/r/<reportID>/expense-participants?action=create&iouType=create&transactionID=<transactionID>&reportID=<reportID>and the recipient picker opens./r/<reportID>/expense-participants?action=submit&iouType=submit&transactionID=…&reportID=…&isWorkspacesOnly=trueand the list shows workspaces only (the query is preserved).Case 2.14 — Guard: the report participant routes are not swallowed by the new pattern
Target: the two identity entries in
src/libs/Navigation/linkingConfig/OldRoutes.ts(/r/*/participants/participants-details/*,/e/*/participants/participants-details/*)Precondition: a group chat or room with at least two members.
Steps:
Expected:
/r/<reportID>/participants/participants-details/<accountID>and opens the member details page — it is not rewritten to/r/…/expense-participants…and does not land on/not-found./r/<reportID>/participants/participants-details/<accountID>/participants-roleand opens the role page.Case 2.15 — Refresh / deep link on the new URL (stack restore)
Target:
getMatchingFullScreenRoute/getDynamicRouteAdaptedStatePrecondition: the recipient picker is open from Case 2.6 (base = Confirmation) and from Case 2.11 (base = accountant, stacked suffix).
Steps:
<confirmation-url>/expense-participants?…, press F5, then press back.<…>/accountant/expense-participants?…, press F5, then press back twice.Expected:
Case 2.16 — Invalid entry screen →
/not-foundTarget:
entryScreensofDYNAMIC_ROUTES.MONEY_REQUEST_STEP_PARTICIPANTSinsrc/ROUTES.tsSteps:
https://dev.new.expensify.com:8082/settings/profile/expense-participants?action=create&iouType=create&transactionID=1&reportID=2and press Enter.Expected: the Not found page, because
Settings_Profile_Rootis not inentryScreens. The console logs[getStateFromPath.ts][DynamicRoute] None of the … candidate(s) passed entryScreens validation.Case 2.17 — Offline
Precondition: DevTools → Network → Offline.
Steps:
Expected: the recipient picker still opens with the correct suffix and back still works (navigation is client-side); picking a recipient continues to Confirmation with optimistic data and no crash.
Offline tests
QA Steps
Test case 1: Change the recipient from the confirmation page
expense-participantsappended to the confirmation URL.expense-participantspart is gone from the address bar and the To row shows the recipient you just picked.Test case 2: Submit a tracked expense to an employer with several workspaces
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-20.at.11.35.38.1.mp4
CleanShot.2026-08-20.at.11.37.35.2.mp4
Case 2.1 — Global create (Manual tab) → participants → back
Case 2.2 — Global create (Scan tab) → participants
Case 2.3 — Global create (Distance tab) → participants
Case 2.4 — Drag & drop a receipt on the Inbox → participants
Case 2.5 — Drag & drop a receipt in Search → participants
Case 2.6 — Confirmation → tap the To field → pick a recipient → back to Confirmation
Case 2.7 — Incomplete split bill (Split details) → tap To
Case 2.8 — Submit a tracked expense with multiple workspaces → workspaces-only picker
Case 2.9 — Submit a tracked expense, SUBMIT action (not workspaces-only)
Case 2.10 — Categorize a tracked expense → participants
Case 2.11 — Share with an accountant → participants (dynamic route stacked on a dynamic route)
Skip since canUseTrackFlows is disabled
Case 2.12 — Back from Confirmation to participants (global create, participants not auto-assigned)
Case 2.13 — Legacy URL redirect (backward compatibility), pasted cold
Case 2.14 — Guard: the report participant routes are not swallowed by the new pattern
Skip since canUseTrackFlows is disabled
Case 2.15 — Refresh / deep link on the new URL (stack restore)
Case 2.16 — Invalid entry screen → /not-found
Case 2.17 — Offline