Repository navigation
feat(mosaic): restore the opener's options when the user profile modal reopens after a redirect - #10528
Closed
alexcarpenter wants to merge 17 commits into
Closed
feat(mosaic): restore the opener's options when the user profile modal reopens after a redirect#10528alexcarpenter wants to merge 17 commits into
alexcarpenter wants to merge 17 commits into
Conversation
… match URL segments
Skip account custom pages under the organization/ prefix in UserProfile, and keep only the first custom page per path in both profiles, warning about the rest.
When the active organization changes and the open page is no longer listed, the profile now stores the page it shows instead of keeping the old one, so switching back no longer reopens it. Applies to OrganizationProfile and the combined UserProfile.
… from the switchers
…ls in integration tests
… OAuth redirect Connect and Reconnect from the Mosaic user profile modal now carry __clerk_mosaic_modal=user-profile/account through the OAuth round trip. MosaicProvider strips the param on mount and reopens the profile on the Account page. Mosaic no longer writes the legacy __clerk_modal_state param, which the clerk-js UI would act on.
…l reopens after a redirect
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 2a0d34f The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen 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 |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
austincalvelage
force-pushed
the
fredrik/return-to-connected-accounts
branch
from
October 29, 2026 22:02
2c19a24 to
e5dd116
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stacked on #10523.
When the Mosaic
UserProfilemodal reopens after an OAuth or SSO redirect, it now gets back the options its opener passed:customPages,pageOrder,additionalOAuthScopes,apiKeysProps,modeandorganizationProfileProps.useModalOpener(surface, opener, options)registers the opener's current options with the modal host. A reopen with no explicit options uses them, and explicit options still win. UserButton and OrganizationSwitcher both register for the user profile, each under its own key, so neither overwrites the other's options.__clerk_mosaic_opener=user-button|organization-switchernext to__clerk_mosaic_modal. On return both params are stripped and the profile reopens for that opener. If the opener is missing, the last registered opener is used.__clerk_modal_stateparam is no longer written.Missing pieces
UserProfilehardcodesmode='mounted'until feat(mosaic): export UserProfile and OrganizationProfile #10514 fixes it, so the return params are not written from inside the real modal yet.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change