[CP Staging] Revert "Gate deep-link navigation on TabNavigator mount via lifecycle signal"#95942
Conversation
|
🚧 rlinoz has triggered a test Expensify/App build. You can view the workflow run here. |
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.
|
This comment has been minimized.
This comment has been minimized.
|
🚧 rlinoz has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Can't repro after the revert. WhatsApp.Video.2026-07-13.at.09.38.02.mp4 |
|
@NicolasBonet Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d95fcae94
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| signOutAndRedirectToSignIn(true); | ||
| return; | ||
| } | ||
| Navigation.waitForProtectedRoutes().then(() => { |
There was a problem hiding this comment.
Defer post-login deep-link navigation until tabs mount
When a signed-out user opens a protected deep link and finishes sign-in on a cold start, waitForProtectedRoutes() can resolve as soon as AuthScreens exposes protected root route names, while TAB_NAVIGATOR is still being loaded via getComponent and its child tab router has not mounted yet. This block then proceeds to the Navigation.navigate(...) call for routes like r/:reportID; because that target lives inside TAB_NAVIGATOR, the action can be unhandled and the Onyx connection is already disconnected, so the original link is silently lost. Please keep the navigation gated on the tab navigator being mounted before entering this handler.
Useful? React with 👍 / 👎.
| whenTabNavigatorReady().then(() => listener(url)); | ||
| return; | ||
| } | ||
| listener(url); |
There was a problem hiding this comment.
Defer URL events until the tab router is ready
For protected URL events that arrive just after the auth stack is available, TAB_NAVIGATOR is already declared by AuthScreens but its lazy child router may not have mounted yet. Forwarding the URL immediately lets React Navigation build an action for a screen nested under TAB_NAVIGATOR (for example r/:reportID or search/settings links) before any navigator can handle it, and this subscription path has no retry, so the incoming link is dropped. Please wait for the tab navigator mount signal before calling the listener in that window.
Useful? React with 👍 / 👎.
|
🚧 rlinoz has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…vigatorDeepLinkRaceV2 Revert "Gate deep-link navigation on TabNavigator mount via lifecycle signal" (cherry picked from commit 8364c19) (cherry-picked to staging by Beamanator)
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.33-2 🚀
|
|
|
Reverts #92482
$ #95878