Skip to content

feat(ui): show deprovisioned organization members - #9202

Merged
NicolasLopes7 merged 5 commits into
mainfrom
nicolas/org-members-deprovisioned
Jul 28, 2026
Merged

feat(ui): show deprovisioned organization members#9202
NicolasLopes7 merged 5 commits into
mainfrom
nicolas/org-members-deprovisioned

Conversation

@NicolasLopes7

Copy link
Copy Markdown
Contributor

Summary

  • expose the deprovisioned state on organization memberships
  • mark deprovisioned members as inactive in Organization Profile

Testing

  • pnpm --filter @clerk/clerk-js test -- OrganizationMembership.test.ts
  • pnpm --filter @clerk/ui exec vitest run src/components/OrganizationProfile/tests/OrganizationMembers.test.tsx
  • pnpm --filter @clerk/ui type-check
  • pnpm --filter @clerk/clerk-js build:declarations

@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a353533

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

This PR includes changesets to release 23 packages
Name Type
@clerk/clerk-js Patch
@clerk/localizations Patch
@clerk/shared Patch
@clerk/ui Patch
@clerk/chrome-extension Patch
@clerk/electron Patch
@clerk/expo Patch
@clerk/react Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/headless Patch
@clerk/hono Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue Patch
@clerk/swingset Patch

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 Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 28, 2026 4:12pm
swingset Ready Ready Preview, Comment Jul 28, 2026 4:12pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jul 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: a353533

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-28T16:13:03.009Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 1
🟢 Additions 2

🤖 This report was reviewed by claude-sonnet-4-6.


@clerk/shared

Current version: 4.25.8
Recommended bump: MINOR → 4.26.0

Subpath ./types

🟡 Non-breaking Changes (1)

Modified: __internal_LocalizationResource
// ... 77 unchanged lines elided ...
    badge__requiresAction: LocalizationValue;
    badge__you: LocalizationValue;
    badge__banned: LocalizationValue;
+   badge__deprovisioned: LocalizationValue;
    badge__freeTrial: LocalizationValue;
    badge__currentPlan: LocalizationValue;
    badge__upcomingPlan: LocalizationValue;
// ... 1897 unchanged lines elided ...

Static analyzer: Breaking change in type alias __internal_LocalizationResource: Type changed: {locale:string;maintenanceMode:import("@clerk/shared").LocalizationValue;roles:{[r:string]:import("@clerk/shared").Loca…{locale:string;maintenanceMode:import("@clerk/shared").LocalizationValue;roles:{[r:string]:import("@clerk/shared").Loca…

🤖 AI review (reclassified as non-breaking) (70%): The before and after snippets are structurally identical except for '1900 lines elided' vs '1901 lines elided', indicating one new field was added somewhere in the middle. __internal_LocalizationResource is used only as the source type for LocalizationResource via DeepPartial<DeepLocalizationWithoutObjects<...>>, making it an output/read type; adding a required property to an output type is non-breaking for consumers who only read it, and DeepPartial wrapping further makes all nested fields optional in the exposed LocalizationResource interface.

🟢 Additions (2)

Added: PublicUserData.deprovisioned
+ deprovisioned?: boolean;

Added property PublicUserData.deprovisioned

Added: PublicUserDataJSON.deprovisioned
+ deprovisioned?: boolean;

Added property PublicUserDataJSON.deprovisioned


Report generated by Break Check

Last ran on a353533.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds an optional deprovisioned flag to public user data, maps it from JSON, preserves it in snapshots, and tests the mapping. Organization Profile member rows display a deprovisioned badge, expose disabled row state, and disable role editing and removal. Localization types and locale resources add badge__deprovisioned, with an English-US label. A Changeset records patch updates for affected packages.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main user-facing change: showing deprovisioned organization members.
Description check ✅ Passed The description matches the changeset by describing deprovisioned state exposure and inactive members in Organization Profile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

Warning

Review ran into problems

🔥 Problems

Linked repositories: Couldn't analyze clerk/clerk-android - clone failed: Clone operation failed: Cloning into '/home/jailuser/git'...
From https://github.com/clerk/clerk-android

Errors logged to '/home/jailuser/git/.git/lfs/logs/20260728T161515.688957582.log'.
Use git lfs logs last to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: config/bin/detekt-cli: smudge filter lfs failed
Downloading config/bin/detekt-cli (71 MB)
Error downloading object: config/bin/detekt-cli (2655f48): Smudge error: Error downloading config/bin/detekt-cli (2655f48c7c303a5f9bf920a33229408b8571bb1d29e4e57cf7be3e151bceecb1): LFS: Client error: https://github-cloud.githubusercontent.com/alambic/media/877189286/26/55/2655f48c7c303a5f9bf920a33229408b8571bb1d29e4e57cf7be3e151bceecb1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA5BA2674WPWWEFGQ5%2F20260728%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260728T161637Z&X-Amz-Expires=3600&X-Amz-Signature=ebc1188fad49fc43f3ab98ba4d25f620eb73e1d4a3721751c6cb0064a0699082&X-Amz-SignedHeaders=host&actor_id=136622811&key_id=0&repo_id=980409545&token=1

Errors logged to '/home/jailuser/git/.git/lfs/logs/20260728T161637.116584545.log'.
Use git lfs logs last to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: config/bin/detekt-cli: smudge filter lfs failed


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/clerk-js/src/core/resources/__tests__/PublicUserData.test.ts (1)

17-18: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover snapshot serialization too.

This verifies JSON-to-resource mapping, but not the changed __internal_toSnapshot() contract. Add an assertion such as expect(pud.__internal_toSnapshot()).toMatchObject({ deprovisioned: true }) so snapshot regressions are caught.

As per coding guidelines, unit tests are required for new functionality and should verify edge cases.

Also applies to: 25-29

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/clerk-js/src/core/resources/__tests__/PublicUserData.test.ts` around
lines 17 - 18, Extend the PublicUserData test covering the deprovisioned
resource to assert that __internal_toSnapshot() includes deprovisioned: true,
preserving the existing JSON-to-resource assertions and covering the changed
snapshot serialization contract.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/clerk-js/src/core/resources/__tests__/PublicUserData.test.ts`:
- Around line 17-18: Extend the PublicUserData test covering the deprovisioned
resource to assert that __internal_toSnapshot() includes deprovisioned: true,
preserving the existing JSON-to-resource assertions and covering the changed
snapshot serialization contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 2b1deb87-32c4-4b69-814f-0c94f9698009

📥 Commits

Reviewing files that changed from the base of the PR and between 9081534 and 690b731.

📒 Files selected for processing (58)
  • .changeset/wise-dolphins-explain.md
  • packages/clerk-js/src/core/resources/PublicUserData.ts
  • packages/clerk-js/src/core/resources/__tests__/PublicUserData.test.ts
  • packages/localizations/src/ar-SA.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/bn-IN.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/de-DE.ts
  • packages/localizations/src/el-GR.ts
  • packages/localizations/src/en-GB.ts
  • packages/localizations/src/en-US.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/es-ES.ts
  • packages/localizations/src/es-MX.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/fa-IR.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/he-IL.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/hr-HR.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/kk-KZ.ts
  • packages/localizations/src/ko-KR.ts
  • packages/localizations/src/mn-MN.ts
  • packages/localizations/src/ms-MY.ts
  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/nl-BE.ts
  • packages/localizations/src/nl-NL.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/pt-BR.ts
  • packages/localizations/src/pt-PT.ts
  • packages/localizations/src/ro-RO.ts
  • packages/localizations/src/ru-RU.ts
  • packages/localizations/src/sk-SK.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ta-IN.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/th-TH.ts
  • packages/localizations/src/tr-TR.ts
  • packages/localizations/src/uk-UA.ts
  • packages/localizations/src/vi-VN.ts
  • packages/localizations/src/zh-CN.ts
  • packages/localizations/src/zh-TW.ts
  • packages/shared/src/types/json.ts
  • packages/shared/src/types/localization.ts
  • packages/shared/src/types/session.ts
  • packages/ui/src/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/ui/src/components/OrganizationProfile/__tests__/OrganizationMembers.test.tsx
  • packages/ui/src/components/OrganizationProfile/__tests__/utils.ts
🔗 Linked repositories identified

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

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/cli (auto-detected)
  • clerk/clerk-android (auto-detected)

@dstaley dstaley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, but let's retain usage of the RowContainer component for consistency


return (
<RowContainer>
<Tr

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's update the RowContainer component to handle this logic, that way we retain one single source for defining the hover background color

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NicolasLopes7
NicolasLopes7 merged commit e2dd4e2 into main Jul 28, 2026
51 of 52 checks passed
@NicolasLopes7
NicolasLopes7 deleted the nicolas/org-members-deprovisioned branch July 28, 2026 16:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/ui/src/components/OrganizationProfile/ActiveMembersList.tsx (1)

99-107: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Show the deprovisioned badge for deprovisioned current users.

The isCurrentUser branch runs before isDeprovisioned, so a deprovisioned current user never receives the new badge. Make deprovisioned state take precedence, or render both badges if both statuses must remain visible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ui/src/components/OrganizationProfile/ActiveMembersList.tsx` around
lines 99 - 107, Update the badge conditional in ActiveMembersList so
isDeprovisioned is evaluated before isCurrentUser, ensuring deprovisioned
current users receive the deprovisioned badge. Preserve the existing “you” badge
behavior for current users who are not deprovisioned.
🧹 Nitpick comments (1)
packages/ui/src/components/OrganizationProfile/MemberListTable.tsx (1)

133-147: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add an explicit return type to RowContainer.

This exported TypeScript component should declare its JSX return type, following the repository’s explicit-return-type requirement. Use the project-standard JSX element type.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ui/src/components/OrganizationProfile/MemberListTable.tsx` around
lines 133 - 147, Update the exported RowContainer component to declare an
explicit return type using the repository-standard JSX element type, while
preserving its existing props handling and rendered Tr behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/ui/src/components/OrganizationProfile/MemberListTable.tsx`:
- Around line 133-144: Update RowContainer so its generated disabled/hover
styles are merged with any caller-provided sx from rest instead of replacing
them. Preserve the existing conditional styles and ensure consumer-provided
styles remain applied.

---

Outside diff comments:
In `@packages/ui/src/components/OrganizationProfile/ActiveMembersList.tsx`:
- Around line 99-107: Update the badge conditional in ActiveMembersList so
isDeprovisioned is evaluated before isCurrentUser, ensuring deprovisioned
current users receive the deprovisioned badge. Preserve the existing “you” badge
behavior for current users who are not deprovisioned.

---

Nitpick comments:
In `@packages/ui/src/components/OrganizationProfile/MemberListTable.tsx`:
- Around line 133-147: Update the exported RowContainer component to declare an
explicit return type using the repository-standard JSX element type, while
preserving its existing props handling and rendered Tr behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d1f0807-bcf2-477b-bc81-74ed60fb1730

📥 Commits

Reviewing files that changed from the base of the PR and between 690b731 and a353533.

📒 Files selected for processing (2)
  • packages/ui/src/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/ui/src/components/OrganizationProfile/MemberListTable.tsx
🔗 Linked repositories identified

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

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/cli (auto-detected)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)

Comment on lines +133 to +144
export const RowContainer = (props: PropsOfComponent<typeof Tr> & { isDisabled?: boolean }) => {
const { isDisabled, ...rest } = props;

return (
<Tr
{...props}
sx={t => ({ ':hover': { backgroundColor: t.colors.$neutralAlpha50 } })}
{...rest}
aria-disabled={isDisabled}
sx={t =>
isDisabled
? { opacity: t.opacity.$disabled, ':hover': { backgroundColor: 'transparent' } }
: { ':hover': { backgroundColor: t.colors.$neutralAlpha50 } }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve caller-provided sx styles.

rest can contain sx, but the later sx={...} assignment replaces it. Merge the caller’s styles with the disabled/hover styles so existing RowContainer consumers do not silently lose custom styling.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ui/src/components/OrganizationProfile/MemberListTable.tsx` around
lines 133 - 144, Update RowContainer so its generated disabled/hover styles are
merged with any caller-provided sx from rest instead of replacing them. Preserve
the existing conditional styles and ensure consumer-provided styles remain
applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants