You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reports - Central panel changes from Submit tab to Expense tab when refreshing split RHP #81981
Version Number: v9.3.16-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:#79897 Email or phone of affected tester (no customers):expensify416+da2@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: macOS chrome App Component: Search
Action Performed:
Create a workspace.
Create an expense in the workspace.
Go to Reports > Submit (do not go to Expenses tab).
Click on the expense
Click More dropdown button > Split.
Refresh the page.
Expected Result:
Reports > Submit tab should be displayed in the background
Actual Result:
Reports > Expenses tab is displayed on the background
Please re-state the problem that we are trying to solve in this issue.
When a user is on the Search > Submit tab, clicks on an expense, clicks "Split" from the
More dropdown, and then refreshes the page, the background tab switches to Expenses
instead of staying on the Submit tab.
What is the root cause of that problem?
When refreshing the split expense page, the app reconstructs navigation state from the
URL. The function getSearchParamFromPath() extracts the q parameter to determine
which search tab to display:
The split expense URL contains a backTo path segment that, when decoded, reveals
another URL with its own backTo query parameter. The actual search query
(q=...action:submit...) is nested inside this second backTo.
The current code only decodes one level deep - it finds backTo=... but doesn't look
inside it for the q parameter. Without finding q, the code defaults to showing the
Expenses tab.
What changes do you think we should make in order to solve the problem?
Modify getSearchParamFromPath() in src/libs/Url.ts to check for nested backTo
parameters when the requested parameter isn't found at the first level:
constbackToQueryString=decodedBackTo.slice(backToQueryIndex+1);constdirectResult=getParamFromQueryString(backToQueryString);if(directResult!==null){returndirectResult;}// If param not found directly, check for nested backTo parameters constnestedBackToMatch=backToQueryString.match(/(?:^|&)backTo=([^&]*)/);constnestedBackToValue=nestedBackToMatch?.[1];if(nestedBackToValue){constdecodedNestedBackTo=safeDecode(safeDecode(nestedBackToValue));constnestedQueryIndex=decodedNestedBackTo.indexOf('?');if(nestedQueryIndex!==-1){constnestedQueryString=decodedNestedBackTo.slice(nestedQueryIndex+1);returngetParamFromQueryString(nestedQueryString);}}returnnull;
Activity
imadirtydog commentedon Feb 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user is on the Search > Submit tab, clicks on an expense, clicks "Split" from the
More dropdown, and then refreshes the page, the background tab switches to Expenses
instead of staying on the Submit tab.
What is the root cause of that problem?
When refreshing the split expense page, the app reconstructs navigation state from the
URL. The function
getSearchParamFromPath()extracts theqparameter to determinewhich search tab to display:
App/src/libs/Url.ts
Lines 114 to 129 in ef6d827
The split expense URL contains a
backTopath segment that, when decoded, revealsanother URL with its own
backToquery parameter. The actual search query(
q=...action:submit...) is nested inside this secondbackTo.The current code only decodes one level deep - it finds
backTo=...but doesn't lookinside it for the
qparameter. Without findingq, the code defaults to showing theExpenses tab.
What changes do you think we should make in order to solve the problem?
Modify
getSearchParamFromPath()insrc/libs/Url.tsto check for nestedbackToparameters when the requested parameter isn't found at the first level:
melvin-bot commentedon Feb 19, 2026
Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon May 4, 2026
@jponikarchuk, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.