From 38bb2f1e362b9d767dc32165bef22b637fa5a917 Mon Sep 17 00:00:00 2001 From: alejandrobailo Date: Tue, 24 Feb 2026 13:01:00 +0100 Subject: [PATCH] fix(ui): keep test button visible during account selection --- .../hooks/use-org-account-selection-flow.ts | 10 +++++++--- .../providers/organizations/org-account-selection.tsx | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/components/providers/organizations/hooks/use-org-account-selection-flow.ts b/ui/components/providers/organizations/hooks/use-org-account-selection-flow.ts index afed286560..c8a9bd8d79 100644 --- a/ui/components/providers/organizations/hooks/use-org-account-selection-flow.ts +++ b/ui/components/providers/organizations/hooks/use-org-account-selection-flow.ts @@ -244,6 +244,7 @@ export function useOrgAccountSelectionFlow({ connectionResults, ); const showHeaderHelperText = !isTestingView || isApplying || isTesting; + const isSelectionLocked = isApplying || isTesting; const treeDataWithConnectionState = isTestingView ? buildTreeWithConnectionState( treeData, @@ -468,6 +469,7 @@ export function useOrgAccountSelectionFlow({ } const canRetry = hasConnectionErrors || Boolean(applyError); + const hasSelectedAccounts = selectedCount > 0; onFooterChange({ showBack: true, @@ -483,11 +485,12 @@ export function useOrgAccountSelectionFlow({ setCreatedProviderIds(launchableProviderIds); onSkip(); }, - showAction: isApplying || isTesting || canRetry, + showAction: + isApplying || isTesting || canRetry || hasSelectedAccounts, actionLabel: "Test Connections", - actionDisabled: isApplying || isTesting || !canRetry, + actionDisabled: isApplying || isTesting || !hasSelectedAccounts, actionType: WIZARD_FOOTER_ACTION_TYPE.BUTTON, - onAction: canRetry + onAction: hasSelectedAccounts ? () => { startTestingActionRef.current(); } @@ -533,6 +536,7 @@ export function useOrgAccountSelectionFlow({ hasConnectionErrors, isTesting, isTestingView, + isSelectionLocked, organizationExternalId, selectedCount, selectedIdsForTree, diff --git a/ui/components/providers/organizations/org-account-selection.tsx b/ui/components/providers/organizations/org-account-selection.tsx index e9d6e1826a..9005a2d84e 100644 --- a/ui/components/providers/organizations/org-account-selection.tsx +++ b/ui/components/providers/organizations/org-account-selection.tsx @@ -33,6 +33,7 @@ export function OrgAccountSelection({ hasConnectionErrors, isTesting, isTestingView, + isSelectionLocked, organizationExternalId, selectedCount, selectedIdsForTree, @@ -111,7 +112,7 @@ export function OrgAccountSelection({ expandAll selectedIds={selectedIdsForTree} onSelectionChange={ - isTestingView ? () => {} : handleTreeSelectionChange + isSelectionLocked ? () => {} : handleTreeSelectionChange } renderItem={(params) => (