Repository navigation
fix(web): stop sign-in with an email code from landing back on /signin - #14704
Open
dylanjeffers wants to merge 1 commit into
Open
dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
After a sign-in that needed an email code, the sign-on saga resets the form status right after success. The navigation to the completion route is often still pending at that point (it suspends on lazy pages), so the sign-on page rendered the form again. That remounted the sign-in routes, whose first-mount redirect from /signin/confirm-email to /signin cancelled the navigation. The user was signed in but left on the form. Keep redirecting once sign-on has succeeded. Also stop the email code page from marking a plain sign-in as a sign-up, which opened the sign-up welcome modal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After a sign-in that needed an email code, the user was signed in but stayed on the sign-in form until they clicked the X. The sign-up "Welcome to Audius!" modal also opened over it.
Sequence, from a recorder on a real sign-in (ms):
SIGN_IN_SUCCEEDED.SignOnPagerenders<Navigate to="/feed">(push at 109422). React holds that navigation while lazyFeedPageloads, so the sign-on tree stays mounted.resetSignOn, which sets status back toediting(109833).SignOnPagerenders the form again, which remountsSignInRootPage. Its first-mount rule turns/signin/confirm-emailinto<Navigate to="/signin" replace>(replace at 109838), which cancels the pending/feednavigation.It needs the email-code step (at plain
/signinthe remount showsSignInPageand doesn't redirect) and a/feedrender slower than the account fetch. That's most likely on a cold cache, like a tab opened straight to/signin.The welcome modal:
ConfirmEmailPagedispatchedstartSignUp()on every submit. Since #14131 that flag opens the Welcome modal inSignOnPage.Fix
SignOnPagekeeps rendering the completion<Navigate>once sign-on has succeeded, so a status reset can't bring the form back mid-navigation.ConfirmEmailPageonly dispatchesstartSignUp()for guests, who finish sign-up from there. The incomplete-account resume paths in the sign-in saga already setstartedSignUpProcessthroughopenSignOn.Test plan
/signin, email + code →/feed, then replaced to/signin. Signed in, form and welcome modal shown./feed, no welcome modal.tsc --noEmit🤖 Generated with Claude Code