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
[Due for payment 2026-09-15] Domains - Destination domain does not open from search router when on another domain page #100112
Version Number: 9.4.66-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#98753 Email or phone of affected tester (no customers):applausetester+khcategory19@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Workspace Settings
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #98753 - "92752 search router domain navigation" by @nabi-ebrahimi (High confidence that it introduced the regression; Medium confidence on the exact navigator mechanism below) Related Issues: None found
Recommendation: REVERT
The PR is self-contained (2 source files + 1 test file), it is the most recent change to both source files, and the whole "Go to " suggestion set it added is brand new, so nothing depends on it — reverting removes the broken entry point without side effects. A roll-forward is only preferable if the team wants to keep the feature today and can land the cross-domain navigation fix described below (plus a regression test) quickly.
Assigned: @nabi-ebrahimi (PR author), @trjExpensify, @carlosmiceli, @marufsharifi (approving reviewers) from the causing PR only Labels: No changes. DeployBlockerCash stays (App-side fix, App deploy is blocked). DeployBlocker was never applied, so nothing to remove.
📋 Detailed Analysis
Evidence
PR 92752 search router domain navigation #98753 is the PR that added per-domain "Go to Domain members / Domain admins / Groups / SAML" entries to the Search Router: buildDomainNavigationItems and its wiring at useNavigationSuggestions.tsx#L267-L283. Before this PR the reported repro was impossible — there was no way to jump straight from one domain's page into another domain's page; you always had to go through the Domains list.
Timeline matches: merged 2026-09-01 12:02 UTC, first shipped in 9.4.66-0 (deploy checklist Deploy Checklist: New Expensify 2026-09-02 #100087), reported the same day. Not reproducible in production because the feature isn't there yet.
The suggestion items themselves are built correctly — each item carries its own domain's route (ROUTES.DOMAIN_MEMBERS/ADMINS/GROUPS/SAML.getRoute(domain.accountID) in getDomainMenuItems.ts#L52-L81) and domain.accountID is the same identifier the Domains list uses (DomainsListPage.tsx#L86-L96). So the emitted route is domain/<other-domain>/saml — the breakage happens when that route is applied to the navigation state.
Verification
Files involved in the affected flow, all confirmed by reading them at 2aeff10:
git log/gh api confirm #98753 is the latest change to both source files on main, so a revert applies cleanly.
Root Cause
Navigation.navigate('domain/<B>/saml') while a domain page is already open resolves inside the currently mounted domain split navigator, which belongs to domain A:
getMinimalAction walks down the action while the payload name equals the focused route name at each level — TAB_NAVIGATOR → WORKSPACE_NAVIGATOR → DOMAIN_SPLIT_NAVIGATOR. Params are never compared, so domainAccountID: A vs B is invisible to it and the dispatched action ends up target-ed at domain A's split navigator key.
Nothing distinguishes two instances of the split navigator: DOMAIN_SPLIT_NAVIGATOR is registered without a getId (WorkspaceNavigator.tsx#L51-L55), and React Navigation's StackRouter matches NAVIGATE by route name only, so the existing domain-A instance is reused rather than a new domain-B one being pushed.
Consequently the domain-scoped state of that navigator stays on the previous domain: the sidebar route Domain_Initial keeps domainAccountID: A, the preserved split state is domain A's, and SplitRouter.adaptStateIfNecessary continues to seed sidebar/central routes from the existing domain-A params (SplitRouter.ts#L60-L93). The result the tester sees is the requested page rendered in the previous domain's context.
This is a pre-existing limitation of the split navigators (workspaces have the same shape, but you can only switch workspaces from the Workspaces list, which is outside the split navigator, so a fresh split is always pushed there). PR #98753 is the first entry point that jumps from inside one domain straight into another, which is why it surfaced now, and why the fix belongs in App.
If rolling forward instead of reverting, the domain suggestions need to force a new split-navigator instance when the target domainAccountID differs from the one currently open (e.g. dismiss to ROUTES.DOMAINS_LIST / push a fresh DOMAIN_SPLIT_NAVIGATOR before navigating), or the navigator needs a getId keyed on domainAccountID so React Navigation stops reusing the previous domain's instance. Either way, please add a navigation test that starts on domain/<A>/members and asserts the state after navigating to domain/<B>/saml — the existing tests in tests/unit/SearchRouterNavigationTest.ts only assert the built route strings, so they can't catch this.
Note: this analysis is static (the repro requires two admin domains and a running client). The causing PR is unambiguous; the exact React Navigation step at which the domain identity is dropped is my best reading of the navigator code and should be confirmed by whoever picks up the fix.
@marufsharifi@carlosmiceli I missed this case because my test account has only one Domain, and I could not add a second Domain to test navigation from Domain A to Domain B. The existing single-Domain flows worked correctly, while this issue only occurs in the cross-Domain scenario.
If the team can provide access to a test account with two Domains, I can validate the complete flow and prepare a focused follow-up PR for this edge case.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.73-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-09-15. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
The account is an administrator for at least two domains.
Test:
Open Domain A and select Domain members.
Open Search Router using CMD/CTRL + K.
Search for SAML.
Select the SAML result associated with Domain B.
Verify that the Domain B SAML page opens.
Verify that both the Domain sidebar and page title display Domain B.
Repeat the same flow from Domain B back to Domain A.
Verify that the selected page, Domain sidebar, and page title all correspond to the destination Domain.
I missed this case because my test account has only one Domain, and I could not add a second Domain to test navigation from Domain A to Domain B. The existing single-Domain flows worked correctly, while this issue only occurs in the cross-Domain scenario.
If the team can provide access to a test account with two Domains, I can validate the complete flow and prepare a focused follow-up PR for this edge case.
Also.. fwiw.. this seems like an edge case that I don't think should lower the price of the parent issue.
Activity
applause-bot commentedon Sep 2, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/d6e8e9e8c90925cc14f51e453fc3846b4061cd51f6b84e8ad84f0402e634ae22
melvin-bot commentedon Sep 2, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #98753
melvin-bot commentedon Sep 2, 2026
@trjExpensify @carlosmiceli @marufsharifi you have been assigned to this deploy blocker because you reviewed the offending PR: #98753
github-actions commentedon Sep 2, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Sep 2, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Sep 2, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #98753 - "92752 search router domain navigation" by @nabi-ebrahimi (High confidence that it introduced the regression; Medium confidence on the exact navigator mechanism below)
Related Issues: None found
Recommendation: REVERT
The PR is self-contained (2 source files + 1 test file), it is the most recent change to both source files, and the whole "Go to " suggestion set it added is brand new, so nothing depends on it — reverting removes the broken entry point without side effects. A roll-forward is only preferable if the team wants to keep the feature today and can land the cross-domain navigation fix described below (plus a regression test) quickly.
Assigned: @nabi-ebrahimi (PR author), @trjExpensify, @carlosmiceli, @marufsharifi (approving reviewers) from the causing PR only
Labels: No changes.
DeployBlockerCashstays (App-side fix, App deploy is blocked).DeployBlockerwas never applied, so nothing to remove.📋 Detailed Analysis
Evidence
buildDomainNavigationItemsand its wiring at useNavigationSuggestions.tsx#L267-L283. Before this PR the reported repro was impossible — there was no way to jump straight from one domain's page into another domain's page; you always had to go through the Domains list.9.4.66-0(deploy checklist Deploy Checklist: New Expensify 2026-09-02 #100087), reported the same day. Not reproducible in production because the feature isn't there yet.ROUTES.DOMAIN_MEMBERS/ADMINS/GROUPS/SAML.getRoute(domain.accountID)in getDomainMenuItems.ts#L52-L81) anddomain.accountIDis the same identifier the Domains list uses (DomainsListPage.tsx#L86-L96). So the emitted route isdomain/<other-domain>/saml— the breakage happens when that route is applied to the navigation state.Verification
Files involved in the affected flow, all confirmed by reading them at
2aeff10:src/components/Search/SearchRouter/useNavigationSuggestions.tsx— modified by 92752 search router domain navigation #98753; the domain items call plainNavigation.navigate(route)(L282), invoked from the Search Router at SearchRouter.tsx#L396-L401.src/pages/domain/getDomainMenuItems.ts— modified by 92752 search router domain navigation #98753 (type export only).DOMAIN_SPLIT_NAVIGATOR(DomainSplitNavigator.tsx) and read the domain from their own route params (e.g. DomainSamlPage.tsx#L47).git log/gh apiconfirm #98753 is the latest change to both source files onmain, so a revert applies cleanly.Root Cause
Navigation.navigate('domain/<B>/saml')while a domain page is already open resolves inside the currently mounted domain split navigator, which belongs to domain A:getMinimalActionwalks down the action while the payload name equals the focused route name at each level —TAB_NAVIGATOR→WORKSPACE_NAVIGATOR→DOMAIN_SPLIT_NAVIGATOR. Params are never compared, sodomainAccountID: AvsBis invisible to it and the dispatched action ends uptarget-ed at domain A's split navigator key.DOMAIN_SPLIT_NAVIGATORis registered without agetId(WorkspaceNavigator.tsx#L51-L55), and React Navigation'sStackRoutermatchesNAVIGATEby route name only, so the existing domain-A instance is reused rather than a new domain-B one being pushed.Domain_InitialkeepsdomainAccountID: A, the preserved split state is domain A's, andSplitRouter.adaptStateIfNecessarycontinues to seed sidebar/central routes from the existing domain-A params (SplitRouter.ts#L60-L93). The result the tester sees is the requested page rendered in the previous domain's context.This is a pre-existing limitation of the split navigators (workspaces have the same shape, but you can only switch workspaces from the Workspaces list, which is outside the split navigator, so a fresh split is always pushed there). PR #98753 is the first entry point that jumps from inside one domain straight into another, which is why it surfaced now, and why the fix belongs in App.
If rolling forward instead of reverting, the domain suggestions need to force a new split-navigator instance when the target
domainAccountIDdiffers from the one currently open (e.g. dismiss toROUTES.DOMAINS_LIST/ push a freshDOMAIN_SPLIT_NAVIGATORbefore navigating), or the navigator needs agetIdkeyed ondomainAccountIDso React Navigation stops reusing the previous domain's instance. Either way, please add a navigation test that starts ondomain/<A>/membersand asserts the state after navigating todomain/<B>/saml— the existing tests intests/unit/SearchRouterNavigationTest.tsonly assert the built route strings, so they can't catch this.Note: this analysis is static (the repro requires two admin domains and a running client). The causing PR is unambiguous; the exact React Navigation step at which the domain identity is dropped is my best reading of the navigator code and should be confirmed by whoever picks up the fix.
view run
nabi-ebrahimi commentedon Sep 2, 2026
@marufsharifi @carlosmiceli I missed this case because my test account has only one Domain, and I could not add a second Domain to test navigation from Domain A to Domain B. The existing single-Domain flows worked correctly, while this issue only occurs in the cross-Domain scenario.
If the team can provide access to a test account with two Domains, I can validate the complete flow and prepare a focused follow-up PR for this edge case.
carlosmiceli commentedon Sep 2, 2026
@trjExpensify I think we can demote this one, but maybe you think it's a bigger issue on prod than what it seems to me.
17 remaining items
melvin-bot commentedon Sep 8, 2026
@marufsharifi
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.73-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-09-15. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Sep 11, 2026
@marufsharifi Whoops! This issue is 2 days overdue. Let's get this updated quick!
marufsharifi commentedon Sep 14, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Sep 14, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Sep 14, 2026
Payment Summary
Resolving PRs:
Fix cross-Domain Search Router navigation #100150
Assignee: @nabi-ebrahimi requires payment (Needs manual offer from BZ)
Assignee: @marufsharifi requires payment (Needs manual offer from BZ)
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 16, 2026
No payment due to @marufsharifi or @nabi-ebrahimi as they worked on the offending issue.
Also.. fwiw.. this seems like an edge case that I don't think should lower the price of the parent issue.