Skip to content

fix(ui): hide use another method for reverification when only one method - #9681

Merged
Ephem merged 3 commits into
mainfrom
fredrik/hide-alternative-strategies
Sep 9, 2026
Merged

Ephem merged 3 commits into
mainfrom
fredrik/hide-alternative-strategies

Conversation

@Ephem

@Ephem Ephem commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Description

Fix so one never ends up here:

CleanShot 2026-09-08 at 16 07 35

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:

@changeset-bot

changeset-bot Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 46118ac

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

This PR includes changesets to release 3 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension Patch
@clerk/swingset Patch

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

@vercel

vercel Bot commented Sep 8, 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 Sep 8, 2026 3:09pm UTC
swingset Ready Ready Preview Sep 8, 2026 3:09pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Team

Run ID: c592c079-0e20-42d7-9e49-6855d647bb83

📥 Commits

Reviewing files that changed from the base of the PR and between 3853076 and 46118ac.

📒 Files selected for processing (1)
  • packages/ui/src/components/UserVerification/AlternativeMethods.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)

Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


📝 Walkthrough

Walkthrough

The reverification strategy hook now exposes a unified alternative-strategy flag. Factor-one and factor-two components use this flag to control alternative-method UI. The backup-code card accepts an optional callback and hides the control when no alternative exists. Tests cover password-only, email-only, TOTP-only, and backup-code-only flows. A patch changeset was added for @clerk/ui.

Priority: ⬇️ Low — Defer this narrow reverification UI change because it only hides an alternative-method control when no other factor is available.

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

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 46118

The reverification UI now suppresses alternative-method controls when no alternative verification method exists, preventing users from reaching an empty method-selection screen. The change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: hiding “Use another method” during reverification when only one method is available.
Description check ✅ Passed The description directly relates to the UI fix and explains that users should not reach the empty “Use another method” screen.
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.
  • Fix all pre-merge checks with AI

Warning

Linked repositories: Your configuration references 7 linked repositories, but your current plan allows 5. Analyzed clerk/clerk_go, clerk/dashboard, clerk/accounts, clerk/backoffice, clerk/clerk, skipped clerk/clerk-docs, clerk/cloudflare-workers.


Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 46118ac

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-09-08T15:10:25.801Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 46118ac.

@dmoerner dmoerner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

@Ephem
Ephem merged commit dcd065a into main Sep 9, 2026
51 checks passed
@Ephem
Ephem deleted the fredrik/hide-alternative-strategies branch September 9, 2026 09:02

This branch was successfully deployed

2 active deployments
Preview – swingset — 46118ac4 Deployed Sep 8, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 46118ac4 Deployed Sep 8, 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