Skip to content

feat(mosaic): add the sign-in identifier step's phone and username fields - #10792

Merged
austincalvelage merged 17 commits into
mainfrom
austin/mosaic-sign-in-identifier
Nov 13, 2026
Merged

austincalvelage merged 17 commits into
mainfrom
austin/mosaic-sign-in-identifier

Conversation

@austincalvelage

@austincalvelage austincalvelage commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the sign-in identifier step's other fields, following the legacy screens below. Work in progress: the table lists each legacy screen in this group, and the Mosaic column fills in as each view lands.

  • The identifier step names its field: { kind: 'identifier'; field; nextField? }, where field is email, email-or-username, username or phone. Phone uses PhoneInput. With nextField, the label row shows legacy's switch link ("Use phone", "Use email", "Use username", "Use email or username"), which calls the new optional onSwitchField.
  • New Field.Header part (.cl-field-header): a row with the label at the start and an action at the end, as in the Mosaic 2.0 sign-in designs. The action sits outside the label, so pressing it doesn't focus the control.
  • With onPasskey, the step shows legacy's "Use passkey instead" link under the field. Mosaic's card footer lays actions out in a row, so the link sits in the card body rather than under Continue.
  • New identifier variant { kind: 'identifier'; field: 'phone'; channel } for an alternative phone channel such as WhatsApp: legacy's title, description and "{provider} phone number" label, and "Use another method" beside Continue. IdentifierStep routes between it and the start screen, as CredentialStep does.
  • "Last used": lastUsedProviderId puts that provider in ProviderButtonGroup's lastUsed row with its badge, and the identifier step's lastUsed flag shows a badge on the field's label row when there is no switch link, as legacy does. The field badge is Mosaic's filled neutral Badge; legacy's is outlined.
  • Both identifier screens render Captcha (feat(mosaic): add the Captcha element for clerk-js Turnstile #10796) under the field, where legacy renders CaptchaElement, so clerk-js has somewhere to show Turnstile's interactive challenge.
  • While Turnstile shows an interactive challenge, the start screen spotlights it as legacy does: the providers, form and Continue are hidden (display: none and inert, still mounted so the form keeps its values). Captcha gains onInteractiveChange, which reports when clerk-js sets or clears data-cl-interactive.
  • With onJoinWaitlist, the step shows legacy's "Want early access? Join waitlist" in place of the sign-up prompt, for instances in waitlist mode.
  • "Forgot password?" moves from under the password input to the label row, as in legacy and the designs.
  • The field's label, placeholder and switch-link copy come from a tested identifierFieldCopy helper in sign-in.utils.ts.
  • The sign-up and waitlist prompts and the passkey link stay in the card body, above Continue, following the existing Mosaic sign-in layout. Legacy and the Mosaic 2.0 designs put them below Continue.

Stacked on #10796.

Legacy and Mosaic

View Legacy Mosaic
Phone
Username
Email or username
Passkey
Alternative phone channel (WhatsApp)
Last used provider
Last used identifier
Captcha (Cloudflare test sitekey, interactive challenge)
Join waitlist
Password, with "Forgot password?" on the label row

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 12, 2026 11:35pm UTC
swingset Ready Ready Preview Nov 12, 2026 11:35pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af7f19c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6096fab and af7f19c.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The sign-in flow now supports email, username, email-or-username, and phone identifiers. It adds an alternative provider channel, passkey and waitlist prompts, field switching, and last-used provider indicators. CAPTCHA reports changes to its interactive state. Field.Header places actions beside field labels, and the password step uses it for the forgot-password action. Stories and tests cover these changes. An empty changeset file was also added.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: kylemac, alexcarpenter, ephem

Merge Risk: Low · previous review 6096f

On the alternative phone-channel sign-in screen, the phone form and Continue button likely stay usable while an interactive CAPTCHA challenge is shown. The ordinary identifier screen hides and disables them in that case. This is a minor inconsistency that can be fixed in follow-up work.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the sign-in identifier step's phone and username fields, which the changeset adds. It is specific and matches the main change. It does not cover the many other parts of the changeset, …
Description check Passed The description states the purpose of the change: the sign-in identifier step's other fields. It lists the new field types, the Field.Header part, passkey and waitlist links, last-used indicators, cap…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the sign-in identifier step's phone and username fields, which the changeset adds. It is specific and matches the main change. It does not cover the many other parts of the changeset, such as last-used indicators, captcha behavior, and the Field.Header part, but the task does not require full coverage.

Full details: Description check

Explanation

The description states the purpose of the change: the sign-in identifier step's other fields. It lists the new field types, the Field.Header part, passkey and waitlist links, last-used indicators, captcha, and copy helpers. It also includes legacy and Mosaic comparison screenshots and a checklist. It is directly related to the changeset.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 385c35f and 6096fab.

Files selected for processing: 4

  • packages/mosaic/src/features/sign-in/sign-in.view.tsx
  • packages/mosaic/src/features/sign-in/steps/identifier-step.tsx
  • packages/mosaic/src/features/sign-in/steps/sign-in-alternative-channel.tsx
  • packages/mosaic/src/features/sign-in/steps/sign-in-captcha.tsx
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

@pkg-pr-new

pkg-pr-new Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10792

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10792

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10792

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10792

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10792

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10792

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10792

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10792

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10792

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10792

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10792

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10792

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10792

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10792

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10792

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10792

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10792

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10792

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10792

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10792

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10792

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10792

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10792

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10792

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10792

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10792

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10792

commit: af7f19c

@austincalvelage
austincalvelage force-pushed the austin/mosaic-sign-in-identifier branch from ec87b1a to e17dc23 Compare November 12, 2026 20:35
@austincalvelage
austincalvelage changed the base branch from main to austin/mosaic-captcha November 12, 2026 20:35
@austincalvelage
austincalvelage force-pushed the austin/mosaic-sign-in-identifier branch from e17dc23 to f69000c Compare November 12, 2026 20:43
@austincalvelage
austincalvelage force-pushed the austin/mosaic-sign-in-identifier branch from 0952d8e to 75cf4a6 Compare November 12, 2026 20:51
@austincalvelage
austincalvelage force-pushed the austin/mosaic-sign-in-identifier branch from 75cf4a6 to 959c71d Compare November 12, 2026 21:07
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 12, 2026 21:24 Inactive
@austincalvelage
austincalvelage force-pushed the austin/mosaic-sign-in-identifier branch from 6096fab to af7f19c Compare November 12, 2026 23:33
@austincalvelage
austincalvelage merged commit ba88e30 into main Nov 13, 2026
57 checks passed
@austincalvelage
austincalvelage deleted the austin/mosaic-sign-in-identifier branch November 13, 2026 00:35

This branch was successfully deployed

2 active deployments
Preview – swingset — af7f19c2 Deployed Nov 12, 2026 by vercel[bot]
Preview – clerk-js-sandbox — af7f19c2 Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants