fix(signup): register-only chooser (SIGNUP-CHOOSER-02) - #178
Merged
Conversation
SIGNUP-CHOOSER-02: Login opens credentials only. Create account alone offers Log in with session / Continue registration / Remove / Create new, with separate X vs Y actions on conflict.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the auth “account chooser” interstitial into a register-only flow (SIGNUP-CHOOSER-02), ensuring login mode never shows the “Already started?” interstitial and that session-vs-pending conflicts present distinct actions instead of a merged “Continue as”.
Changes:
- Reworks
AuthWizardchooser state + rendering to be register-only, with cancellation guards to avoid stale async updates painting after mode switches. - Replaces generic chooser logic with register-specific helpers (
shouldShowRegisterChooser,registerChooserActions,registerChooserBody, etc.) and updates action handling accordingly. - Updates unit tests to match the new chooser behavior and action set.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/shell/src/auth/AuthWizard.tsx | Converts chooser to a register-only interstitial with new state, rendering gates, and updated action handling. |
| apps/shell/src/auth/accountChooser.ts | Introduces register-only chooser decision logic, action construction, and body/label helpers. |
| apps/shell/src/auth/accountChooser.test.ts | Updates tests to validate the new register-only chooser behavior and copy/labels. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+123
to
+133
| if (opts.pendingKind === "register" || opts.pendingKind === "login") { | ||
| if (pendingEmail || opts.pendingKind) { | ||
| actions.push({ | ||
| id: "remove_registration", | ||
| label: pendingEmail | ||
| ? `Remove this registration` | ||
| : "Remove this registration", | ||
| email: pendingEmail ?? undefined, | ||
| }); | ||
| } | ||
| } |
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.
Summary
Test plan
cd apps/shell && npx vitest run src/auth(56 passed)?auth=loginwith session → credentials, not Already started??auth=registerwith session/pending → interstitial with distinct X/Y actions when conflict