Skip to content

[Entity Analytics] Showing Add Connector button on entity highlight summary when no AI connectors are available#249932

Merged
ymao1 merged 5 commits intoelastic:mainfrom
ymao1:ea-15347
Jan 23, 2026
Merged

[Entity Analytics] Showing Add Connector button on entity highlight summary when no AI connectors are available#249932
ymao1 merged 5 commits intoelastic:mainfrom
ymao1:ea-15347

Conversation

@ymao1
Copy link
Copy Markdown
Contributor

@ymao1 ymao1 commented Jan 21, 2026

Summary

This PR updates the entity highlight summary to check whether any inference connectors exist.

  • If none exist, we show an Add connector button and hide the settings menu since everything in the menu will be disabled except for the ability to add a connector
  • Clicking Add connector will bring up a connector modal
  • After adding a connector through this modal, the list of connectors should refresh, the connector should be selected and the Generate button should show.

To Verify

  1. Ensure you have no preconfigured AI connectors in your kibana.dev.yml
  2. Start ES and Kibana
  3. Generate some entity data
  4. Open the entity flyout for a user or host entity
  5. You should see an Add connector gradient button
  6. Click Add connector and follow the add connector flow
  7. On saving the new connector, you should now see the Generate button and be able to click it.
Screen.Recording.2026-01-21.at.3.02.08.PM.mov

@ymao1 ymao1 self-assigned this Jan 21, 2026
@ymao1 ymao1 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Entity Analytics Security Entity Analytics Team v9.4.0 labels Jan 21, 2026
@ymao1 ymao1 marked this pull request as ready for review January 21, 2026 20:04
@ymao1 ymao1 requested a review from a team as a code owner January 21, 2026 20:04
@ymao1 ymao1 requested a review from hop-dev January 21, 2026 20:04
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

isLoading: isLoadingConnectors,
data: aiConnectors,
refetch: refetchAiConnectors,
} = useLoadInferenceConnectors({
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this removes the dependency from useLoadConnectors and useAssistantContext which are hooks provided by the ai assistant in favor of directly loading inference connectors from the inference plugin.

@abhishekbhatia1710
Copy link
Copy Markdown
Contributor

LGTM, just a small feedback!

The UI shows a message when the connector is successfully added.

Screenshot 2026-01-23 at 2 49 21 PM

Should we change the message to something more meaningful like : Created "test" to Created "test" connector successfully.

Not blocking the approval PR due to this!


const QUERY_KEY = ['entity-analytics', 'load-inference-connectors'];

export function useLoadInferenceConnectors({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The inference plugin exposes a method getConnectors to call this API, should we use that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call! Updated in 1ad6a20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice 🚀

Copy link
Copy Markdown
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

code review only

@ymao1
Copy link
Copy Markdown
Contributor Author

ymao1 commented Jan 23, 2026

The UI shows a message when the connector is successfully added.

@abhishekbhatia1710 The toast language is controlled by the AddConnector component that's used in multiple places so I don't want to change it for everyone but I can open a followup issue if you feel strongly about it :)

@abhishekbhatia1710
Copy link
Copy Markdown
Contributor

The UI shows a message when the connector is successfully added.

@abhishekbhatia1710 The toast language is controlled by the AddConnector component that's used in multiple places so I don't want to change it for everyone but I can open a followup issue if you feel strongly about it :)

Nope, not a blocking or strong comment from my end. Thanks

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 8680 8681 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 10.8MB 10.8MB +1.2KB

History

cc @ymao1

@ymao1 ymao1 merged commit 34d0757 into elastic:main Jan 23, 2026
15 of 16 checks passed
@ymao1 ymao1 deleted the ea-15347 branch January 23, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants