Repository navigation
feat(mosaic): open legacy hash URLs in path and hash routing - #11129
Draft
austincalvelage wants to merge 8 commits into
Draft
austincalvelage wants to merge 8 commits into
austincalvelage wants to merge 8 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: f5bcc70 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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
|
3 of 9 tasks
…k put in the hash
…k put in the hash
…e Clerk put in the hash
…ath-routed sign-up page
austincalvelage
force-pushed
the
austin/mosaic-sign-up-url-routing
branch
from
December 4, 2026 23:31
60129ec to
b7a880c
Compare
austincalvelage
force-pushed
the
austin/mosaic-path-routing-legacy-hash
branch
from
December 4, 2026 23:31
df6602b to
f5bcc70
Compare
4 of 9 tasks
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
Makes path- and hash-routed Mosaic components open legacy hash URLs (
#/continue?…) the way@clerk/ui's routers do. Stacked on #11128.Clerk builds a component URL with the page in the hash:
redirectToSignUp(),buildSignUpUrl(), the One Tap and OAuth callbacks in clerk-js, and the previous PR's virtual-mode return,<signUpUrl>#/sso-callback?….ui'sPathRoutermoves that hash into the path before routing, and itsHashRouterroutes on it directly. Mosaic did neither, so a Mosaic page at the sign-up URL ignored the route and the redirect params.Shared changes (for Mosaic reviewers)
This changes
useRouterScope, so every path- or hash-routed component gets it, including the exportedUserProfile,OrganizationProfileandProfile. The changeset is a patch for@clerk/mosaic.1. A legacy hash is moved into the component's own route before anything renders. When the window hash starts with
#/, the scope replaces the URL through the host adapter'sreplace, orhistory.replaceStatewithout one, and renders nothing until the URL has changed, asPathRouterreturnsnulluntil it is stripped. Without the gate, sign-up would read its arrival from the old URL for a frame.Both use
hasUrlInFragmentandmergeFragmentIntoUrlfrom@clerk/shared, the helpersuiuses, so the hash's params override a query param of the same name as they do there.#sectionand Mosaic's own#.sign-up=…are left alone.2. Sign-up reads what Clerk put in the hash. After the move, the redirect params are in the query, where sign-up reads them, so
/sign-up#/?redirect_url=%2Faftersends the user to/after. A virtual-routed sign-up's OAuth return to/sign-up#/sso-callback?…completes on a path-routed sign-up page at that URL.Known gaps
#/hash. The first to convert takes the route.uidoes withgetInitialValuesFromQueryParams.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code