[AI4DSOC] Remove assistant button from alerts table#219144
Closed
stephmilovic wants to merge 3 commits intoelastic:mainfrom
Closed
[AI4DSOC] Remove assistant button from alerts table#219144stephmilovic wants to merge 3 commits intoelastic:mainfrom
stephmilovic wants to merge 3 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
Contributor
Author
|
Closing in favor of #219141 |
1 task
Contributor
⏳ Build in-progress, with failures
Failed CI Steps |
PhilippeOberti
added a commit
that referenced
this pull request
Apr 24, 2025
#219141) ## Summary During testing we discovered an issue related to the Assistant icon displayed in the AI4DSOC alert summary page table. The issue is related to the fact that the alert registers its context with the assistant. When the assistant flyout is opened from the `Ask AI assistant` button in the alert flyout, we have one flyout which means one alert in the assistant. But with the Assistant icon shown on each row of the table, we need to register context for each alert. That means that x alert buttons equals to x alerts in the assistant. This is how it translates in the UI:  Redesigning how the assistant context works is very involved and too risky to do at such a late time. This PR removes the Assistant button from the row actions, which solves the issue: https://github.com/user-attachments/assets/0fd94cc1-4fbd-4e70-9790-22e4913477ff Also, @stephmilovic noticed that when the assistant is opened from a different launch point than the suggested prompt, and the suggested prompt is still in the DOM, its prompt context shows up empty: <img width="600" alt="Screenshot 2025-04-24 at 11 41 23 AM" src="https://github.com/user-attachments/assets/0ceb3ffc-72e5-425c-b550-9b8d5896f359" /> She resolved this by adding a check in the ContextPills component for `description.length > 0`. This would be resolved by the on click issue, so might be worth coming back to. This change is visible in the second commit and stolen from [this PR](#219144). ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios relates to elastic/security-team#11973
akowalska622
pushed a commit
to akowalska622/kibana
that referenced
this pull request
May 29, 2025
elastic#219141) ## Summary During testing we discovered an issue related to the Assistant icon displayed in the AI4DSOC alert summary page table. The issue is related to the fact that the alert registers its context with the assistant. When the assistant flyout is opened from the `Ask AI assistant` button in the alert flyout, we have one flyout which means one alert in the assistant. But with the Assistant icon shown on each row of the table, we need to register context for each alert. That means that x alert buttons equals to x alerts in the assistant. This is how it translates in the UI:  Redesigning how the assistant context works is very involved and too risky to do at such a late time. This PR removes the Assistant button from the row actions, which solves the issue: https://github.com/user-attachments/assets/0fd94cc1-4fbd-4e70-9790-22e4913477ff Also, @stephmilovic noticed that when the assistant is opened from a different launch point than the suggested prompt, and the suggested prompt is still in the DOM, its prompt context shows up empty: <img width="600" alt="Screenshot 2025-04-24 at 11 41 23 AM" src="https://github.com/user-attachments/assets/0ceb3ffc-72e5-425c-b550-9b8d5896f359" /> She resolved this by adding a check in the ContextPills component for `description.length > 0`. This would be resolved by the on click issue, so might be worth coming back to. This change is visible in the second commit and stolen from [this PR](elastic#219144). ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios relates to elastic/security-team#11973
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
elastic#219141) ## Summary During testing we discovered an issue related to the Assistant icon displayed in the AI4DSOC alert summary page table. The issue is related to the fact that the alert registers its context with the assistant. When the assistant flyout is opened from the `Ask AI assistant` button in the alert flyout, we have one flyout which means one alert in the assistant. But with the Assistant icon shown on each row of the table, we need to register context for each alert. That means that x alert buttons equals to x alerts in the assistant. This is how it translates in the UI:  Redesigning how the assistant context works is very involved and too risky to do at such a late time. This PR removes the Assistant button from the row actions, which solves the issue: https://github.com/user-attachments/assets/0fd94cc1-4fbd-4e70-9790-22e4913477ff Also, @stephmilovic noticed that when the assistant is opened from a different launch point than the suggested prompt, and the suggested prompt is still in the DOM, its prompt context shows up empty: <img width="600" alt="Screenshot 2025-04-24 at 11 41 23 AM" src="https://github.com/user-attachments/assets/0ceb3ffc-72e5-425c-b550-9b8d5896f359" /> She resolved this by adding a check in the ContextPills component for `description.length > 0`. This would be resolved by the on click issue, so might be worth coming back to. This change is visible in the second commit and stolen from [this PR](elastic#219144). ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios relates to elastic/security-team#11973 (cherry picked from commit cc98975)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
May 30, 2025
elastic#219141) ## Summary During testing we discovered an issue related to the Assistant icon displayed in the AI4DSOC alert summary page table. The issue is related to the fact that the alert registers its context with the assistant. When the assistant flyout is opened from the `Ask AI assistant` button in the alert flyout, we have one flyout which means one alert in the assistant. But with the Assistant icon shown on each row of the table, we need to register context for each alert. That means that x alert buttons equals to x alerts in the assistant. This is how it translates in the UI:  Redesigning how the assistant context works is very involved and too risky to do at such a late time. This PR removes the Assistant button from the row actions, which solves the issue: https://github.com/user-attachments/assets/0fd94cc1-4fbd-4e70-9790-22e4913477ff Also, @stephmilovic noticed that when the assistant is opened from a different launch point than the suggested prompt, and the suggested prompt is still in the DOM, its prompt context shows up empty: <img width="600" alt="Screenshot 2025-04-24 at 11 41 23 AM" src="https://github.com/user-attachments/assets/0ceb3ffc-72e5-425c-b550-9b8d5896f359" /> She resolved this by adding a check in the ContextPills component for `description.length > 0`. This would be resolved by the on click issue, so might be worth coming back to. This change is visible in the second commit and stolen from [this PR](elastic#219144). ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios relates to elastic/security-team#11973 (cherry picked from commit cc98975)
PhilippeOberti
added a commit
to PhilippeOberti/kibana
that referenced
this pull request
Jun 4, 2025
elastic#219141) ## Summary During testing we discovered an issue related to the Assistant icon displayed in the AI4DSOC alert summary page table. The issue is related to the fact that the alert registers its context with the assistant. When the assistant flyout is opened from the `Ask AI assistant` button in the alert flyout, we have one flyout which means one alert in the assistant. But with the Assistant icon shown on each row of the table, we need to register context for each alert. That means that x alert buttons equals to x alerts in the assistant. This is how it translates in the UI:  Redesigning how the assistant context works is very involved and too risky to do at such a late time. This PR removes the Assistant button from the row actions, which solves the issue: https://github.com/user-attachments/assets/0fd94cc1-4fbd-4e70-9790-22e4913477ff Also, @stephmilovic noticed that when the assistant is opened from a different launch point than the suggested prompt, and the suggested prompt is still in the DOM, its prompt context shows up empty: <img width="600" alt="Screenshot 2025-04-24 at 11 41 23 AM" src="https://github.com/user-attachments/assets/0ceb3ffc-72e5-425c-b550-9b8d5896f359" /> She resolved this by adding a check in the ContextPills component for `description.length > 0`. This would be resolved by the on click issue, so might be worth coming back to. This change is visible in the second commit and stolen from [this PR](elastic#219144). ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios relates to elastic/security-team#11973 (cherry picked from commit cc98975)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
There is an issue in how we handle prompt context that causes as many alert contexts to appear as there are alerts in the DOM when we include the button in the table:
We've removed the button from the table for now and opened an issue to come up with a better solution long term: #219142
I also noticed that when the assistant is opened from a different launch point than the suggested prompt, and the suggested prompt is still in the DOM, its prompt context shows up empty:

I resolved this by adding a check in the ContextPills component for
description.length > 0. This would be resolved by the on click issue, so might be worth coming back to.