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.x] [Security Solution] - fixing infinite look on host flyout panel due to lack of memoization (#204999) #205104

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…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)
@kibanamachine kibanamachine merged commit 3d88e86 into elastic:8.x Dec 23, 2024
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 18.5MB 18.5MB +148.0B

cc @PhilippeOberti

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