Skip to content

fix(mosaic): stop the key warning from element values inside rich() markup - #10888

Merged
alexcarpenter merged 2 commits into
mainfrom
carp/mosaic-oauth-fix
Nov 18, 2026
Merged

alexcarpenter merged 2 commits into
mainfrom
carp/mosaic-oauth-fix

Conversation

@alexcarpenter

Copy link
Copy Markdown
Member

Description

OAuthConsent logged React's "Each child in a list should have a unique key" warning in development. The subtitle copy puts the redirect domain button inside {#nowrap}…{/nowrap}, and rich() passed the parts inside a tag to the tag's component as an array. That array held the unkeyed button element.

rich() now wraps those parts in a Fragment before passing them on, the same way it already builds its top-level output.

  • The tag components passed to rich() today (auth-wallets link, sign-up-legal-consent link, oauth-consent renderNowrap) only render {children}, so getting a Fragment instead of an array doesn't change their output.

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 Nov 18, 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 18, 2026 7:24pm UTC
mosaic-docs Ready Ready Preview Nov 18, 2026 7:24pm UTC
swingset Ready Ready Preview Nov 18, 2026 7:24pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f11d6ed

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

This PR includes changesets to release 3 packages
Name Type
@clerk/mosaic Patch
@clerk/mosaic-docs 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

@coderabbitai

coderabbitai Bot commented Nov 18, 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 f6dab17 and f11d6ed.

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 localization renderer now wraps parsed rich-markup child nodes in a React Fragment before passing them to a matched component. When no component is registered, the renderer uses the same Fragment. A test checks the rendered HTML and verifies that rendering does not call console.error. A patch changeset documents the development warning associated with consent-subtitle copy.

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

Suggested reviewers: austincalvelage, ephem

Merge Risk: Minimal · previous review f6dab

This fixes a development-only React key warning in consent subtitle copy without changing rendered output. Merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and its scope. It states that the React key warning caused by element values inside rich() markup stops. This matches the summary, the description, and the objectives, which al…
Description check Passed The description states the bug: OAuthConsent logs the React unique key warning in development. It explains the cause: rich() passes tag parts as an array that holds an unkeyed button. It names the fix…
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 fix and its scope. It states that the React key warning caused by element values inside rich() markup stops. This matches the summary, the description, and the objectives, which all describe wrapping rich() tag parts in a Fragment.

Full details: Description check

Explanation

The description states the bug: OAuthConsent logs the React unique key warning in development. It explains the cause: rich() passes tag parts as an array that holds an unkeyed button. It names the fix: rich() wraps the parts in a Fragment. It also notes that the existing tag components render only children, so output does not change. This matches the changeset.

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: 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 dca6a65 and f6dab17.

Files selected for processing: 3

  • .changeset/mosaic-rich-markup-key-warning.md
  • packages/mosaic/src/localization/__tests__/messages.test.tsx
  • packages/mosaic/src/localization/messages.ts
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 5 reviews per hour.

@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: f11d6ed

@blacksmith-sh

blacksmith-sh Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Matches OAuthConsent logs no key warning

Rendering OAuthConsentView logged one key warning before the fix and none after; the subtitle renders the same.

Merge-base

Console errors

This PR f6dab179

Console errors

Subtitle in swingset

Proof on f6dab179 · mocked: Clerk API (the OAuthConsent story renders the view from fixtures) · Did Proof get it right? Yes · No

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

@alexcarpenter
alexcarpenter enabled auto-merge (squash) November 18, 2026 19:23
@alexcarpenter
alexcarpenter merged commit 7b347dd into main Nov 18, 2026
59 checks passed
@alexcarpenter
alexcarpenter deleted the carp/mosaic-oauth-fix branch November 18, 2026 19:34

This branch was successfully deployed

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