Skip to content

[ML] Rewrite Log rate analysis flyout to load asynchronously#229951

Merged
olapawlus merged 12 commits intoelastic:mainfrom
olapawlus:logRateAnalysisFlyoutRewrite
Aug 1, 2025
Merged

[ML] Rewrite Log rate analysis flyout to load asynchronously#229951
olapawlus merged 12 commits intoelastic:mainfrom
olapawlus:logRateAnalysisFlyoutRewrite

Conversation

@olapawlus
Copy link
Member

@olapawlus olapawlus commented Jul 30, 2025

Part of #227446

This PR improves the UX of opening Log rate analysis embeddable flyouts by showing the flyout immediately with a loading indicator, then loading the async content in the background.

Key Changes
✅ Removed the old Promise-based flyout initialization that simulated event handling.
✅ Replaced it with the standardized openLazyFlyout() from @kbn/presentation-util.
✅ Lazy-loaded content now fetches after the flyout opens, improving perceived performance.
✅ Cleaned up onEdit and createAction handlers for simpler, more consistent logic.

Why
To make the flyout feel faster and smoother by avoiding delays from waiting for async content.

@olapawlus olapawlus self-assigned this Jul 30, 2025
@olapawlus olapawlus added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis v9.2.0 labels Jul 30, 2025
@olapawlus olapawlus requested review from mbondyra and rbrtj July 30, 2025 12:29
@olapawlus olapawlus force-pushed the logRateAnalysisFlyoutRewrite branch from f5dca04 to a6099ad Compare July 30, 2025 12:49
@olapawlus olapawlus marked this pull request as ready for review July 31, 2025 09:22
@olapawlus olapawlus requested a review from a team as a code owner July 31, 2025 09:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested all the cases I could think off. Code LGTM 👌🏼 great job!

@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
aiops 516.9KB 517.6KB +790.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
aiops 13.5KB 13.7KB +193.0B
Unknown metric groups

async chunk count

id before after diff
aiops 41 42 +1

History

cc @olapawlus

@olapawlus olapawlus enabled auto-merge (squash) August 1, 2025 07:39
Copy link
Contributor

@rbrtj rbrtj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@olapawlus olapawlus merged commit ea7a632 into elastic:main Aug 1, 2025
13 checks passed
szaffarano pushed a commit to szaffarano/kibana that referenced this pull request Aug 5, 2025
…#229951)

Part of elastic#227446

This PR improves the UX of opening Log rate analysis embeddable flyouts
by showing the flyout immediately with a loading indicator, then loading
the async content in the background.

Key Changes
✅ Removed the old Promise-based flyout initialization that simulated
event handling.
✅ Replaced it with the standardized openLazyFlyout() from
@kbn/presentation-util.
✅ Lazy-loaded content now fetches after the flyout opens, improving
perceived performance.
✅ Cleaned up onEdit and createAction handlers for simpler, more
consistent logic.

Why
To make the flyout feel faster and smoother by avoiding delays from
waiting for async content.

---------

Co-authored-by: mbondyra <marta.bondyra@elastic.co>
delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
…#229951)

Part of elastic#227446

This PR improves the UX of opening Log rate analysis embeddable flyouts
by showing the flyout immediately with a loading indicator, then loading
the async content in the background.

Key Changes
✅ Removed the old Promise-based flyout initialization that simulated
event handling.
✅ Replaced it with the standardized openLazyFlyout() from
@kbn/presentation-util.
✅ Lazy-loaded content now fetches after the flyout opens, improving
perceived performance.
✅ Cleaned up onEdit and createAction handlers for simpler, more
consistent logic.

Why
To make the flyout feel faster and smoother by avoiding delays from
waiting for async content.

---------

Co-authored-by: mbondyra <marta.bondyra@elastic.co>
@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…#229951)

Part of elastic#227446

This PR improves the UX of opening Log rate analysis embeddable flyouts
by showing the flyout immediately with a loading indicator, then loading
the async content in the background.

Key Changes
✅ Removed the old Promise-based flyout initialization that simulated
event handling.
✅ Replaced it with the standardized openLazyFlyout() from
@kbn/presentation-util.
✅ Lazy-loaded content now fetches after the flyout opens, improving
perceived performance.
✅ Cleaned up onEdit and createAction handlers for simpler, more
consistent logic.

Why
To make the flyout feel faster and smoother by avoiding delays from
waiting for async content.

---------

Co-authored-by: mbondyra <marta.bondyra@elastic.co>
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 Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants