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

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

Merged

Conversation

PhilippeOberti
Copy link
Contributor

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Philippe Oberti "}}]}] BACKPORT-->

…o lack of memoization (elastic#204999)

## Summary

This PR fixes [an
issue](elastic/security-team#11424) 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

https://github.com/user-attachments/assets/92cb60ad-7801-43ec-a247-8943e091b6a8

Issue fixed

https://github.com/user-attachments/assets/30b30b42-f32e-4c02-9407-9d0f671d7216

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

(cherry picked from commit 96264d2)
@PhilippeOberti PhilippeOberti merged commit ac66082 into elastic:8.17 Jan 6, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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 13.3MB 13.3MB +37.0B

@PhilippeOberti PhilippeOberti deleted the backport/8.17/pr-204999 branch January 6, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants