Skip to content

[CP Staging] Revert "Gate deep-link navigation on TabNavigator mount via lifecycle signal"#95942

Merged
rlinoz merged 1 commit into
mainfrom
revert-92482-claude-fixTabNavigatorDeepLinkRaceV2
Jul 13, 2026
Merged

[CP Staging] Revert "Gate deep-link navigation on TabNavigator mount via lifecycle signal"#95942
rlinoz merged 1 commit into
mainfrom
revert-92482-claude-fixTabNavigatorDeepLinkRaceV2

Conversation

@rlinoz

@rlinoz rlinoz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Reverts #92482

$ #95878

@github-actions

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

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.

Files with missing lines Coverage Δ
...on/AppNavigator/Navigators/TabNavigator.native.tsx 96.87% <ø> (-0.19%) ⬇️
...avigation/AppNavigator/Navigators/TabNavigator.tsx 0.00% <ø> (ø)
src/libs/Navigation/linkingConfig/subscribe.ts 28.57% <ø> (+7.51%) ⬆️
src/libs/actions/Link.ts 28.64% <2.38%> (+0.28%) ⬆️
... and 10 files with indirect coverage changes

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@rlinoz

rlinoz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Can't repro after the revert.

WhatsApp.Video.2026-07-13.at.09.38.02.mp4

@rlinoz rlinoz marked this pull request as ready for review July 13, 2026 12:34
@rlinoz rlinoz requested review from a team as code owners July 13, 2026 12:34
@melvin-bot melvin-bot Bot requested review from NicolasBonet and joekaufmanexpensify and removed request for a team July 13, 2026 12:34
@melvin-bot

melvin-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown

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: 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".

Comment thread src/libs/actions/Link.ts
signOutAndRedirectToSignIn(true);
return;
}
Navigation.waitForProtectedRoutes().then(() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 rlinoz merged commit 8364c19 into main Jul 13, 2026
49 of 50 checks passed
@rlinoz rlinoz deleted the revert-92482-claude-fixTabNavigatorDeepLinkRaceV2 branch July 13, 2026 14:04
@rlinoz rlinoz changed the title Revert "Gate deep-link navigation on TabNavigator mount via lifecycle signal" [CP Staging] Revert "Gate deep-link navigation on TabNavigator mount via lifecycle signal" Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@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.

OSBotify pushed a commit that referenced this pull request Jul 13, 2026
…vigatorDeepLinkRaceV2

Revert "Gate deep-link navigation on TabNavigator mount via lifecycle signal"

(cherry picked from commit 8364c19)

(cherry-picked to staging by Beamanator)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jul 13, 2026
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.33-2 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

⚠️ Something went wrong. This may be a transient issue — try again. If it persists, check status.anthropic.com.

Run details

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 Ready To Build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants