[Due for payment 2026-11-13] [$175] Spend - Not here page opens after clicking split row on Date tab when opened from Spend
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: 9.5.23-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/80732943/folder/57599982/71461417/1913501751?sort=-identifier Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
- Go to staging.new.expensify.com
- Go to workspace chat.
- Create an expense.
- Go to Spend > Expenses.
- Select the expense via checkbox.
- Click More > Split.
- Go to Date tab.
- Click on any split.
Expected Result:
Split page will open.
Actual Result:
Not here page opens after clicking split row on Date tab when opened from Spend.
Workaround:
Unknown
Platforms:
- [x] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/bc697936-cab3-4ddf-ada6-da0b2d2c6c72
Applause Internal Information Exported by: Svetlana Lazutkina Bug ID: 7298089
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022115112485992206644
- Upwork Job ID: 2115112485992206644
- Last Price Increase: 2026-10-27
Issue Owner
Current Issue Owner: @mallenexpensify
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/06b9edce8b8c1a7c18d44d420c809414048ce0528370b6dbcd55ca064fbf7bb3
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the split flow is opened from Spend > Expenses, clicking a split row on the Date tab shows the "Hmm... it's not here" page instead of the split edit page.
What is the root cause of that problem?
A legacy URL redirect catches the split edit URL and rewrites it into a broken expense-date URL.
- When opened from Search, the split edit URL on the Date tab is
/search/split-expense-overview-search/date/split-expense/edit/<reportID>/<transactionID>. Thedatetab name is the third path segment. - The legacy pattern
'/*/*/date/*/*/*'inOldRoutes.ts:222matches any path whose third segment isdate. It rewrites the URL to/r/edit/expense-date?action=search&iouType=split-expense-overview-search&transactionID=split-expense&reportID=edit…. - Report
editand transactionsplit-expensedon't exist, so the Not Here page shows.
This only happens from Spend, and only on the Date tab:
- From a chat, the base is
/r/<reportID>, sodateis not the third segment. - The other tabs use
amountandpercentage, which no legacy pattern matches.
Code path
- More > Split calls
initSplitExpense. Search openssplit-expense-overview-search(SplitExpenses.ts:243-244). - The active tab is a child path segment (
amount/percentage/date) (config.ts:1961-1988). - All tabs share
onSelectRow. It appends the dynamicSPLIT_EXPENSE_EDITsuffix to the current path (DynamicSplitExpensePage.tsx:610-626). getMatchingNewRouteruns before normal route parsing and picks the longest matching legacy pattern. A trailing*matches the rest of the path (getMatchingNewRoute.ts:15-29). The edit page's own not-found check never runs.
Likely regression source: the clash appeared after the date legacy patterns from Migrate money request merchant, description and date steps to dynamic met the new Search split URLs from Migrate split expense routes to dynamic URL navigation and migrate SPLIT_EXPENSE_EDIT. I didn't confirm which PR first introduced it.
What changes do you think we should make in order to solve the problem?
In OldRoutes.ts, add a pass-through entry so split edit URLs under the date tab are left unchanged. The file already does this for participants at OldRoutes.ts:224.
- Pattern:
'/*/*/date/split-expense/edit/*', mapped to'/$1/$2/date/split-expense/edit/$3'. - It is longer than
'/*/*/date/*/*/*', so it wins.
Add cases to tests/navigation/getMatchingNewRouteTest.ts:
- The Search split edit URL under
datecomes back unchanged. - A legacy URL such as
/edit/submit/date/123/456still redirects.
What alternative solutions did you explore? (Optional)
- Rename the Date tab's path segment in
config.ts(for example,by-date) for both split screens. This fixes the clash at its source but changes existing tab URLs. - Make
getMatchingNewRouteskip legacy redirects when the path already resolves to a registered dynamic route. This is broader and also protects against other'/*/*/<keyword>/*/*'patterns.
Web reproduction
I reproduced this on web. The Date tab row opens the Not Here page, and the Amount tab row opens the edit page.
| Date tab row | Amount tab row |
|---|---|
![]() |
![]() |
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/105152) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
view run · no recording available
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)
Job added to Upwork: https://www.upwork.com/jobs/~022115112485992206644
Proposal
What is the root cause of that problem?
getMatchingNewRoute (src/libs/Navigation/helpers/getMatchingNewRoute.ts) runs every path through the legacy oldRoutes table and picks the longest matching pattern. Its regex is anchored (^…(?=[?#]|$)), a non-trailing * is one segment, and a trailing * is (.*).
The legacy pattern '/*/*/date/*/*/*' (OldRoutes.ts:222) matches /search/split-expense-overview-search/date/split-expense/edit/<reportID>/<transactionID>, because when the split flow is opened from Spend the Date tab name is the third segment. It rewrites it to /r/edit/expense-date?..., a report that does not exist, so Not Here shows. From a chat the base is /r/<reportID>, so date is not third. The amount and percentage tabs have no legacy pattern, so they are fine.
What changes do you think we should make in order to solve the problem?
In OldRoutes.ts, next to the participants pass-through at line 224, add:
'/*/*/date/split-expense/edit/*': '/$1/$2/date/split-expense/edit/$3'.
It is longer than '/*/*/date/*/*/*', so maxLength selects it and the URL comes back unchanged. The literal split-expense/edit keeps real legacy date URLs (/edit/submit/date/<txn>/<report>) redirecting.
Test, in tests/navigation/getMatchingNewRouteTest.ts (same expect(getMatchingNewRoute(...)) style):
- The Search split-edit URL under
datereturns unchanged, with and without?backTo=.... /edit/submit/date/123/456still returns/r/456/expense-date?....
What alternative solutions did you explore? (Optional)
- MelvinBot's proposal reaches the same root cause and the same pass-through. Mine adds the
?backTocase, which matters because the split-edit URL carries a query, and the guard that real legacy date URLs still redirect. - MelvinBot's alternatives (renaming the Date tab segment in
config.ts, or makinggetMatchingNewRouteskip redirects for registered dynamic routes) are broader. I rejected them for this bug: the first changes existing tab URLs, the second needs a route-registry lookup inside a pure string helper.
VERDICT: POST
ROOT_CAUSE_ONELINER: createDynamicRoute in onSelectRow uses getActiveRoute() which includes the active tab's URL segment (/date), creating an invalid nested path split-expense-overview-search/date/split-expense/edit/… that the router cannot match.
PROPOSAL_TYPE: FIRST
AUTOPOST_SAFE: YES
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user selects an expense from Spend > Expenses, taps More > Split, switches to the Date tab, and clicks on any split row, the <NotFoundPage /> ("Hmm... it's not here") error screen opens instead of the split edit page.
What is the root cause of that problem?
- In
src/libs/actions/SplitExpenses.ts(line 244), when the split flow is opened from Search/Spend, the base route is/search/split-expense-overview-search. - On the Date tab, the nested active route is
/search/split-expense-overview-search/date. - When clicking a split row,
onSelectRowinDynamicSplitExpensePage.tsxappends the dynamic route suffixSPLIT_EXPENSE_EDIT, creating:/search/split-expense-overview-search/date/split-expense/edit/<reportID>/<transactionID> - In
src/libs/Navigation/linkingConfig/OldRoutes.ts(line 222), a legacy wildcard rewrite rule exists:
Because the URL has'/*/*/date/*/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4&reportActionID=$5',dateas its third segment ($1 = search,$2 = split-expense-overview-search,date),getMatchingNewRoutecatches this URL and rewrites it to:/r/edit/expense-date?action=search&iouType=split-expense-overview-search&transactionID=split-expense&reportID=edit&reportActionID=<reportID>/<transactionID> - Because
reportID=editdoes not exist, the navigation router fails and renders the<NotFoundPage />. This does not occur on the Amount or Percentage tabs because no legacy rule matches those segment names.
What changes do you think we should make in order to solve the problem?
In src/libs/Navigation/linkingConfig/OldRoutes.ts (line 222):
Add an explicit pass-through rule for date/split-expense/edit right alongside the existing rule on line 224 (which already does this for participants/participants-details):
// src/libs/Navigation/linkingConfig/OldRoutes.ts
'/*/*/date/split-expense/edit/*': '/$1/$2/date/split-expense/edit/$3',
'/*/*/date/*/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4&reportActionID=$5',
Why this solution is optimal (KISS & Minimal Blast Radius):
getMatchingNewRoute evaluates patterns by specificity and length (pattern.length > maxLength in getMatchingNewRoute.ts:62). The more specific pass-through rule takes precedence over the wildcard, preserving the valid Date split edit route untouched while maintaining full backwards compatibility for legacy expense-date URLs.
What alternative solutions did you explore? (Optional)
- Modifying
onSelectRownavigation paths: Rejected because changing the active route construction inDynamicSplitExpensePage.tsxalters the sub-tab navigation state across all expense types. - Removing the legacy rule entirely: Rejected because external deep links and bookmarks pointing to legacy expense-date URLs would break.
What automated tests can you add to prevent this from re-occurring?
Add unit tests in tests/unit/OldRoutesTest.ts:
it('should correctly preserve /search/split-expense-overview-search/date/split-expense/edit routes without redirecting to OldDot expense-date', () => {
const testRoute = '/search/split-expense-overview-search/date/split-expense/edit/123/456';
expect(getMatchingNewRoute(testRoute)).toBe(testRoute);
});
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01b60d704ba377be83
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user selects an expense from Spend > Expenses, clicks More > Split, switches to the Date tab, and clicks on any split row, the <NotFoundPage /> ("Hmm... it's not here") error screen opens instead of the split edit page.
What is the root cause of that problem?
In src/pages/iou/DynamicSplitExpensePage.tsx:
- When selecting a split row to edit,
onSelectRow(line 623) builds the dynamic navigation route by omitting the optionalbasePathargument increateDynamicRoute:// src/pages/iou/DynamicSplitExpensePage.tsx:623 Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.SPLIT_EXPENSE_EDIT.getRoute(item.reportID ?? reportID, item.transactionID))); - In
src/libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute.ts(line 70), whenbasePathis omitted, it falls back togetActiveRoute():const routePath = basePath ?? getActiveRoute(); return combinePathAndSuffix(routePath, dynamicRouteSuffixWithParams); - When the user is on the Amount tab (
/amount) or Percentage tab (/percentage), the active route is:/search/split-expense-overview-search/amountAppending the suffix produces:/search/split-expense-overview-search/amount/split-expense/edit/... - But when the user switches to the Date tab,
getActiveRoute()includes/date:/search/split-expense-overview-search/dateAppendingsplit-expense/edit/...produces:/search/split-expense-overview-search/date/split-expense/edit/:reportID/:editSplitExpenseTransactionID - During route normalization in
getMatchingNewRoute(src/libs/Navigation/helpers/getMatchingNewRoute.ts), the URL is evaluated against the legacy redirect map insrc/libs/Navigation/linkingConfig/OldRoutes.ts. OldRoutes.tsline 222 defines a broad legacy pattern with 5 wildcards:
Because the URL contains'/*/*/date/*/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4&reportActionID=$5'/date/, this legacy pattern inadvertently intercepts and mangles the split edit URL:$1=search$2=split-expense-overview-search$3=split-expense$4=edit$5=:reportID/:editSplitExpenseTransactionID
- The URL is rewritten to
/r/edit/expense-date?..., which fails to match any valid report or screen, triggering the<NotFoundPage />. - Furthermore, the active tab segment (
/date,/amount,/percentage) should never be baked into the base path for child dynamic screens. Child screens of the overview (likesplit-expense/editandsplit-expense-create-date-range) must be anchored directly to the overview route, just likehandleDatePressandinitSplitExpenseintend.
What changes do you think we should make in order to solve the problem?
1. Anchor child dynamic routes in DynamicSplitExpensePage.tsx to the overview base path:
In src/pages/iou/DynamicSplitExpensePage.tsx, construct the base overview route without the active tab suffix so child navigation is deterministic regardless of the active tab:
// src/pages/iou/DynamicSplitExpensePage.tsx
const overviewBaseRoute = route.name === SCREENS.MONEY_REQUEST.DYNAMIC_SPLIT_EXPENSE_SEARCH
? createDynamicRoute(DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE_SEARCH.getRoute(reportID, transactionID))
: createDynamicRoute(DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE.getRoute(reportID, transactionID));
const onSelectRow = (item: SplitListItemType) => {
if (!item.isEditable) {
showConfirmModal({
title: translate('iou.splitExpenseCannotBeEditedModalTitle'),
prompt: translate('iou.splitExpenseCannotBeEditedModalDescription'),
confirmText: translate('common.buttonConfirm'),
shouldShowCancelButton: false,
});
return;
}
KeyboardUtils.dismiss({
afterTransition: () => {
initDraftSplitExpenseDataForEdit(draftTransaction, item.transactionID, item.reportID ?? reportID);
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.SPLIT_EXPENSE_EDIT.getRoute(item.reportID ?? reportID, item.transactionID), overviewBaseRoute));
},
});
};
Apply the same overviewBaseRoute to handleDatePress (line 585) for total consistency:
const handleDatePress = () => {
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE_CREATE_DATE_RANGE.path, overviewBaseRoute));
};
2. Scope the legacy /*/*/date/* patterns in OldRoutes.ts:
Legacy expense step routes were originally shaped as /<action>/<iouType>/date/... where action and iouType were valid enum values (e.g. create, edit, submit, split, etc.).
To safeguard against future collisions with top-level navigation routes (like /search/...), ensure getMatchingNewRoute does not redirect paths that are already known dynamic routes or contain modern prefixes (split-expense-overview-search, split-expense).
What alternative solutions did you explore? (Optional)
- Modifying only
OldRoutes.ts: While adjusting regexes prevents the rewrite, leaving/date/in the dynamic route hierarchy violates the navigation architecture by nesting the edit screen under a transient tab segment instead of the overview screen itself. - Passing
backPath:backPathrepresents the parent screen before entering the split overview (e.g. Search Root or Report), whereasSPLIT_EXPENSE_EDITmust be nested under the split overview. PassingoverviewBaseRouteis the correct hierarchical parent.
What automated tests can you add to prevent this from re-occurring?
Add a test in tests/unit/DynamicSplitExpensePageTest.tsx / tests/navigation/getMatchingNewRouteTest.ts:
it('does not rewrite split-expense edit route when navigated from Date tab', () => {
const splitEditRoute = '/search/split-expense-overview-search/split-expense/edit/123/456';
expect(getMatchingNewRoute(splitEditRoute)).toBe(undefined);
});
it('correctly constructs SPLIT_EXPENSE_EDIT dynamic route from Date tab without tab pollution', () => {
const overviewRoute = createDynamicRoute(DYNAMIC_ROUTES.MONEY_REQUEST_SPLIT_EXPENSE_SEARCH.getRoute('123', '456'));
const editRoute = createDynamicRoute(DYNAMIC_ROUTES.SPLIT_EXPENSE_EDIT.getRoute('123', '789'), overviewRoute);
expect(editRoute).toBe('/search/split-expense-overview-search/split-expense/edit/123/789');
});
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01f7d7991785f2ee01
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a split expense is opened from Spend (Search), switching to the Date tab and clicking any split row opens the Hmm... it's not here page instead of the split expense edit page (SplitExpenseEditPage).
What is the root cause of that problem?
-
When viewing a split expense on
SplitExpensePage(src/pages/iou/SplitExpensePage.tsx:554) orDynamicSplitExpensePage(src/pages/iou/DynamicSplitExpensePage.tsx:536), switching between theAmount,Percentage, andDatetabs calls:Navigation.setParams({splitType: tabName});Because
SPLIT_EXPENSE/SPLIT_EXPENSE_SEARCHare configured insrc/libs/Navigation/linkingConfig/config.tswithpath: '.../split-expense-overview/:splitType?'andpath: 'search/split-expense-overview-search/:splitType?', selecting the Date tab updates the active URL path to:- From a report:
/r/<reportID>/split-expense-overview/<transactionID>/<splitTransactionID>/date(5 path segments before/date) - From Spend (
Search):/search/split-expense-overview-search/date(2 path segments before/date)
- From a report:
-
When the user clicks a split row on the Date tab,
onSelectRownavigates to:createDynamicRoute(DYNAMIC_ROUTES.SPLIT_EXPENSE_EDIT.getRoute(reportID, item.transactionID, Navigation.getActiveRoute()))In
src/libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute.ts(lines 71–116),createDynamicRouteappends the dynamic suffixsplit-expense/edit/<reportID>/<transactionID>to the current active base path, producing:/search/split-expense-overview-search/date/split-expense/edit/<reportID>/<transactionID>?backTo=...and passes that path to
getStateFromPath(pathWithParam). -
Inside
src/libs/Navigation/helpers/getStateFromPath.ts(lines 28–55),getStateFromPathrunsfindMatchingNewRoute(normalizedPath)againstOLD_ROUTES(src/libs/Navigation/linkingConfig/OldRoutes.ts) before React Navigation parses the route. Insrc/libs/Navigation/linkingConfig/OldRoutes.ts(lines 222–223), there are legacy wildcard redirects intended for old/:action/:iouType/date/:transactionID/:reportID/:reportActionIDroutes:'/*/*/date/*/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4&reportActionID=$5', '/*/*/date/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4',In
findMatchingNewRoute, every*except the last becomes([^/]+)and the last*becomes(.+). Because/search/split-expense-overview-search/date/split-expense/edit/<reportID>/<transactionID>has exactly 2 segments before/date/($1 = "search",$2 = "split-expense-overview-search"), it matches'/*/*/date/*/*/*'with:$1 = "search"$2 = "split-expense-overview-search"$3 = "split-expense"$4 = "edit"$5 = "<reportID>/<transactionID>"
findMatchingNewRouterewrites the URL to:/r/edit/expense-date?action=search&iouType=split-expense-overview-search&transactionID=split-expense&reportID=edit&reportActionID=<reportID>/<transactionID>This routes to
DynamicIOURequestStepDatewithreportID="edit"andtransactionID="split-expense", which failsFullPageNotFoundViewvalidation and renders the Not here page! -
Broader impact in
OldRoutes.ts: All of the/*/*/<step>/...patterns insrc/libs/Navigation/linkingConfig/OldRoutes.ts(lines 193–226:category,report,tag,tax-amount,tax-rate,waypoint,attendees,confirmation,distance,distance-manual,distance-och,distance-rate,merchant,participants,subrate,time,time-rate,description,date,amount) use unconstrained/*/*/for the first two segments, even though legacy IOU step URLs always had anIOUAction(create,edit,submit,categorize,share) as their first segment ($1) and never"search"or"r"or"settings".
What changes do you think we should make in order to solve the problem?
We should prevent findMatchingNewRoute in src/libs/Navigation/helpers/getStateFromPath.ts (or the /*/*/ entries in src/libs/Navigation/linkingConfig/OldRoutes.ts) from matching modern /search/... (or non-IOU-action) routes against legacy /*/*/<step>/... redirects:
-
In
src/libs/Navigation/linkingConfig/OldRoutes.ts/src/libs/Navigation/helpers/getStateFromPath.ts:- Either remove the obsolete
/*/*/date/*/*/*and/*/*/date/*/*entries (if legacyMONEY_REQUEST_STEP_DATEdeep links are no longer used) or, to keep backward compatibility for all legacy/:action/:iouType/...deep links without ever hijacking/search/...or other 2-segment routes, restrict/*/*/patterns infindMatchingNewRoute(src/libs/Navigation/helpers/getStateFromPath.ts) so that when a pattern starts with/*/*/, the first segment ($1) must be a validCONST.IOU.ACTION(create | edit | submit | categorize | share):
// In src/libs/Navigation/helpers/getStateFromPath.ts const IOU_ACTIONS_PATTERN = Object.values(CONST.IOU.ACTION).join('|'); const compiledOldRoutes = Object.entries(OLD_ROUTES).map(([pattern, target]) => { let regexStr = pattern; const isLegacyIOURoute = regexStr.startsWith('/*/*/'); if (isLegacyIOURoute) { regexStr = regexStr.slice(4); // strip leading '/*/*' } const parts = regexStr.split('*'); const escaped = parts.map((part) => part.replaceAll(/[.*+?^${}()|[\]\\]/g, '\\$&')); let compiledBody: string; if (escaped.length === 1) { compiledBody = escaped[0]; } else { const allButLast = escaped.slice(0, -1).join('([^/]+)'); const last = escaped.at(-1); compiledBody = `${allButLast}(.+)${last}`; } const prefix = isLegacyIOURoute ? `/(${IOU_ACTIONS_PATTERN})/([^/]+)` : ''; return { regex: new RegExp(`^${prefix}${compiledBody}$`), target, }; });- This preserves every legacy
/:action/:iouType/<step>/...redirect tested intests/unit/Navigation/getStateFromPathTest.tswhile ensuring/search/split-expense-overview-search/date/split-expense/edit/:reportID/:transactionID(and any future/search/<screen>/<tab>/...dynamic route) is never hijacked byOLD_ROUTES.
- Either remove the obsolete
-
Add a unit test in
tests/unit/Navigation/getStateFromPathTest.ts:- Verify that
/search/split-expense-overview-search/date/split-expense/edit/123/456resolves toDYNAMIC_ROUTES.SPLIT_EXPENSE_EDIT. screen(SplitExpenseEdit_Root) and is not redirected to/r/edit/expense-date.
- Verify that
What alternative solutions did you explore? (Optional)
- Removing
Navigation.setParams({splitType: tabName})fromSplitExpensePage.tsx/DynamicSplitExpensePage.tsxwas considered and rejected becausesplitTypein the URL is intentionally used to preserve the active tab (amount,percentage,date) across navigation and browser refreshes.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01f7d7991785f2ee01
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal
Please re-state the problem that we are trying to solve in this issue.
When opening the split expense flow from Spend > Expenses (More > Split), switching to the Date tab, and clicking any split row, <NotFoundPage /> ("Hmm... it's not here") opens instead of the split edit page.
What is the root cause of that problem?
- When the split overview is opened from Spend > Expenses, the active route on the Date tab is
/search/split-expense-overview-search/date. - Clicking a split row in
src/pages/iou/DynamicSplitExpensePage.tsx(lines 610-626) appends the dynamicSPLIT_EXPENSE_EDITsuffix viacreateDynamicRoute, navigating to:/search/split-expense-overview-search/date/split-expense/edit/<reportID>/<transactionID> - Before normal route resolution,
getMatchingNewRoute(src/libs/Navigation/helpers/getMatchingNewRoute.ts:47-76) matches the path against legacy redirects insrc/libs/Navigation/linkingConfig/OldRoutes.ts. - In
src/libs/Navigation/linkingConfig/OldRoutes.ts(line 222), the wildcard rule:
matches any path whose 3rd segment is'/*/*/date/*/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4&reportActionID=$5',date($1 = search,$2 = split-expense-overview-search,date,$3 = split-expense,$4 = edit,$5 = <reportID>/<transactionID>) and rewrites it to:/r/edit/expense-date?action=search&iouType=split-expense-overview-search&transactionID=split-expense&reportID=edit&reportActionID=<reportID>/<transactionID>BecausereportID=editdoes not exist,<NotFoundPage />is rendered.
What changes do you think we should make in order to solve the problem?
In src/libs/Navigation/linkingConfig/OldRoutes.ts (line 222), add an explicit pass-through entry for /*/*/date/split-expense/edit/* right alongside the existing /*/*/participants/participants-details/* pass-through on line 224:
--- a/src/libs/Navigation/linkingConfig/OldRoutes.ts
+++ b/src/libs/Navigation/linkingConfig/OldRoutes.ts
@@ -220,6 +220,7 @@ const oldRoutes: Record<string, string> = {
'/*/*/description/*/*': '/r/$4/expense-description?action=$1&iouType=$2&transactionID=$3&reportID=$4',
'/*/*/date/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4',
'/*/*/date/*/*/*': '/r/$4/expense-date?action=$1&iouType=$2&transactionID=$3&reportID=$4&reportActionID=$5',
+ '/*/*/date/split-expense/edit/*': '/$1/$2/date/split-expense/edit/$3',
'/*/*/participants/*/*': '/r/$4/participants?action=$1&iouType=$2&transactionID=$3&reportID=$4',
'/*/*/participants/participants-details/*': '/$1/$2/participants/participants-details/$3',
Because getMatchingNewRoute selects the longest matching pattern (pattern.length > maxLength), '/*/*/date/split-expense/edit/*' takes precedence over '/*/*/date/*/*/*' and preserves the split edit URL (including any ?backTo= query string) while keeping legacy /*/*/date/*/* redirects intact.
What alternative solutions did you explore? (Optional)
- Skipping
oldRoutesingetMatchingNewRoutewhenever a URL contains a knownDYNAMIC_ROUTESsuffix: while broader, adding the explicit pass-through inOldRoutes.tsfollows the established pattern at line 224 with zero overhead on route matching.
@situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
@situchan Friendly check-in on #105152. The route resolution fix (overviewBaseRoute) for the Date tab split row is fully tested and ready to PR whenever you get a chance to review.
I think this is related to https://github.com/Expensify/App/issues/100874 cc @dmkt9 @roryabraham
Not overdue
Looks like #100874 is awaiting payment. Since this was created as a new issue with new assignment, I think we can fix this separately.
Edit: #100874 isn't relevant. That issue is about the background page switching to a Settings tab, which is a different mechanism.
@MelvinBot implement this
🤖 Draft PR created: Fix Not Here page when editing a split from the Date tab opened from Spend Please mark it as "Ready for review" or ask me to do that for you when it is ready for review.
It adds a pass-through entry in OldRoutes.ts so the legacy date redirect no longer rewrites the Search split edit URL. A web test confirmed the split edit page now opens from the Date tab.

