Skip to content

refactor(mosaic): resolve the open profile page with one shared controller - #10530

Merged
alexcarpenter merged 1 commit into
austin/mosaic-profile-stale-pagefrom
alex/mosaic-profile-active-page
Oct 29, 2026
Merged

alexcarpenter merged 1 commit into
austin/mosaic-profile-stale-pagefrom
alex/mosaic-profile-active-page

Conversation

@alexcarpenter

Copy link
Copy Markdown
Member

Description

Stacked on #10508. Follow-up from a review of that PR.

#10508 tracks the open profile page in two places: ProfilePagesView falls back to the first listed page, and two new controllers each rebuilt the page list to find a stale page. This keeps the fix and has both profiles use one controller and one page list.

  • useProfilePagesController(initialPage, pageIds) in profile-pages/ replaces useOrganizationProfileController and useUserProfileController. When pageIds doesn't include the open page, it stores the first ID. undefined means the navigation is still loading, so nothing resets.
  • organizationProfileNavEntries and userProfileNavEntries build the page list once in the layout files. The views and the ID helpers (organizationProfilePageIds, userProfilePageIds) both use them.
  • This removes the { status: 'loading' | 'hidden' | 'ready' } union and the 'ready' as const in CombinedUserProfileView. The organization page list is now just optional.
  • OrganizationProfilePageListOptions moves from organization-profile.view.tsx to organization-profile.types.ts, so the layout file no longer imports from the view.

One change in stored state, read from the code and not covered by its own test: the controller now also replaces an unlisted account page and runs in mode='user'. Before, only organization/ pages were replaced. ProfilePagesView already showed the first listed page in those cases, so what users see doesn't change.

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:

@vercel

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

Request Review

@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d209b6

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

@coderabbitai

coderabbitai Bot commented Oct 29, 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

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@alexcarpenter
alexcarpenter merged commit 7731e2f into austin/mosaic-profile-stale-page Oct 29, 2026
11 checks passed
@alexcarpenter
alexcarpenter deleted the alex/mosaic-profile-active-page branch October 29, 2026 18:28

This branch was successfully deployed

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

1 participant