Skip to content

fix(ui): don't treat numeric usernames as phone numbers#8532

Open
thiskevinwang wants to merge 1 commit into
mainfrom
kevin/aie-953-clerkjavascript-dont-parse-a-numeric-username-as-phonenumber
Open

fix(ui): don't treat numeric usernames as phone numbers#8532
thiskevinwang wants to merge 1 commit into
mainfrom
kevin/aie-953-clerkjavascript-dont-parse-a-numeric-username-as-phonenumber

Conversation

@thiskevinwang
Copy link
Copy Markdown
Member

Description

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:

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 12, 2026 8:55pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: ace9af6

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

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension 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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Review 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: CHILL

Plan: Pro

Run ID: 1d34c2f3-789e-4a12-8f4a-33984b97be4d

📥 Commits

Reviewing files that changed from the base of the PR and between c6335ca and ace9af6.

📒 Files selected for processing (3)
  • .changeset/quiet-dancers-carry.md
  • packages/ui/src/utils/__tests__/formatSafeIdentifier.test.ts
  • packages/ui/src/utils/formatSafeIdentifier.ts
✅ Files skipped from review due to trivial changes (1)
  • .changeset/quiet-dancers-carry.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ui/src/utils/tests/formatSafeIdentifier.test.ts

📝 Walkthrough

Walkthrough

This PR updates formatSafeIdentifier to require that phone-like strings do not start with '+' before being treated as phone numbers (adds !str.startsWith('+') to the early-return guard). It adds a test asserting the numeric string "4245554242" is returned unchanged and creates a changeset noting the fix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description contains only the contribution template and unchecked checklist items without meaningful context about the changes, making it difficult to understand the PR's intent. Add a brief explanation of the issue being fixed, how the fix works, and testing instructions to make the description more informative.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: preventing numeric usernames from being treated as phone numbers, which aligns with all file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8532

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: ace9af6

@thiskevinwang thiskevinwang force-pushed the kevin/aie-953-clerkjavascript-dont-parse-a-numeric-username-as-phonenumber branch from bec4d05 to c6335ca Compare May 12, 2026 19:55
@thiskevinwang thiskevinwang force-pushed the kevin/aie-953-clerkjavascript-dont-parse-a-numeric-username-as-phonenumber branch from c6335ca to 5931b01 Compare May 12, 2026 20:53
@thiskevinwang thiskevinwang force-pushed the kevin/aie-953-clerkjavascript-dont-parse-a-numeric-username-as-phonenumber branch from 5931b01 to ace9af6 Compare May 12, 2026 20:54
@thiskevinwang thiskevinwang requested review from brkalow May 12, 2026 20:58
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