Skip to content

feat(ui,shared,localizations): Delete organization domains in self-serve SSO#8866

Merged
LauraBeatris merged 12 commits into
mainfrom
laura/orgs-1623-sdk-add-support-for-removing-domains
Jun 17, 2026
Merged

feat(ui,shared,localizations): Delete organization domains in self-serve SSO#8866
LauraBeatris merged 12 commits into
mainfrom
laura/orgs-1623-sdk-add-support-for-removing-domains

Conversation

@LauraBeatris

@LauraBeatris LauraBeatris commented Jun 15, 2026

Copy link
Copy Markdown
Member

Description

Resolves ORGS-1633, ORGS-1594

  • Display confirmation dialog when deleting an organization domain
  • Also verify if the enterprise connection already exists when clicking on "Add", so we can patch the existing connection with the newly created domain
  • Remove SAML certificate badge from security/confirmation page
CleanShot.2026-06-15.at.18.10.24.mp4

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:

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a confirmation modal for removing self-serve SSO domains, with messaging that reflects connection status.
    • Prevented removing the last verified domain in SSO domain management.
    • Expanded UI appearance customization to include the new remove-domain dialog and its action buttons.
  • Bug Fixes
    • Removed SAML certificate-related fields from the SSO details UI.
    • Fixed issuer display showing unintended extra text.
  • Style
    • Updated the organization security SSO call-to-action button styling.
  • Tests
    • Added dialog coverage for success and error flows.

@LauraBeatris LauraBeatris self-assigned this Jun 15, 2026
@vercel

vercel Bot commented Jun 15, 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 Jun 17, 2026 8:16pm
swingset Ready Ready Preview, Comment Jun 17, 2026 8:16pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a RemoveDomainDialog confirmation modal to the ConfigureSSO flow, replacing the immediate domain-deletion behavior with a two-step confirmation. Simultaneously removes the IdP certificate display from the SSO confirmation and security sections. Type contracts, localization strings, and appearance element keys are updated to support both changes.

Changes

Remove Domain Confirmation Dialog and SSO Certificate Cleanup

Layer / File(s) Summary
Type contracts and appearance keys
packages/shared/src/types/enterpriseConnection.ts, packages/shared/src/types/localization.ts, packages/ui/src/internal/appearance.ts, packages/ui/src/customizables/elementDescriptors.ts
name becomes optional in CreateOrganizationEnterpriseConnectionParams; domains?: string[] added to UpdateOrganizationEnterpriseConnectionParams; LocalizationResource gains removeDomainDialog keys and drops certificateLabel; ElementsConfig and APPEARANCE_KEYS gain three new remove-domain dialog selectors.
Localization strings and changeset
packages/localizations/src/en-US.ts, .changeset/strong-moose-retire.md
certificateLabel removed from two en-US SSO sections; new removeDomainDialog English strings added; patch changeset entry recorded.
RemoveDomainDialog component and tests
packages/ui/src/components/ConfigureSSO/RemoveDomainDialog.tsx, packages/ui/src/components/ConfigureSSO/__tests__/RemoveDomainDialog.test.tsx
New modal component renders conditionally, computes active/inactive subtitle via useMemo, awaits onRemove then calls onClose, and routes errors to card state. Tests cover gating, conditional copy, cancel, async submit success, and error handling.
OrganizationDomainsStep and hook integration
packages/ui/src/components/ConfigureSSO/hooks/useOrganizationEnterpriseConnection.ts, packages/ui/src/components/ConfigureSSO/hooks/__tests__/useOrganizationEnterpriseConnection.test.tsx, packages/ui/src/components/ConfigureSSO/steps/OrganizationDomainsStep.tsx
Domain remove-click now sets domainToRemove state and displays confirmation dialog; handleRemoveDomain updates connection domains list before deleting; handleCreateDomain syncs new domain into the connection. Per-domain canRemove flag prevents removing the last verified domain. createConnection no longer derives or passes a name. RemoveDomainDialog is conditionally rendered with necessary props. Hook tests updated to reflect removed name parameter.
Certificate field removal and SSO display cleanup
packages/ui/src/components/ConfigureSSO/steps/ConfirmationStep.tsx, packages/ui/src/components/OrganizationProfile/SecuritySsoSection.tsx, packages/ui/src/components/OrganizationProfile/__tests__/OrganizationSecurityPage.test.tsx
Certificate ProfileSection.Item removed from ConfirmationStep; certificate DetailRow removed from SecuritySsoSection; button style updated to bordered/secondary; corresponding test assertions for certificate label and chip removed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • clerk/javascript#8788: Modified OrganizationDomainsStep.tsx to add TXT-verified domain creation, which this PR builds on by adding the remove-domain confirmation dialog.
  • clerk/javascript#8813: Both PRs directly modify packages/ui/src/components/OrganizationProfile/SecuritySsoSection.tsx to add and then remove the certificate row; the retrieved PR introduced the certificate display that this PR removes.

Poem

🐇 Hop, hop, a dialog appears,
No more deleting without a thought!
"Remove this domain?" the modal cheers,
While certificates fade, no longer sought.
The bunny confirms with button pressed,
SSO cleanup—domains addressed! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main feature being implemented: enabling deletion of organization domains in the self-serve SSO flow.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a9de041

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

This PR includes changesets to release 21 packages
Name Type
@clerk/localizations Patch
@clerk/shared Patch
@clerk/ui Patch
@clerk/react Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/fastify 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

@LauraBeatris LauraBeatris force-pushed the laura/orgs-1623-sdk-add-support-for-removing-domains branch from 7da3652 to 27d92de Compare June 15, 2026 20:40
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1623-sdk-add-support-for-removing-domains branch from 9b10056 to 62cfc5b Compare June 15, 2026 20:44
@LauraBeatris LauraBeatris changed the title feat(ui): Delete organization domains in self-serve SSO feat(ui,shared,localizations): Delete organization domains in self-serve SSO Jun 15, 2026
@LauraBeatris LauraBeatris requested review from a team and iagodahlem June 15, 2026 20:46
@LauraBeatris LauraBeatris marked this pull request as ready for review June 15, 2026 20:47
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1623-sdk-add-support-for-removing-domains branch from 62cfc5b to 9711fd5 Compare June 15, 2026 21:05
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1623-sdk-add-support-for-removing-domains branch from d5a50aa to 3d2d666 Compare June 15, 2026 21:24
elementId={descriptors.organizationProfileSecuritySsoConfigureButton.setId(primaryButtonId)}
variant='outline'
variant='bordered'
colorScheme='secondary'

@LauraBeatris LauraBeatris Jun 15, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@iagodahlem I saw that the text color was using gray due to outline button variant, but the Figma prototype has a different text color, so changing it here to better match

Image

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.

2 participants