From fa41137728c43b466c235b468ce99e239ed9e606 Mon Sep 17 00:00:00 2001 From: Ievgen Sorokopud Date: Thu, 30 Jan 2025 17:53:36 +0100 Subject: [PATCH] [Security GenAI] "Select a Connector" popup does not show up after the user selects any connector and then cancels it from Endpoint Insights. (#208907) (#208969) ## Summary BUG: https://github.com/elastic/kibana/issues/208907 This PR fixes the issue where user cannot select a different connector type after mistakenly selecting a wrong one. ### Steps to reproduce without required endpoint installation: 1. Make sure there are no connectors 2. Open "AI Assistant" on one of the security solution pages 3. Press "(+) Add connector" button 4. Connector type selection modal is visible 5. Select "Amazon Bedrock" type (or any other connector type) 6. Cancel the modal 7. Press "(+) Add connector" button again **ISSUE**: previously selected connector type is being displayed and there is no way to switch between types **EXPECTED**: we should show connector type selection modal once previous one was closed ### Issue recording https://github.com/user-attachments/assets/48052bf1-4e00-43b7-a63e-f8a7969b9dbf ### Fixed state recording https://github.com/user-attachments/assets/48be1cc4-0326-43a1-bd57-bb82fc1f19eb (cherry picked from commit b28036a2e0f13358b4da614761d32667612ac03a) --- .../impl/connectorland/connector_selector/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx index 3127ab7fe3911..bf56ee0069401 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector/index.tsx @@ -217,7 +217,7 @@ export const ConnectorSelector: React.FC = React.memo( setIsConnectorModalVisible(false)} + onClose={cleanupAndCloseModal} onSaveConnector={onSaveConnector} onSelectActionType={(actionType: ActionType) => setSelectedActionType(actionType)} selectedActionType={selectedActionType}