Repository navigation
Revert "Fix Onboarding modal does not appear until clearing cache" - #103645
carlosmiceli wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30f0b4fd18
ℹ️ 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".
| * route). OnboardingGuard and useOnboardingFlowRouter gate whether/when a user actually lands here. | ||
| */} | ||
| {!shouldSuppressPromotionalUI && !isVisitingSecureLink && !shouldHideOnboardingNavigator && ( | ||
| {!shouldSuppressPromotionalUI && !isVisitingSecureLink && !Navigation.isValidateLoginFlow() && ( |
There was a problem hiding this comment.
Subscribe before gating onboarding on the active route
When AuthScreens initially renders with VALIDATE_LOGIN focused, this condition omits ONBOARDING_MODAL_NAVIGATOR, but the component no longer subscribes to root navigation-state changes. On a fresh sign-up where the onboarding data finishes loading before validation completes, leaving the validation screen alone therefore neither registers the navigator nor reruns useOnboardingFlowRouter, so onboarding can remain absent until an unrelated rerender or app-data reset. Restore the root-navigation-state subscription so completing validation immediately updates this gate.
Useful? React with 👍 / 👎.
| * route). OnboardingGuard and useOnboardingFlowRouter gate whether/when a user actually lands here. | ||
| */} | ||
| {!shouldSuppressPromotionalUI && !isVisitingSecureLink && !shouldHideOnboardingNavigator && ( | ||
| {!shouldSuppressPromotionalUI && !isVisitingSecureLink && !Navigation.isValidateLoginFlow() && ( |
There was a problem hiding this comment.
Preserve an existing onboarding route during validation
If a user already in onboarding opens a validation link and AuthScreens rerenders while VALIDATE_LOGIN is focused, this predicate unregisters the onboarding screen even though its route is already in the root stack. React Navigation then discards that route and its nested state, so returning from validation loses the user's in-progress onboarding position; the gate should hide onboarding only when validation is active and the onboarding route has not already been registered.
Useful? React with 👍 / 👎.
Reverts #103550