Skip to content

refactor(ui): shared profile UI infra (style cache, appearance overrides, StrictMode fix)#9131

Merged
alexcarpenter merged 3 commits into
carp/profile-releasefrom
carp/profile-stack-02-ui-infra
Jul 16, 2026
Merged

refactor(ui): shared profile UI infra (style cache, appearance overrides, StrictMode fix)#9131
alexcarpenter merged 3 commits into
carp/profile-releasefrom
carp/profile-stack-02-ui-infra

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Jul 10, 2026

Copy link
Copy Markdown
Member

Stack 2/7. Behavior-preserving @clerk/ui infra the composed layer builds on:

  • Emotion style-cache sharing (createEmotionCache, StyleCacheProvider, styleCacheStore)
  • AppearanceOverrides element
  • Animated StrictMode double-invoke fix
  • ProfilePageSectionProfilePagePanel rename (internal to elements/ProfileCard)

Why styleCacheStore (WeakMap): invariant = one cl-internal emotion cache per clerk instance (two live caches, same key → dup style inserts + broken emotion dedup/ordering). AIO gets it free from its single portal tree. Composed mounts N sibling React roots (UserProfile + OrganizationProfile) per instance, so it keys the cache on the clerk instance → siblings reuse one cache instead of each making its own. Same createEmotionCache factory both paths; store is just the sharing channel.

No new public API. Note: if the Animated StrictMode fix should ship standalone, promote to a @clerk/ui patch.

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: d8a8647

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 8:28pm
swingset Ready Ready Preview, Comment Jul 15, 2026 8:28pm

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: 59d51d69-266e-4662-97c9-241aa72354b0

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.

@github-actions github-actions Bot added the ui label Jul 10, 2026
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-02-ui-infra branch from efa84cb to cf0c160 Compare July 13, 2026 14:08
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-01-module-manager branch from e2d4168 to c67cdb2 Compare July 13, 2026 14:08
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-01-module-manager branch from c67cdb2 to 9f03814 Compare July 13, 2026 14:12
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-02-ui-infra branch from cf0c160 to 06330fc Compare July 13, 2026 14:12
@alexcarpenter alexcarpenter force-pushed the carp/profile-stack-02-ui-infra branch from 06330fc to 444ebfb Compare July 13, 2026 14:34
@alexcarpenter alexcarpenter marked this pull request as ready for review July 15, 2026 15:04
A rebase over #9098 dropped the searchInput and searchInputClearButton
entries from ElementsConfig and APPEARANCE_KEYS, breaking @clerk/ui's
type-check (SearchInput.tsx still references them) and, in turn, every
downstream build including the swingset preview deploy.
@alexcarpenter alexcarpenter changed the title refactor(ui): shared profile UI infra (style-cache sharing, appearance overrides, Animated StrictMode fix, ProfilePagePanel) refactor(ui): shared profile UI infra (style cache, appearance overrides, StrictMode fix) Jul 15, 2026
@alexcarpenter alexcarpenter deleted the branch carp/profile-release July 16, 2026 11:58
Base automatically changed from carp/profile-stack-01-module-manager to carp/profile-release July 16, 2026 11:58
@alexcarpenter alexcarpenter reopened this Jul 16, 2026
@alexcarpenter alexcarpenter merged commit 4c65fe5 into carp/profile-release Jul 16, 2026
15 of 16 checks passed
@alexcarpenter alexcarpenter deleted the carp/profile-stack-02-ui-infra branch July 16, 2026 12:00
alexcarpenter added a commit that referenced this pull request Jul 16, 2026
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