Skip to content

[CP Staging] Revert "Wait for TabNavigator mount before resolving waitForProtectedRoutes"#92046

Merged
mountiny merged 1 commit into
mainfrom
revert-91796-claude-fixTabNavigatorDeepLinkRace
May 29, 2026
Merged

[CP Staging] Revert "Wait for TabNavigator mount before resolving waitForProtectedRoutes"#92046
mountiny merged 1 commit into
mainfrom
revert-91796-claude-fixTabNavigatorDeepLinkRace

Conversation

@yuwenmemon
Copy link
Copy Markdown
Contributor

@yuwenmemon yuwenmemon commented May 29, 2026

Reverts #91796

Fixed Issues

$ #92023
$ #92030
$ #92041

@yuwenmemon yuwenmemon requested review from a team as code owners May 29, 2026 06:52
@melvin-bot melvin-bot Bot requested review from JmillsExpensify and removed request for a team May 29, 2026 06:53
@yuwenmemon yuwenmemon changed the title Revert "Wait for TabNavigator mount before resolving waitForProtectedRoutes" [CP Staging] Revert "Wait for TabNavigator mount before resolving waitForProtectedRoutes" May 29, 2026
@melvin-bot melvin-bot Bot requested review from inimaga and removed request for a team May 29, 2026 06:53
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 29, 2026

@inimaga 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]

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/libs/Navigation/linkingConfig/subscribe.ts 23.07% <ø> (+4.32%) ⬆️
src/libs/Navigation/Navigation.ts 51.55% <0.00%> (+0.21%) ⬆️
... and 7 files with indirect coverage changes

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bb097d099

ℹ️ 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".

// before any child router is registered to handle it.
return isTabNavigatorReady(state);
// If one protected screen is in the routeNames then other screens are there as well.
return state?.routeNames.includes(PROTECTED_SCREENS.CONCIERGE);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep waiting until TabNavigator mounts

When AuthScreens first mounts, routeNames already contains Concierge even though the nested TabNavigator route may still have no realized child state. Resolving waitForProtectedRoutes() at this point lets callers such as openReportFromDeepLink() dispatch Navigation.navigate(route) for report/workspace routes before the tab child router is registered, which React Navigation cannot handle and the deep link is effectively lost during sign-in/cold-start races. The readiness check needs to include the TabNavigator's mounted/non-stale nested state, not just a protected root screen name.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straight revert

@mountiny mountiny merged commit 1a666a5 into main May 29, 2026
39 of 44 checks passed
@mountiny mountiny deleted the revert-91796-claude-fixTabNavigatorDeepLinkRace branch May 29, 2026 11:52
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 29, 2026

@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@melvin-bot melvin-bot Bot added the Emergency label May 29, 2026
OSBotify pushed a commit that referenced this pull request May 29, 2026
…vigatorDeepLinkRace

[CP Staging] Revert "Wait for TabNavigator mount before resolving waitForProtectedRoutes"

(cherry picked from commit 1a666a5)

(cherry-picked to staging by mountiny)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label May 29, 2026
@OSBotify
Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions
Copy link
Copy Markdown
Contributor

🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.89-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@MelvinBot
Copy link
Copy Markdown
Contributor

🤖 I reviewed the changes in this PR.

No help site updates are required.

This PR reverts #91796, removing internal navigation code in src/libs/Navigation/ that handled a TabNavigator mount race during deep linking. The changes are purely internal:

  • src/libs/Navigation/Navigation.ts — removes the waitForTabNavigatorReady step
  • src/libs/Navigation/helpers/isTabNavigatorReady.ts — deleted helper
  • src/libs/Navigation/linkingConfig/subscribe.ts — removes the subscription that tracked tab navigator readiness

There are no user-facing feature changes, no new/removed UI elements, no settings or workflow behavior changes, and nothing that would surface in customer-facing documentation under App/docs/articles. Since reverts of internal plumbing don't introduce any product changes, no draft PR is being created.

@yuwenmemon, please confirm — if you believe customer-facing behavior did shift as a result of this revert, let me know and I'll open a docs PR.

@mountiny
Copy link
Copy Markdown
Contributor

Not emergency, straight revert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants