Skip to content

fix(mosaic): gate the alternative channel Continue and show its phone field errors - #10957

Open
austincalvelage wants to merge 1 commit into
austin/mosaic-auth-start-over-blockfrom
austin/mosaic-auth-alternative-channel-submit
Open

austincalvelage wants to merge 1 commit into
austin/mosaic-auth-start-over-blockfrom
austin/mosaic-auth-alternative-channel-submit

Conversation

@austincalvelage

@austincalvelage austincalvelage commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Description

Two fixes to AuthAlternativeChannel, the "Continue with WhatsApp" phone screen. Mosaic sign-up uses it from #10930, and the sign-in view renders it too. Stacked on #10956.

1. Continue stays disabled until the form can submit. In Mosaic's form, canSubmit gates the whole form, so pressing Continue with an empty number did nothing visible. This is the pattern in form.doc.ts and the other Mosaic forms that gate on canSubmit.

<SubmitButton form={form.id} fullWidth disabled={!form.canSubmit} focusableWhenDisabled ...>

2. The phone field shows the form's error for it. Sign-up puts a server error such as an invalid number on the phoneNumber field through FormSubmitError. The screen only read an errorMessage prop that sign-up never set, so sign-up showed nothing. It now reads the field's feedback from the form it renders, as form.doc.ts shows.

const { feedback } = form.fields.phoneNumber;

The block no longer takes errorMessage, so its two callers (the sign-up view and the sign-in identifier step) stop passing it. Mosaic sign-in is a view with no controller yet, so no real flow changes. Its other steps still take a string error.

Sign-up's WhatsApp tests in #10930 cover both through FAPI: "keeps Continue disabled on the WhatsApp phone screen until the phone number is filled" and "shows a rejected phone number on the WhatsApp phone screen and leaves it behind on the form".

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 23, 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 24, 2026 5:50am UTC
mosaic-docs Ready Ready Preview Nov 24, 2026 5:50am UTC
swingset Ready Ready Preview Nov 24, 2026 5:50am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

AuthAlternativeChannel now reads phone-field feedback from form state and disables its submit button when form.canSubmit is false. The disabled button remains focusable. The errorMessage prop was removed from the component and its sign-in and sign-up call sites. Sign-in tests cover submission states and accessible feedback for a rejected phone number.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to e01db

The change keeps Continue disabled on the alternative-channel phone screen until the form can submit, and it shows server errors under the phone field. The change is small and self-contained, and no concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two changes in the PR: the alternative channel Continue button is gated on form.canSubmit, and the phone field shows its feedback. The changeset to packages/mosaic/src/blocks/auth/…
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.
Description check Passed The description states two concrete fixes to AuthAlternativeChannel: gating the Continue button on form.canSubmit, and reading phone field feedback from form.fields.phoneNumber. It also notes that the…
Full details: Title check

Explanation

The title names the two changes in the PR: the alternative channel Continue button is gated on form.canSubmit, and the phone field shows its feedback. The changeset to packages/mosaic/src/blocks/auth/auth-alternative-channel.tsx removes errorMessage and reads form.fields.phoneNumber.feedback, and it disables the submit button when canSubmit is false. The title is specific and matches the main change.

Full details: Description check

Explanation

The description states two concrete fixes to AuthAlternativeChannel: gating the Continue button on form.canSubmit, and reading phone field feedback from form.fields.phoneNumber. It also notes that the errorMessage prop is removed and that the sign-up and sign-in callers stop passing it. This matches the changeset, which removes errorMessage and disables the submit button when canSubmit is false.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: This review skipped 6 repositories. Cross-repository analysis may be incomplete. Check linked repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fa0fdae and e01dbbf.

Files selected for processing: 5

  • .changeset/mosaic-auth-alternative-channel-submit.md
  • packages/mosaic/src/blocks/auth/auth-alternative-channel.tsx
  • packages/mosaic/src/features/sign-in/__tests__/sign-in-view.feature.test.tsx
  • packages/mosaic/src/features/sign-in/steps/identifier-step.tsx
  • packages/mosaic/src/features/sign-up/sign-up.view.tsx
Linked repositories identified

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

Files with no reviewable changes: 2

  • packages/mosaic/src/features/sign-in/steps/identifier-step.tsx
  • packages/mosaic/src/features/sign-up/sign-up.view.tsx

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

@changeset-bot

changeset-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: faaa57c

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

@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: faaa57c

@austincalvelage
austincalvelage force-pushed the austin/mosaic-auth-alternative-channel-submit branch from f090364 to 4766757 Compare November 23, 2026 18:42
@austincalvelage
austincalvelage removed this pull request from stack #10958 November 23, 2026 18:43
@austincalvelage
austincalvelage force-pushed the austin/mosaic-auth-alternative-channel-submit branch from 4766757 to 47503ea Compare November 23, 2026 19:54
@austincalvelage
austincalvelage force-pushed the austin/mosaic-auth-alternative-channel-submit branch from 47503ea to be9ab7e Compare November 23, 2026 20:12
@austincalvelage
austincalvelage force-pushed the austin/mosaic-auth-alternative-channel-submit branch from be9ab7e to 517461d Compare November 23, 2026 22:16
@austincalvelage
austincalvelage marked this pull request as ready for review November 23, 2026 22:27
@blacksmith-sh

blacksmith-sh Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Matches Continue disabled until a phone number is entered

Base: Continue shows as enabled with an empty number. Head: it is aria-disabled, a click submits nothing, and it enables once a number is typed.

Merge-base

Empty number, clicked

This PR faaa57cd

Empty number, clicked

Also checked · 2 match

Matches Rejected phone number shows under the field in sign-up
Matches Sign-in identifier step gets both fixes

Proof on faaa57cd (from 517461d7) · mocked: Clerk sign-up and sign-in API (Mosaic sign-up and sign-in have no controllers in this stack, so each story's on...) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

AuthAlternativeChannel now keeps Continue disabled until the form can
submit, and reads the phone field's error from the form, so a server
error that lands on phoneNumber shows under the phone field. The block
no longer takes an errorMessage prop. Sign-up never set it, which is why
its alternative phone screen showed no field error.

This branch was successfully deployed

2 active deployments
Preview – swingset — faaa57cd Deployed Nov 24, 2026 by vercel[bot]
Preview – clerk-js-sandbox — faaa57cd Deployed Nov 24, 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.

1 participant