Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] - fixing infinite look on host flyout panel due to lack of memoization #204999

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Dec 19, 2024

Summary

This PR fixes an issue raised recently where opening a preview panel for a host of user on top of a flyout already showing a host or user was getting the UI stuck into an infinite loop.

While we found a few ways to fix the issue - primarily adding memoization to the UI components within the HostPanel and UserPanel, the approach in this PR fixes the issue at a more root level.

Infinite loop behavior

Screen.Recording.2024-12-19.at.1.20.02.PM.mov

Issue fixed

Screen.Recording.2024-12-19.at.1.18.46.PM.mov

This fix should also potentially bring some performance improvement to all the components that are using the hook (we have a few).

@PhilippeOberti PhilippeOberti added backport release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Threat Hunting:Investigations Security Solution Investigations Team backport:version Backport to applied version labels v8.18.0 labels Dec 19, 2024
@PhilippeOberti PhilippeOberti requested a review from a team as a code owner December 19, 2024 19:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

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

id before after diff
securitySolution 21.4MB 21.4MB +185.0B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels backport release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants