Skip to content

Conversation

@davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Nov 29, 2025

Summary

This PR minimizes many of the references to DiscoverSavedSearchContainer to get us closer to full removal. It's the first of two parts, and largely addresses these areas:

  • Removes redundant DiscoverSavedSearchContainer methods for which there are equivalent alternatives, e.g. getId and getTitle.
  • Lifts initUrlTracking directly into DiscoverStateContainer.initializeAndSync.
  • Replaces various calls to searchSource.getField() with their Redux or runtime state equivalents.
  • Migrates some functions that previously relied on SavedSearch to use DiscoverSessionTab or another equivalent, e.g. getInitialAppState.
  • Updates several Jest test files to stop relying on SavedSearch and related mocks, using getDiscoverInternalStateMock instead.

Part of #241890.

Checklist

  • 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.

@davismcphee davismcphee self-assigned this Nov 29, 2025
@davismcphee davismcphee added release_note:skip Skip the PR/issue when compiling release notes 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 Nov 29, 2025
@davismcphee davismcphee force-pushed the discover-remove-saved-search-container branch from 436e4bd to 78da026 Compare December 3, 2025 23:09
@davismcphee davismcphee force-pushed the discover-remove-saved-search-container branch from 2084e7f to 8d75174 Compare December 8, 2025 17:47
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 1866 1865 -1

Async chunks

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

id before after diff
discover 1.3MB 1.3MB +410.0B

History

cc @davismcphee

@davismcphee davismcphee marked this pull request as ready for review December 8, 2025 23:48
@davismcphee davismcphee requested review from a team as code owners December 8, 2025 23:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

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:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants