Commit 841e0f0
chore(runway): cherry-pick fix: Remove userLoggedIn conditional for route definition (#25658)
- fix: Remove userLoggedIn conditional for route definition cp-7.64.0
(#25563)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
This removes the `userLoggedIn` conditional route definition in the
navigation stack, which resolves a race condition associated with the
re-rendering of the stack. It caused users to be stuck on the LockScreen
post manual lock.
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes: #25560
## **Manual testing steps**
- Manually lock the app from settings
- Should land on the Login screen, not stuck on the Lock screen
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/4c85e502-6b3c-47d0-a37b-940a5165beed
### **After**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/24ebda8e-0da9-4169-a16b-9756cf48e634
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes the root navigation stack so `HOME_NAV` is always registered,
which can affect navigation state and route resolution during
lock/unlock/onboarding transitions. Low code churn, but touches core app
routing so regressions would surface quickly at runtime.
>
> **Overview**
> Removes the `selectUserLoggedIn`-gated conditional that only
registered `Routes.ONBOARDING.HOME_NAV` when the wallet was unlocked.
>
> `AppFlow` now always defines the `HOME_NAV` stack screen, preventing
stack re-creation/race conditions that could leave users stuck on
`LockScreen` after a manual lock.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
78b9228. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[2023252](2023252)
Co-authored-by: Cal Leung <cal.leung@consensys.net>1 parent 9049f8a commit 841e0f0
1 file changed
Lines changed: 186 additions & 196 deletions
0 commit comments