Skip to content

fix(mosaic): reset the open profile page when it leaves the navigation - #10508

Merged
austincalvelage merged 4 commits into
mainfrom
austin/mosaic-profile-stale-page
Oct 29, 2026
Merged

austincalvelage merged 4 commits into
mainfrom
austin/mosaic-profile-stale-page

Conversation

@austincalvelage

Copy link
Copy Markdown
Member

Description

Follow-up to #10491, from this comment.

OrganizationProfile and the combined UserProfile stored the open page once. When the active organization changed and that page was no longer in the navigation, they showed the first page but kept the old one stored, so switching back reopened it. For example: Members in Acme → an organization without members access shows Account → back to Acme reopens Members.

Once the organization has loaded, an open page that the navigation no longer lists is now replaced by the page shown. A page the next organization also lists stays open.

  • OrganizationProfile resets to its first page.
  • In the combined UserProfile, the open page now lives in the views (AccountUserProfileView for mode='user', CombinedUserProfileView for combined), so the combined view can reset it next to the organization model. A stale organization page resets to the first account page. mode='user' still never reads the organization model.
  • The reserved organization/ prefix filter moves from UserProfileView to withoutOrganizationPaths in user-profile.layout.ts, shared by the view and the reset.

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:

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7731e2f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When 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

@vercel

vercel Bot commented Oct 28, 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 Oct 29, 2026 6:31pm UTC
swingset Ready Ready Preview Oct 29, 2026 6:31pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2f988b8 and 7731e2f.

Files selected for processing: 9
  • .changeset/shy-pages-share.md
  • packages/mosaic/src/features/organization-profile/organization-profile.layout.ts
  • packages/mosaic/src/features/organization-profile/organization-profile.tsx
  • packages/mosaic/src/features/organization-profile/organization-profile.types.ts
  • packages/mosaic/src/features/organization-profile/organization-profile.view.tsx
  • packages/mosaic/src/features/profile-pages/profile-pages.controller.ts
  • packages/mosaic/src/features/user-profile/user-profile.layout.ts
  • packages/mosaic/src/features/user-profile/user-profile.tsx
  • packages/mosaic/src/features/user-profile/user-profile.view.tsx
Linked repositories identified

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

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Walkthrough

Organization and user profiles now resolve navigation entries from page options and use a shared controller for active-page state. The controller selects the first available page when the active page is no longer listed. Organization page IDs are included in combined user profiles when organization data is ready. New tests cover profile selection when switching organizations.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • clerk/javascript#10491: Adds combined UserProfile mode and organization-prefixed page IDs used by this change.

Suggested reviewers: alexcarpenter

Merge Risk: Minimal · up to 7731e

No merge-blocking risk was identified. The updated profiles are not yet publicly exposed.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: resetting the open profile page when it is removed from navigation.
Description check Passed The description directly explains the stale-page bug, the reset behavior, affected components, and test status. It is clearly related to the changeset.
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: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 10 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • 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.

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 7731e2f

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.
@austincalvelage
austincalvelage merged commit ed1fcf3 into main Oct 29, 2026
56 checks passed
@austincalvelage
austincalvelage deleted the austin/mosaic-profile-stale-page branch October 29, 2026 20:30

This branch was successfully deployed

2 active deployments
Preview – swingset — 7731e2f2 Deployed Oct 29, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 7731e2f2 Deployed Oct 29, 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