feat(ui): migrate organization profile members panel to mosaic#9109
feat(ui): migrate organization profile members panel to mosaic#9109kylemac wants to merge 1 commit into
Conversation
Split the active-members list into a Mosaic machine/controller/view section (search, pagination, per-row removal with revalidate + error handling), wire it into the Members tab of the Mosaic OrganizationProfile via a new members panel, and document the section and panel in swingset.
🦋 Changeset detectedLatest commit: 3e125e7 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
What this does
Migrates the OrganizationProfile members panel into Mosaic using the skill's
machine → controller → viewworkflow, wires it into the Members tab of the MosaicOrganizationProfile, and documents it in swingset.Members-list section (
packages/ui/src/mosaic/sections/members-list.*).machine.ts— pure flow rules: search input-value vs. committedquery(SEARCH_CHANGE/SEARCH_SUBMIT) + aremovingstate with an injected async remove invoke and error handling. No React, no Clerk..controller.tsx— the only Clerk layer: fetches memberships keyed off the machine'squery, gates onorg:sys_memberships:read/:manage, derives plainMemberRow[], injects the per-row remove effect (destroy()+ fire-and-forgetrevalidate())..view.tsx— Clerk-free rendering: search form, members table, gated Remove button, Prev/Next pagination, loading/empty/error states. Built only from existing Mosaic components..tsx— thin wrapper; renders nothing until the controller isready.Panel + AIO wiring
organization-profile-memberspanel (+ view) composes the section.organization-profile.tsx/view take amembersprop, replacing the"Members content"placeholder.Swingset docs
MembersList(Section) andOrganizationProfileMembers(Panel) story + mdx (archetype C), AIO page updated, registered inregistry.ts+DocsViewer.Verification
@clerk/uitype-check: 0 errors · swingset type-check: 0 errors@clerk/uientry point, so no user-facing impact.Parity audit (deferred items to track)
Read + remove + search + paginate are fully migrated. Consciously deferred (each needs a Mosaic primitive that doesn't exist yet):
RoleSelect+membership.update) — needs a Mosaic Select; role renders read-only.hasRoleSetMigration) — needs a Mosaic Alert +useFetchRoles.localizeCustomRole— showsroleNameinstead of the localized custom role.UserPreviewimage) — needs a Mosaic Avatar.Deliberate changes:
ThreeDotsMenu→ inline Remove button; awaited → fire-and-forgetrevalidate; full numbered pagination → Prev/Next. Consistent with existing mosaic sections (hardcoded English strings,error.message). Invitations/Requests sub-tabs and the seat-usage footer were out of scope for this pass.