Skip to content

refactor(mosaic): export one props type per component - #10876

Merged
alexcarpenter merged 1 commit into
mainfrom
carp/mosaic-type-exports
Nov 17, 2026
Merged

alexcarpenter merged 1 commit into
mainfrom
carp/mosaic-type-exports

Conversation

@alexcarpenter

Copy link
Copy Markdown
Member

Description

@clerk/mosaic now exports one props type per component: SwitcherProps, UserButtonProps, OrganizationSwitcherProps, ProfileProps, UserProfileProps and OrganizationProfileProps.

  • Drops CombinedSwitcherProps, CombinedProfileProps and ProfileMode from the package exports. They were branches of the mode unions, not types a consumer needs. A mode is still available as NonNullable<ProfileProps['mode']>.
  • None of the three has been released, so this isn't breaking. The two pending changesets that announced them are corrected instead of adding a new one.
  • UserButtonProps and OrganizationSwitcherProps are now exported from their own component files.

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 17, 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 17, 2026 8:36pm UTC
swingset Ready Ready Preview Nov 17, 2026 8:36pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1c08463

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 2 packages
Name Type
@clerk/mosaic Minor
@clerk/swingset Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@alexcarpenter
alexcarpenter enabled auto-merge (squash) November 17, 2026 20:36
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes revise which Mosaic prop types are exported from component modules and the package entry point. They remove the named exports CombinedSwitcherProps, CombinedProfileProps, and ProfileMode, and add prop type re-exports for UserButton and OrganizationSwitcher. The profile type test and two changeset notes use the updated type names. Component exports and switcher behavior remain unchanged.

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

Possibly related PRs

  • clerk/javascript#10752: Introduces the Switcher mode and prop contract that this change updates and re-exports.

Suggested reviewers: austincalvelage, ephem

Merge Risk: Minimal · up to 1c084

This refactor changes which prop types Mosaic exports and has no runtime effect. The removed types were not previously released, so the merge risk is minimal. Run the build and typecheck before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: the mosaic package now exports one props type per component. It names the refactor scope and matches the changeset, which removes the Combined* and ProfileMode types …
Description check Passed The description states that the package now exports one props type per component. It lists the removed types (CombinedSwitcherProps, CombinedProfileProps, ProfileMode), the non-breaking rationale, and…
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 states the main change: the mosaic package now exports one props type per component. It names the refactor scope and matches the changeset, which removes the Combined* and ProfileMode types and adds per-component props type exports.

Full details: Description check

Explanation

The description states that the package now exports one props type per component. It lists the removed types (CombinedSwitcherProps, CombinedProfileProps, ProfileMode), the non-breaking rationale, and the relocated UserButtonProps and OrganizationSwitcherProps exports. It matches the raw summary and objectives.

  • 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 8229dfa and 1c08463.

Files selected for processing: 8

  • .changeset/mosaic-profile-component.md
  • .changeset/mosaic-switcher.md
  • packages/mosaic/src/features/organization-switcher/organization-switcher.tsx
  • packages/mosaic/src/features/profile/profile.test-d.tsx
  • packages/mosaic/src/features/profile/profile.tsx
  • packages/mosaic/src/features/switcher/switcher.tsx
  • packages/mosaic/src/features/user-button/user-button.tsx
  • packages/mosaic/src/index.ts
Linked repositories identified

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

Files with no reviewable changes: 1

  • packages/mosaic/src/features/profile/profile.tsx

Included review availability: This review used your included allowance. 1 included review remains 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 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 1c08463

@alexcarpenter
alexcarpenter merged commit 1739c13 into main Nov 17, 2026
132 of 136 checks passed
@alexcarpenter
alexcarpenter deleted the carp/mosaic-type-exports branch November 17, 2026 21:36

This branch was successfully deployed

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