Skip to content

[AI4DSOC] Remove assistant button from alerts table#219144

Closed
stephmilovic wants to merge 3 commits intoelastic:mainfrom
stephmilovic:move_chat_to_menu
Closed

[AI4DSOC] Remove assistant button from alerts table#219144
stephmilovic wants to merge 3 commits intoelastic:mainfrom
stephmilovic:move_chat_to_menu

Conversation

@stephmilovic
Copy link
Contributor

@stephmilovic stephmilovic commented Apr 24, 2025

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:

Image

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:
Screenshot 2025-04-24 at 11 41 23 AM

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.

@stephmilovic stephmilovic added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Security Generative AI Security Generative AI v9.1.0 labels Apr 24, 2025
@stephmilovic stephmilovic requested review from a team as code owners April 24, 2025 18:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@stephmilovic
Copy link
Contributor Author

Closing in favor of #219141

@elasticmachine
Copy link
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:

![Screenshot 2025-04-24 at 12 54
50 PM](https://github.com/user-attachments/assets/d59b1cdd-ceef-499c-ba8c-55af38ea6bac)

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:

![Screenshot 2025-04-24 at 12 54
50 PM](https://github.com/user-attachments/assets/d59b1cdd-ceef-499c-ba8c-55af38ea6bac)

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:

![Screenshot 2025-04-24 at 12 54
50 PM](https://github.com/user-attachments/assets/d59b1cdd-ceef-499c-ba8c-55af38ea6bac)

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:

![Screenshot 2025-04-24 at 12 54
50 PM](https://github.com/user-attachments/assets/d59b1cdd-ceef-499c-ba8c-55af38ea6bac)

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:

![Screenshot 2025-04-24 at 12 54
50 PM](https://github.com/user-attachments/assets/d59b1cdd-ceef-499c-ba8c-55af38ea6bac)

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)
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:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants