Skip to content

feat(ui): expose composed profile API via @clerk/ui/experimental#9136

Open
alexcarpenter wants to merge 2 commits into
carp/profile-stack-06-composed-orgprofilefrom
carp/profile-stack-07-experimental-entry
Open

feat(ui): expose composed profile API via @clerk/ui/experimental#9136
alexcarpenter wants to merge 2 commits into
carp/profile-stack-06-composed-orgprofilefrom
carp/profile-stack-07-experimental-entry

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Jul 10, 2026

Copy link
Copy Markdown
Member

Stack 7/7 (top). Wires everything up: the composed barrel, the @clerk/ui/experimental flat named exports, the package.json/tsdown entrypoint, and the integration tests.

This is the only PR that changes the public surface. Merges the full composed UserProfile / OrganizationProfile API.

Changesets live only on the release PR #9144; this PR carries none.


Stack

Reviewed as a stack. The 7 PRs merge bottom-up into release branch #9144, which integrates into main as a single unit.

# PR Layer
#9144 release → main (integration)
1 #9130 moduleManager getter across build boundary
2 #9131 shared profile UI infra
3 #9132 extract Section components from profile pages
4 #9133 composed shell + providers infra
5 #9134 composed UserProfile
6 #9135 composed OrganizationProfile
7 #9136 👈 expose @clerk/ui/experimental (public API)

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d987559

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 no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 15, 2026 7:56pm
swingset Error Error Jul 15, 2026 7:56pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 3be4a03c-3786-4faa-9b72-10af212a56cc

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

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

@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-07-experimental-entry branch from d61f967 to 98c4da7 Compare July 13, 2026 14:08
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-06-composed-orgprofile branch from 8ffd832 to 480ab9b Compare July 13, 2026 14:08
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-07-experimental-entry branch from 98c4da7 to e2f1c34 Compare July 13, 2026 14:12
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-06-composed-orgprofile branch from 480ab9b to 30a2ce9 Compare July 13, 2026 14:12
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-06-composed-orgprofile branch from 30a2ce9 to b54f566 Compare July 13, 2026 14:34
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-07-experimental-entry branch from e2f1c34 to 38f6bb3 Compare July 13, 2026 14:34
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-06-composed-orgprofile branch from b54f566 to c430ecc Compare July 13, 2026 19:20
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-07-experimental-entry branch from 38f6bb3 to 84be728 Compare July 13, 2026 19:20
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-06-composed-orgprofile branch from c430ecc to bf2e82d Compare July 15, 2026 14:08
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-07-experimental-entry branch from 84be728 to 38a3186 Compare July 15, 2026 14:08
@alexcarpenter alexcarpenter marked this pull request as ready for review July 15, 2026 15:03
Comment on lines +50 to +61
describe('@clerk/ui/experimental flat exports', () => {
for (const name of EXPECTED_EXPORTS) {
it(`exports ${name} as a component`, () => {
expect(typeof (experimental as Record<string, unknown>)[name]).toBe('function');
});
}

it('does not export the compound namespace objects', () => {
expect((experimental as Record<string, unknown>).UserProfile).toBeUndefined();
expect((experimental as Record<string, unknown>).OrganizationProfile).toBeUndefined();
});
});

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.

❓ wdyt about a snapshot test here? feels more maintainable instead of the static list

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. Roster is now a sorted-keys snapshot, plus a typeof-function guard over all exports and the namespace-absent check.

Comment thread packages/ui/src/experimental/index.ts Outdated
Comment on lines +3 to +12
// Each component is a top-level named export (not a property on a namespace
// object) so React Server Components create a client reference for it. That lets
// consumers render these directly in a Server Component tree without adding their
// own `'use client'` boundary — the `'use client'` directive lives on each leaf
// file, and re-exporting forwards those references unchanged. A namespace object
// (`UserProfile.Account`) would expose only the object as a client reference and
// break property access across the RSC boundary.
//
// The export roster is maintained once, in the per-directory `index` files under
// `../composed`; this module just re-exports it.

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.

this context doesn't really seem relevant to maintain here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed the re-export note; kept only the RSC rationale.

Comment thread packages/ui/package.json Outdated
{
"name": "@clerk/ui",
"version": "1.25.2",
"version": "1.24.2",

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.

undo

Suggested change
"version": "1.24.2",
"version": "1.25.2",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reverted to 1.25.2 (accidental downgrade).

- Restore @clerk/ui version to 1.25.2 (accidental downgrade)
- Trim non-essential re-export note from experimental/index.ts
- Convert flat-exports roster to a snapshot test
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-06-composed-orgprofile branch from d3a7fbe to f3a1169 Compare July 15, 2026 20:26
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-07-experimental-entry branch from 8a799d3 to d987559 Compare July 15, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants