You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! ✨
LauraBeatris
changed the title
feat(ui): Delete organization domains in self-serve SSOfeat(ui,shared,localizations): Delete organization domains in self-serve SSOJun 15, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves ORGS-1633, ORGS-1594
CleanShot.2026-06-15.at.18.10.24.mp4
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
Release Notes