Skip to content

refactor(ui): resolve mosaic messages through the shared helpers - #9787

Merged
alexcarpenter merged 2 commits into
mainfrom
carp/mosaic-messages-usages
Sep 16, 2026
Merged

alexcarpenter merged 2 commits into
mainfrom
carp/mosaic-messages-usages

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Description

Follows up #9786 by moving every Mosaic feature onto the shared message helpers:

  • Deletes the four per-feature copies of fill and plural and imports them from src/mosaic/utils/messages.ts.
  • Replaces the inline .replace('{provider}', …) calls in the connected-account, web3-wallet and enterprise-account rows and dialogs with fill.
  • Replaces the .split('{emailAddress}') pattern in the remove-email, remove-phone and verify-email-link dialogs with rich, so the bolded value is authored in the messages file as {#strong}…{/strong}.
  • Passes the resend countdown span in the verify-email-link, add-email and add-phone dialogs as an element value, so the string stays Resend ({seconds}) and the view owns the wrapper.
  • Renames the *Base exports to *Messages so every messages file exports the same shape under the same name.

No rendered output changes.

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

vercel Bot commented Sep 16, 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 16, 2026 5:49pm UTC
swingset Ready Ready Preview Sep 16, 2026 5:49pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af10813

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 Sep 16, 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: 74c458e4-03d1-4dc1-9758-298fef41ec69

📥 Commits

Reviewing files that changed from the base of the PR and between 50ca009 and af10813.

📒 Files selected for processing (37)
  • .changeset/mosaic-messages-usages.md
  • packages/ui/src/mosaic/features/reverification/reverification.messages.ts
  • packages/ui/src/mosaic/features/reverification/reverification.view.tsx
  • packages/ui/src/mosaic/features/user-button/user-button.messages.ts
  • packages/ui/src/mosaic/features/user-button/user-button.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.messages.ts
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-email.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-list-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-username.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-email-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-name-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-phone-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-picture-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-remove-email.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-remove-phone.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-username-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-verify-email-link.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-verify-email-link.messages.ts
  • packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-verify-email-sso.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-connected-account-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.messages.ts
  • packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-enterprise-accounts-section/user-profile-enterprise-account-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-password-section/user-profile-edit-password.controller.ts
  • packages/ui/src/mosaic/features/user-profile/user-profile-password-section/user-profile-edit-password.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-password-section/user-profile-password-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-password-section/user-profile-password-section.messages.ts
  • packages/ui/src/mosaic/features/user-profile/user-profile-password-section/user-profile-password-section.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-remove-connected-account.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-remove-web3-wallet.dialog.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile-web3-wallet-row.view.tsx
  • packages/ui/src/mosaic/features/user-profile/user-profile.messages.ts
  • packages/ui/src/mosaic/features/user-profile/user-profile.view.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)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/cli (auto-detected)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)

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


📝 Walkthrough

Walkthrough

The change renames Mosaic message exports and removes feature-local fill and plural helpers. Consumers now import shared formatting utilities. Account-section messages use rich markup for styled email, phone, and countdown values. Several profile labels and descriptions now use shared fill interpolation instead of direct string replacement. A Changesets delimiter block was added.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: austincalvelage

Merge Risk: ⚪ Minimal · up to af108

The message-helper migration has no identified behavior regression requiring changes before 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 10 functions across 36 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: refactoring Mosaic message handling to use shared helpers.
Description check ✅ Passed The description directly explains the shared-helper refactor, removed duplicated utilities, renamed exports, interpolation changes, and unchanged rendered output.
Full details: Docstring Coverage

Explanation

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 10 functions across 36 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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

@austincalvelage austincalvelage left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice cleanup!

Base automatically changed from carp/mosaic-messages to main September 16, 2026 17:42
@pkg-pr-new

pkg-pr-new Bot commented Sep 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: af10813

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-09-16T17:52:27.499Z

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 af10813.

@alexcarpenter
alexcarpenter merged commit ed14d41 into main Sep 16, 2026
81 of 86 checks passed
@alexcarpenter
alexcarpenter deleted the carp/mosaic-messages-usages branch September 16, 2026 18:22

This branch was successfully deployed

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