Skip to content

[Discover] Background search inspect in child flyout#250252

Merged
akowalska622 merged 49 commits intoelastic:mainfrom
akowalska622:discover-background-search-inspect-in-flyout
Apr 15, 2026
Merged

[Discover] Background search inspect in child flyout#250252
akowalska622 merged 49 commits intoelastic:mainfrom
akowalska622:discover-background-search-inspect-in-flyout

Conversation

@akowalska622
Copy link
Copy Markdown
Contributor

@akowalska622 akowalska622 commented Jan 23, 2026

Summary

Resolves: #242240
A-la-carte: https://akowalska622-pr-250252-discover-background-search-inspect-i.kbndev.co/

This pull request refactors and modernizes the way flyouts are implemented and opened in the search session management UI. The main improvements include extracting and reusing the InspectFlyout component, switching to the new openSystemFlyout API for overlays, and simplifying context and rendering logic. Additionally, the "Inspect" action is now available in the session management table and renders a connected background search details as a child flyout.

bg search flyout

Screenshot 2026-01-23 at 17 20 16

Steps to test:

  1. Install kibana_sample_data_ecommerce data
  2. Switch to ES|QL
  3. Run FROM kibana_sample_data_ecommerce | LIMIT 1 | EVAL delay(5000ms)
  4. While query is running, click Send to background button (adjust delay if you need more time)
SCR-20260220-mcgy
  1. Click three dots on app bar and select Background searches option
Screenshot 2026-02-20 at 13 33 09
  1. Click three dots on any background search entry and select Inspect
Screenshot 2026-02-20 at 13 35 50
  1. Details should be displayed in a child flyout
Screenshot 2026-02-20 at 13 34 27

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

Comment thread src/core/packages/overlays/browser-internal/src/flyout/system_flyout_service.tsx Outdated
Comment on lines -56 to -57
coreStart.rendering.addContext(
<KibanaReactContextProvider>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Context is handled in src/core/packages/overlays/browser-internal/src/flyout/system_flyout_service.tsx now

@kertal kertal requested a review from AlexGPlay January 23, 2026 17:47
@kertal
Copy link
Copy Markdown
Member

kertal commented Jan 23, 2026

just came by to be exited ... would have helped me a lot in the debugging phase of 8.2, so my wish now it having a Time Machine, to backport the commit to September 2025

@akowalska622 akowalska622 self-assigned this Jan 26, 2026
@akowalska622 akowalska622 added release_note:enhancement backport:skip This PR does not require backporting Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// labels Jan 26, 2026
@akowalska622
Copy link
Copy Markdown
Contributor Author

/ci

@akowalska622 akowalska622 marked this pull request as ready for review April 10, 2026 10:31
@akowalska622
Copy link
Copy Markdown
Contributor Author

Opening for review again, maybe this time we have more luck 🤞 🍀

@akowalska622 akowalska622 requested a review from AlexGPlay April 10, 2026 10:31
export interface IClickActionDescriptor {
label: React.ReactNode;
iconType: 'trash' | 'cancel' | typeof extendSessionIcon;
iconType: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe we can just use IconType from eui

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea, swapped in 77abf2a

@akowalska622 akowalska622 requested a review from AlexGPlay April 13, 2026 07:42
Copy link
Copy Markdown
Contributor

@AlexGPlay AlexGPlay left a comment

Choose a reason for hiding this comment

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

lgtm - played with it for a bit and now it works nice! 🚀

@akowalska622 akowalska622 removed the request for review from a team April 14, 2026 08:17
Copy link
Copy Markdown
Contributor

@andrimal andrimal left a comment

Choose a reason for hiding this comment

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

Code changes LGTM! ✨ Nothing touches Lens or visualizations.

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 625 628 +3

Page load bundle

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

id before after diff
data 442.8KB 442.6KB -236.0B

History

cc @akowalska622

@akowalska622 akowalska622 merged commit a2a1889 into elastic:main Apr 15, 2026
17 checks passed
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:enhancement Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Background search] Provide an Inspect action that opens an extensible flyout

7 participants