Skip to content

Conversation

@mbondyra
Copy link
Contributor

@mbondyra mbondyra commented Dec 3, 2025

Summary

Adds CPS functionality to Discover, enabling saved searches and Discover embeddables to react to changes in CPS project picker.
Screenshot 2025-12-03 at 15 01 09

Discover app

  1. When going to Discover, project routing is set to default spaces setting (for now hardcoded).
  2. When moving to another app or reloading Discover page, the setting is reset.
  3. Project routing is not persisted in URL.
  4. The user has the ability to save the project routing setting to a Discover session. If it's saved, next time it will be loaded with the saved setting.
  5. Project routing is persisted per discover session if the user choses to save it to saved object, not per tab (with the ability to override for ESQL tabs)

Dashboard

  1. By default, Discover session takes the CPS setting from the Dashboard (implemented here)
  2. If Discover session has its own project routing saved in, it takes precedence over the Dashboard setting and informs the user about scope overrides via custom badge (please do not pay much attention to the badge current design, it will be refined later on + it doesn't display yet for ESQL cases):
Screenshot 2025-12-03 at 14 28 39

@mbondyra mbondyra 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 v9.3.0 labels Dec 3, 2025
@mbondyra mbondyra force-pushed the discover_CPS branch 4 times, most recently from 6ea93f4 to 0d5bad2 Compare December 3, 2025 11:45
@mbondyra mbondyra marked this pull request as ready for review December 3, 2025 14:28
@mbondyra mbondyra requested review from a team as code owners December 3, 2025 14:28
@elasticmachine
Copy link
Contributor

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

@nreese
Copy link
Contributor

nreese commented Dec 3, 2025

Any way to make the CPS override badge in the panel header smaller and look more like CPS picker button from unified search?

@mbondyra
Copy link
Contributor Author

mbondyra commented Dec 3, 2025

Any way to make the CPS override badge in the panel header smaller and look more like CPS picker button from unified search?

You mean the icon? It has to be added to EUI, we're working on it. The design is not final yet - we'll be refining in the next PR 🙏🏼

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 1862 1863 +1
presentationPanel 159 160 +1
total +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
discover 157 158 +1
savedSearch 102 103 +1
total +2

Async chunks

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

id before after diff
aiops 526.6KB 526.8KB +172.0B
dataVisualizer 597.5KB 597.6KB +170.0B
discover 1.3MB 1.3MB +2.7KB
embeddableAlertsTable 1001.0KB 1001.2KB +173.0B
lens 1.6MB 1.6MB +178.0B
maps 3.1MB 3.1MB +179.0B
ml 5.6MB 5.6MB +344.0B
presentationPanel 40.7KB 43.0KB +2.3KB
savedSearch 6.9KB 7.1KB +216.0B
slo 991.7KB 991.9KB +172.0B
synthetics 1.0MB 1.0MB +172.0B
visualizations 343.5KB 343.7KB +172.0B
total +6.9KB

Page load bundle

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

id before after diff
presentationPanel 10.1KB 10.3KB +198.0B
savedSearch 10.1KB 10.3KB +113.0B
total +311.0B
Unknown metric groups

API count

id before after diff
discover 199 200 +1
savedSearch 106 107 +1
total +2

History

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:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants