Skip to content

[ML] Replaces Select Data View page with inline data source picker in AIOps and Data Visualizer pages#266672

Open
KodeRad wants to merge 32 commits into
elastic:mainfrom
KodeRad:ml-data-view-selector-heading
Open

[ML] Replaces Select Data View page with inline data source picker in AIOps and Data Visualizer pages#266672
KodeRad wants to merge 32 commits into
elastic:mainfrom
KodeRad:ml-data-view-selector-heading

Conversation

@KodeRad
Copy link
Copy Markdown
Contributor

@KodeRad KodeRad commented Apr 30, 2026

Summary

Fixes #231608

Removes the intermediate Select Data View page and replaces it with an inline data source picker embedded in the page header for AIOps tools (Log Rate Analysis, Log Pattern Analysis, Change Point Detection) and Data Visualizer pages (Index data visualizer, Data drift). Users navigate directly to the analysis page and pick or switch the data view/Discover session inline, without an extra selection step.

Changes

New MlDataSourcePicker component (@kbn/aiops-components)

  • Wraps Discover's DataViewPicker
  • Adds an "Open Discover session" button that opens MlOpenSessionFlyout
  • MlOpenSessionFlyout — flyout backed by SavedObjectFinder listing saved Discover sessions (ES|QL sessions filtered out)
  • Default choice: saved search or data view from the URL, then falls back to the Kibana default, then the first available data view. (mimic of discover behaviour)

Routing & navigation

  • Removed intermediate DATA_VISUALIZER_INDEX_SELECT and DATA_DRIFT_INDEX_SELECT route constants and their route handlers
  • AIOps routes (Log Rate Analysis, Log Pattern Analysis, Change Point Detection) and Data Visualizer routes load directly to the analysis page; the DataSourceContextProvider resolves the data view from the query-string (?index= / ?savedSearchId=)
  • Breadcrumbs no longer include a "Select Data View" level
  • Removed indexDataVisualizerPage deep-link ID

Page headings & selector cards

  • "Data Visualizer" → "Index data visualizer" (page title)
  • "ES|QL" -> Index data visualizer (ES|QL) (page title)
  • Breadcrumb last item updated to match new headings
  • Selector page cards: "Data view" card → "Index data visualizer"; button label "Select data view" → "Open data visualizer"

Data Drift page

  • PageHeader now accepts an optional headerContent prop; when provided it renders the inline picker in place of the plain data-view title
  • Layout rewritten from EuiPageHeader to a manual EuiFlexGroup for finer control

Index data visualizer

  • Removed the old DataVisualizerDataViewManagement popover component; field-editor access moved into MlDataSourcePicker's onAddField

Unified Search DataViewPicker

  • Added optional compressed?: boolean prop (default true) so ML's inline header picker can render at standard height without breaking existing toolbar usages

Solution navigation trees

  • Removed indexDataVisualizerPage deep link node from Observability, Serverless Observability, Enterprise Search, Serverless Search, and Security ML navigation trees

Tests

  • FTR services and test suites updated for the new navigation flow (data visualizer, data drift, AIOps pages)
  • Performance journey (tsdb_logs_data_visualizer) updated to use the inline picker instead of savedObjectsFinderTable
  • Unit test suite covering: empty state label, data-view label, onChangeDataView, Discover session flyout open/close/select, onDataViewCreated, onAddField guarded by permissions

Test plan

  • Log Rate Analysis, Log Pattern Analysis, Change Point Detection — each loads directly; inline data view picker appears in the page header and switching updates the analysis
  • Index data visualizer (data view) — shows empty prompt + picker when no data view is set; selecting a data view loads the stats table
  • ES|QL — loads directly with no picker
  • Data drift page — inline data view selection works; switching data view updates both reference and comparison panels
  • "Open Discover session" button opens the flyout; selecting a session navigates correctly; ES|QL sessions are hidden
  • Selector page cards show updated titles and button labels
  • Page headings and breadcrumbs match: "Index data visualizer" / "Index data visualizer (ES|QL)"
  • Deep links still navigate to the correct AIOps pages
  • DataViewPicker compressed={false} renders at standard height in the page header; existing toolbar usage (compressed={true} default) is unaffected

Screenshots

data_view_picker_open discover_session_flyout data_drift index_data_visualizer data_visualizer_selector change_point_detection log_pattern_analysis log_rate_analysis

🤖 Generated with Claude Code Reviewed by Human

@peteharverson
Copy link
Copy Markdown
Contributor

peteharverson commented May 1, 2026

@KodeRad this is shaping up well! Dropping some other early feedback in this thread:

  • Can we filter the list of data views which appear in the dropdown to remove those which don't have a time field? Or if we can't filter, we will need to improve the UX where a non-time based data view is chosen to allow the user to quickly select another one:
Screen.Recording.2026-05-01.at.14.18.10.mov
  • Is the 'Open in Discover' button adding any value in the AIOps pages? It will be useful when the switcher is added to the Data View version of the Data Visualizer, but not convinced it's needed for the AIOps pages.
Screenshot 2026-05-01 at 14 23 57

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 5, 2026

Catch flakiness early (recommended): run the flaky test runner against this PR before merging.

The data drift source selection flow now opens an inline popover instead of navigating to a separate page, introducing new async UI interactions (popover open → filter → click) that are timing-sensitive.

Trigger a run with the Flaky Test Runner UI or post this comment on the PR:

/flaky ftrConfig:x-pack/platform/test/functional/apps/ml/data_visualizer/group2/config.ts:30

Share feedback in the #appex-qa channel.

Posted via Macroscope — Flaky Test Runner nudge

@KodeRad KodeRad force-pushed the ml-data-view-selector-heading branch from 3fff743 to affeed1 Compare May 12, 2026 10:33
@KodeRad KodeRad changed the title refactor(ml): Refactor AI Ops components to enhance data view handling [ML] Replace "Select Data View" page with inline DataSourcePicker in AIOps and Data Visualizer May 12, 2026
@KodeRad KodeRad changed the title [ML] Replace "Select Data View" page with inline DataSourcePicker in AIOps and Data Visualizer [ML] Replace Select Data View page with inline DataSourcePicker in AIOps and Data Visualizer May 12, 2026
@KodeRad KodeRad force-pushed the ml-data-view-selector-heading branch from affeed1 to c343079 Compare May 14, 2026 16:01
@KodeRad KodeRad changed the title [ML] Replace Select Data View page with inline DataSourcePicker in AIOps and Data Visualizer [ML] Replace Select Data View page with inline DataSourcePicker (discover) in AIOps and Data Visualizer pages May 14, 2026
@KodeRad KodeRad self-assigned this May 15, 2026
@KodeRad KodeRad force-pushed the ml-data-view-selector-heading branch from 5d050cb to 7f8c6f0 Compare May 15, 2026 15:50
@KodeRad KodeRad added the ci:cloud-deploy Create or update a Cloud deployment label May 19, 2026
@KodeRad KodeRad force-pushed the ml-data-view-selector-heading branch 5 times, most recently from 53cee7b to aff39e6 Compare May 26, 2026 10:00
KodeRad added 10 commits May 26, 2026 12:48
- Updated DataSourcePicker component to include a new prop `requireTimeBased`, which filters data views to only those with a time field.
- Modified ChangePointDetectionPage, LogCategorizationPage, and LogRateAnalysisPage to utilize the updated DataSourcePicker with the new prop.
- Removed obsolete AIOps breadcrumbs from routing files to streamline navigation.

This change improves the user experience by ensuring that only relevant data views are presented in the picker for time-sensitive analyses.
- Changed the navigation paths for the Log Categorization, Log Rate Analysis, and Change Point Detection buttons in the OverviewPage component to reflect updated routes.
- This improves the accuracy of navigation within the AIOps section of the application.
- Enhanced the DataVisualizerStateContextProvider and IndexDataVisualizer components to accept a new `headerContent` prop, allowing for customizable header content.
- Updated IndexDataVisualizerView to render the `headerContent` within the layout, improving flexibility for displaying additional information.
- Implemented similar changes in ChangePointDetectionPage, LogCategorizationPage, and LogRateAnalysisPage to handle scenarios where no data view is selected, displaying an empty prompt along with the header content.

This update enhances the user experience by providing more context and information in the data visualizer components.
- Updated ChangePointDetectionPage, LogCategorizationPage, and LogRateAnalysisPage to include a new `pageTitle` prop, enhancing the header content flexibility.
- Modified MlDataSourcePicker to add a `title` attribute to the trigger for improved accessibility.
…izer components

- Updated FileDataVisualizerPage and IndexDataVisualizerPage to call getMlNodeCount within a useEffect hook, ensuring it runs only once on component mount.
- This change improves performance and adheres to React best practices for managing side effects.
…er usage

- Introduced a mock implementation for OpenSessionPanel in the Discover plugin to enhance testing capabilities.
- Simplified the usage of MlDataSourcePicker across various AIOps components by removing the currentSavedSearch prop, streamlining the component's interface and improving code clarity.
- Removed the OpenSessionPanel from the Discover plugin
- Updated the DiscoverStart interface to reflect the removal of OpenSessionPanel, ensuring type consistency across the application.
- Adjusted the MlDataSourcePicker to utilize the new MlOpenSessionFlyout component for session management, enhancing the user experience.
@KodeRad KodeRad requested review from a team as code owners May 26, 2026 16:08
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/ml-ui (:ml)

@KodeRad KodeRad requested review from peteharverson and qn895 May 26, 2026 16:30
@peteharverson peteharverson changed the title [ML] Replace Select Data View page with inline DataSourcePicker (discover) in AIOps and Data Visualizer pages [ML] Replaces Select Data View page with inline data source picker in AIOps and Data Visualizer pages May 26, 2026
@peteharverson peteharverson changed the title [ML] Replaces Select Data View page with inline data source picker in AIOps and Data Visualizer pages [ML] Replaces Select Data View page with inline data source picker in AIOps and Data Visualizer pages May 26, 2026
Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested latest changes and LGTM

@botelastic botelastic Bot added the ci:project-deploy-observability Create an Observability project label May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Copy Markdown
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

compressed unified search prop LGTM
code review only

body={
<p>
<FormattedMessage
id="xpack.ml.indexDataVisualizer.noDataViewBody"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

super duper nit: since they are all the same messages across 3 places within ml, maybe xpack.ml.common.noDataViewBody is sufficient here

Copy link
Copy Markdown
Member

@qn895 qn895 left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Copy Markdown
Contributor

@yansavitski yansavitski left a comment

Choose a reason for hiding this comment

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

x-pack/solutions/search/plugins/serverless_search/public/navigation_tree.ts and x-pack/solutions/search/plugins/enterprise_search/public/navigation_tree.ts LGTM

Copy link
Copy Markdown
Member

@ashokaditya ashokaditya left a comment

Choose a reason for hiding this comment

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

Did code review only. Changes to x-pack/solutions/security/packages/navigation/src/navigation_tree/ml_navigation_tree.ts LGTM

@KodeRad KodeRad requested review from a team, james-elastic and joana-cps and removed request for a team May 29, 2026 08:35
@kibanamachine
Copy link
Copy Markdown
Contributor

kibanamachine commented May 30, 2026

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 620 793 +173
dataVisualizer 933 934 +1
ml 4348 4393 +45
total +219

Async chunks

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

id before after diff
aiops 530.9KB 531.5KB +633.0B
dataVisualizer 621.9KB 620.9KB -1.0KB
enterpriseSearch 960.1KB 960.0KB -59.0B
ml 5.6MB 5.6MB +7.2KB
observability 2.1MB 2.1MB -59.0B
unifiedSearch 309.9KB 309.9KB +43.0B
total +6.8KB

Page load bundle

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

id before after diff
ml 88.7KB 89.0KB +302.0B
securitySolutionEss 37.5KB 37.5KB -59.0B
securitySolutionServerless 50.1KB 50.1KB -59.0B
serverlessObservability 18.7KB 18.7KB -59.0B
serverlessSearch 25.1KB 25.0KB -59.0B
total +66.0B
Unknown metric groups

async chunk count

id before after diff
ml 117 118 +1

ESLint disabled line counts

id before after diff
@kbn/aiops-components 2 3 +1
ml 546 547 +1
total +2

Total ESLint disabled count

id before after diff
@kbn/aiops-components 2 3 +1
ml 549 550 +1
total +2

History

cc @KodeRad

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown
Contributor

Kibana Exploratory Testing — execution report

Run Metadata

  • Triggered by: Issue #455
  • Elasticsearch image tag: 9.5.0-SNAPSHOT
  • Kibana image: docker.elastic.co/kibana-ci/kibana-serverless:pr-266672-1ba583e9f421
  • Date: 2026-05-30
  • PR: elastic/kibana#266672 — [ML] Replaces Select Data View page with inline data source picker in AIOps and Data Visualizer pages
  • Mode: PR-targeted (journeys generated from PR diff)
  • Journeys executed: 8
  • Passed: 8
  • Errored: 0
  • Findings: 0 bugs, 0 warnings, 0 info

Findings

No findings -- all journeys completed without issues.

Additional details

Screenshots

Screenshots are available in the workflow artifacts.

Workflow run: View workflow run

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 ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-observability Create an Observability project Feature:File and Index Data Viz ML file and index data visualizer Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:enhancement Team:ML Team label for ML (also use :ml) t// v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Standardize UX on Analytics Pages by Replacing Heading with Data View Selector

9 participants