From b8d0b4f318fa9b6970be0f419a0360503ef8647d Mon Sep 17 00:00:00 2001 From: Waleed Date: Sat, 27 Jun 2026 15:30:27 -0700 Subject: [PATCH] fix(sso): keep an exit affordance in edit mode when clean (#5247) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After clicking Edit on an existing SSO provider, the only header action was SaveDiscardActions, which renders nothing when the form is clean — so there was no way to leave edit mode back to the read-only summary without first changing a field or navigating away. Render a Cancel chip when isEditing && !hasChanges (the dirty-gated Discard already exits when there are changes). --- apps/sim/ee/sso/components/sso-settings.tsx | 26 ++++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/sim/ee/sso/components/sso-settings.tsx b/apps/sim/ee/sso/components/sso-settings.tsx index 1d0b443817..b3e55fe4d2 100644 --- a/apps/sim/ee/sso/components/sso-settings.tsx +++ b/apps/sim/ee/sso/components/sso-settings.tsx @@ -6,6 +6,7 @@ import { getErrorMessage } from '@sim/utils/errors' import { Check, ChevronDown, Clipboard, Eye, EyeOff } from 'lucide-react' import { Button, + Chip, ChipCombobox, ChipInput, ChipSelect, @@ -535,15 +536,22 @@ export function SSO() { void handleSubmit()} - onDiscard={handleDiscard} - /> + <> + {isEditing && !hasChanges && ( + + Cancel + + )} + void handleSubmit()} + onDiscard={handleDiscard} + /> + } >