[CP Staging] fix deeplink issue - #101528
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@abdulrahuman5196 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp101525.mov101551.movAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari101525.mov101551.mov |
🤖 ReviewBlocking: this flip re-opens [$250] Public room-anon user first time tapping on sign in button or a thread open public room, the bug the guard was added for one day ago in Fix: anonymous user first time tapping on sign in button or a thread open public room. The guard was the only behavioral change in that PR, and this inverts it — so on the To be clear: the diagnosis is right — the old Suggested fix — keep your new skip, then add the discriminator: const deeplinkRoute = route as Route;
// Already focused — nothing to do.
if (deeplinkRoute && Navigation.isActiveRoute(deeplinkRoute)) {
return;
}
// The deeplinked report is still mounted under what the user just opened (sign-in RHP or a thread), so they
// reached it and moved on — re-navigating would yank them back (#96346). If it isn't in the tree at all they
// never got there (they were on the sign-in screen), so the deeplink must still be honored (#101525/#101551).
if (reportID && Navigation.getReportRouteByID(reportID)) {
return;
}
Why #96346 comes back — evidence
Other findings
I was not able to verify any of this in a live browser: both flows start from a signed-out state, and signing out ends this session unrecoverably. Everything above is from source. Next Steps: Reply with |
🤖 Regression huntThree regressions beyond the [$250] Public room-anon user first time tapping on sign in button or a thread open public room reopening I flagged earlier. Finding 1 is the important one — it's new behavior present in neither the pre-Fix: anonymous user first time tapping on sign in button or a thread open public room code nor current The framing that fixes most of this: the guard is in the wrong place, not the wrong polarity. It sits at the top of
1. The not-found fallback is now dead on cold start ⬅️ new, worstThe guard is the first statement in And "deeplink route is already active" is the normal cold-start case. This function already documents that, 75 lines up, in the secure-link branch — Link.ts:551-553:
React-navigation builds the nav state from the URL itself, and Repro: signed out, force-close, tap a link to a report you can't access (deleted room, non-participant DM, or garbage This also makes the deferred Scope: all platforms on cold start. Warm native deeplinks (the iOS - Logged out user is not redirected to the correct conversation when navigate via link / iOS - Anonymous user does not land on a public room via link flows) still work, because 2.
|
|
🚧 lakchote has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
[CP Staging] fix deeplink issue (cherry picked from commit 6e383b7) (cherry-picked to staging by mountiny)
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.84-3 🚀
|
🤖 Help site review: no changes requiredNo draft docs PR was created — nothing under Why: this PR changes one line in What I searched in
|
| Search | Result |
|---|---|
deep link / deeplink |
One hit — Connect-Cursor-to-Expensify-Using-MCP.md:31, a cursor:// install URL. Unrelated. |
public room |
One hit — Chat-Features-and-Moderation-Tools.md:125, about moderation. Says nothing about anonymous access via a link. |
sign in / log in / login |
Reviewed Login-Troubleshooting.md. Its only "link" reference is the unblock-email banner. Nothing describes where you land after signing in. |
copy link / share the link / chat url / conversation link |
No article documents opening or sharing a chat URL, or the post-sign-in destination. |
No article states the current (buggy) behavior, so there is nothing to correct; and no article would need to gain content, since the fixed behavior is what a reader would already assume.
Separately — this merged as [CP Staging] while my earlier review flagged that the condition flip re-opens [$250] Public room-anon user first time tapping on sign in button or a thread open public room. That's unrelated to the docs question, but worth confirming on staging before the next deploy.
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.86-0 🚀
|
🤖 Help site review: no changes requiredNo draft PR created — nothing under Why: the only file this PR touches is What I searchedI grepped all of
The help site documents no deep link or anonymous public room navigation behavior that this change would contradict or make stale. Since there's no help site PR, there's nothing for you to mark Separately: this merged with the concern from my earlier review unaddressed — inverting the guard re-opens [$250] Public room-anon user first time tapping on sign in button or a thread open public room. Worth a follow-up. Next Steps: Reply with |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.89-0 🚀
|
🤖 Help site review: no docs changes requiredNo draft PR created — nothing under Why: this PR changes one internal navigation guard in What I checked in
The help site simply doesn't document the sign-in-then-redirect flow or anonymous public-room link access anywhere, so there's no existing article that this fix makes stale and no gap that this fix creates. Since no help site PR exists, there's nothing to mark Next Steps: Reply with |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.89-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.90-0 🚀
|
🤖 Help site review: no changes requiredNo draft PR created — this change needs no help site updates. This PR touches one guard condition in What I checked in
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.4.90-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
fix deeplink issue
Fixed Issues
$ #101525
#101551
PROPOSAL:
Tests
Precondition:
Steps:
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-09-18.at.14.46.45.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari