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-07-21] Conversation is not opened when opening conversation link during login #92041
Version Number: v9.3.89-1 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#91796 Email or phone of affected tester (no customers):expensify416+da2@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: macOS chrome App Component: Chat Report View
Action Performed:
Log in to the app
Copy a conversation/chat link
Log out from the app
Paste the link to browser bar
Press Enter
Log in with the same account you have signed in on step 1
Expected Result:
On finishing login, user should be redirected to the conversation room they have copied the link for on step 2
👋 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.
Please re-state the problem that we are trying to solve in this issue.
After PR #91796 was merged, deep links to chat conversations are silently dropped when the URL arrives during the login flow. The user signs in successfully but is left on the home page instead of being redirected to the linked conversation. This regression affects both this issue and the closely-related deploy blocker #92039 (Concierge deep link after login).
What is the root cause of that problem?
PR #91796 added a new guard at the top of the Linking URL subscriber, intended to prevent an "unhandled NAVIGATE" error when TabNavigator's child router has not yet mounted:
It silently drops the URL — there is no queue, retry, or replay. Once listener(url) is skipped, react-navigation never sees the URL again.
isTabNavigatorReady is always false on PublicScreens.PublicScreens.tsx declares no TAB_NAVIGATOR route at all, so during the entire login flow the guard discards every URL event (isTabNavigatorReady.ts:10-13).
The PR's fallback claim does not hold for authenticated runtime URL events. The PR comment says protected-screen links will be handled by openReportFromDeepLink via waitForProtectedRoutes(). But that function explicitly short-circuits for authenticated users at Link.ts:340-343:
// Navigation for signed users is handled by react-navigation.if(isAuthenticated){return;}
So as soon as auth flips true, openReportFromDeepLink delegates back to react-navigation — which is the very listener that just dropped the URL. The two listeners cancel each other out and the URL is lost.
Repro flow (this issue)
User pastes the chat URL in the browser bar while on the login screen. Linking emits a 'url' event; the subscribe guard discards it because TAB_NAVIGATOR is not in the public-screen route tree.
DeepLinkHandler.tsx:97-106 also receives the event and calls openReportFromDeepLink(url, ..., isCurrentlyAuthenticated=false, ...). This path can handle the case if isAuthenticated is captured as false at call time.
The Applause repro is "paste URL → press Enter → log in with the same account." On web, staging.new.expensify.com already has an auth token from a prior session in many cases, so hasAuthToken() returns true at step 2 → openReportFromDeepLink hits the early return at Link.ts:341 and does nothing. The user logs in, but no URL is ever forwarded to react-navigation.
There is also a remount race: DeepLinkHandler's listener re-registers whenever its Onyx-status dependencies change around login — if a URL arrives during the teardown/re-register window, only subscribe.ts sees it, and it gets dropped.
What changes do you think we should make in order to solve the problem?
Replace the silent drop in subscribe.ts with deferral: buffer the URL and replay it once TabNavigator becomes ready.
When isTabNavigatorReady(state) is false, store the URL in a module-local pendingUrl instead of returning.
Register a one-shot navigationRef.addListener('state', ...) that, when the root state first reports isTabNavigatorReady(newState) === true, calls listener(pendingUrl) and clears the buffer.
Coalesce on the latest URL (a newer paste replaces an older buffered URL).
This preserves the original intent of the PR (avoid dispatching nested NAVIGATE before the child router is mounted) without losing URLs that arrive during the public-screen → protected-screen transition. It also avoids the remount race in DeepLinkHandler because the URL no longer depends on which listener fires first.
A narrower alternative (less preferred) is to only block URLs whose getAdaptedStateFromPath result targets a nested-TabNavigator screen, letting root-level / RHP-only routes through unconditionally — but the deferred-replay approach is more robust and covers both #92041 and #92039.
Remove the if (isAuthenticated) return; short-circuit in openReportFromDeepLink and let DeepLinkHandler handle authenticated runtime URLs imperatively. This would also work, but it duplicates navigation logic across two paths and reverses an intentional delegation to react-navigation. Fixing the regression at the site that introduced it (subscribe.ts) is cleaner.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92041) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Conversation is not opened when opening conversation link during login[/-][+][Due for payment 2026-07-21] Conversation is not opened when opening conversation link during login[/+]on Jul 14, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.33-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@yuwenmemon The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
Activity
applause-bot commentedon May 29, 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/2c9cce8852085e216359551d68a06672c40bf3ef5f89f729727bba093f32923f
melvin-bot commentedon May 29, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #91796
melvin-bot commentedon May 29, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 29, 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:
MelvinBot commentedon May 29, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After PR #91796 was merged, deep links to chat conversations are silently dropped when the URL arrives during the login flow. The user signs in successfully but is left on the home page instead of being redirected to the linked conversation. This regression affects both this issue and the closely-related deploy blocker #92039 (Concierge deep link after login).
What is the root cause of that problem?
PR #91796 added a new guard at the top of the
LinkingURL subscriber, intended to prevent an "unhandled NAVIGATE" error whenTabNavigator's child router has not yet mounted:src/libs/Navigation/linkingConfig/subscribe.ts:35-43The guard is too aggressive in three ways:
listener(url)is skipped, react-navigation never sees the URL again.isTabNavigatorReadyis always false onPublicScreens.PublicScreens.tsxdeclares noTAB_NAVIGATORroute at all, so during the entire login flow the guard discards every URL event (isTabNavigatorReady.ts:10-13).openReportFromDeepLinkviawaitForProtectedRoutes(). But that function explicitly short-circuits for authenticated users atLink.ts:340-343:So as soon as auth flips true,
openReportFromDeepLinkdelegates back to react-navigation — which is the very listener that just dropped the URL. The two listeners cancel each other out and the URL is lost.Repro flow (this issue)
Linkingemits a'url'event; thesubscribeguard discards it becauseTAB_NAVIGATORis not in the public-screen route tree.DeepLinkHandler.tsx:97-106also receives the event and callsopenReportFromDeepLink(url, ..., isCurrentlyAuthenticated=false, ...). This path can handle the case ifisAuthenticatedis captured as false at call time.staging.new.expensify.comalready has an auth token from a prior session in many cases, sohasAuthToken()returns true at step 2 →openReportFromDeepLinkhits the early return atLink.ts:341and does nothing. The user logs in, but no URL is ever forwarded to react-navigation.DeepLinkHandler's listener re-registers whenever its Onyx-status dependencies change around login — if a URL arrives during the teardown/re-register window, onlysubscribe.tssees it, and it gets dropped.What changes do you think we should make in order to solve the problem?
Replace the silent drop in
subscribe.tswith deferral: buffer the URL and replay it onceTabNavigatorbecomes ready.Concretely, in
src/libs/Navigation/linkingConfig/subscribe.ts:isTabNavigatorReady(state)is false, store the URL in a module-localpendingUrlinstead of returning.navigationRef.addListener('state', ...)that, when the root state first reportsisTabNavigatorReady(newState) === true, callslistener(pendingUrl)and clears the buffer.This preserves the original intent of the PR (avoid dispatching nested
NAVIGATEbefore the child router is mounted) without losing URLs that arrive during the public-screen → protected-screen transition. It also avoids the remount race inDeepLinkHandlerbecause the URL no longer depends on which listener fires first.A narrower alternative (less preferred) is to only block URLs whose
getAdaptedStateFromPathresult targets a nested-TabNavigator screen, letting root-level / RHP-only routes through unconditionally — but the deferred-replay approach is more robust and covers both #92041 and #92039.What alternative solutions did you explore?
if (isAuthenticated) return;short-circuit inopenReportFromDeepLinkand letDeepLinkHandlerhandle authenticated runtime URLs imperatively. This would also work, but it duplicates navigation logic across two paths and reverses an intentional delegation to react-navigation. Fixing the regression at the site that introduced it (subscribe.ts) is cleaner.Related issues
subscribe.tsshould resolve both deploy blockers.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92041)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
IuliiaHerets commentedon May 29, 2026
Not reproducible on Windows 10/Chrome v9.3.89-3
c4365c027e514fd3ddc0b2a9fef93cae.mp4
melvin-bot commentedon May 29, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
melvin-bot commentedon May 29, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
[-]Conversation is not opened when opening conversation link during login[/-][+][Due for payment 2026-07-21] Conversation is not opened when opening conversation link during login[/+]melvin-bot commentedon Jul 14, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 14, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.33-8 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-07-21. 🎊
melvin-bot commentedon Jul 14, 2026
@yuwenmemon The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]