Skip to content

Add deployment name to breadcrumbs in ECH#238078

Merged
kowalczyk-krzysztof merged 21 commits intoelastic:mainfrom
kowalczyk-krzysztof:feat/add-deployment-name-to-breadcrumbs
Oct 27, 2025
Merged

Add deployment name to breadcrumbs in ECH#238078
kowalczyk-krzysztof merged 21 commits intoelastic:mainfrom
kowalczyk-krzysztof:feat/add-deployment-name-to-breadcrumbs

Conversation

@kowalczyk-krzysztof
Copy link
Member

@kowalczyk-krzysztof kowalczyk-krzysztof commented Oct 8, 2025

Summary

This PR adds deployment name to breadcrumbs for solution views on ECH.

Screenshot 2025-10-08 at 17 09 27

Closes: #235938

Testing locally

  1. Add the following mocked cloud config to your kibana.dev.yml
xpack.cloud.id: "ftr_fake_cloud_id:aGVsbG8uY29tOjQ0MyRFUzEyM2FiYyRrYm4xMjNhYmM="
xpack.cloud.deployment_url: "https://cloud.elastic.co/deployments/your-deployment-id"
xpack.cloud.deployments_url: "https://cloud.elastic.co/deployments"
xpack.cloud.base_url: "https://cloud.elastic.co"
  1. Launch Kibana and edit the default space to anything but classic or create a new solution space and switch to it
  2. Go to onboarding URL: http://localhost:5601/app/cloud/onboarding?onboarding_token=test&resource_data={"deployment":{"name":"My Test Deployment","id":"test-123"}}&next=/
  3. If prompted to login, do so

To set different deployment name replace My Test Deployment in the onboarding URL with the name you want.

@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Oct 8, 2025
@kowalczyk-krzysztof kowalczyk-krzysztof added release_note:enhancement backport:skip This PR does not require backporting Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// labels Oct 8, 2025
@kowalczyk-krzysztof
Copy link
Member Author

/ci

@kowalczyk-krzysztof
Copy link
Member Author

/ci

@kowalczyk-krzysztof
Copy link
Member Author

/ci

@kowalczyk-krzysztof kowalczyk-krzysztof added the ci:cloud-deploy Create or update a Cloud deployment label Oct 21, 2025
@kibanamachine
Copy link
Contributor

Cloud deployment initiated, see credentials at: https://buildkite.com/elastic/kibana-deploy-cloud-from-pr/builds/497

@kowalczyk-krzysztof kowalczyk-krzysztof marked this pull request as ready for review October 22, 2025 07:39
@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner October 22, 2025 07:39
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@Dosant Dosant self-requested a review October 22, 2025 08:55
Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

nice work, I'd like to consider some suggestions to attempt to unify serverless and deployment

@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner October 22, 2025 14:45
Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

looks good, imo, this version is cleaner!

I still think it would be nice to have a service that caches and dedupes /internal/cloud/solution requests.

if not in this PR, let's create an issue and follow up if you feel like it? Otherwise, that's fine

@kowalczyk-krzysztof
Copy link
Member Author

looks good, imo, this version is cleaner!

I still think it would be nice to have a service that caches and dedupes /internal/cloud/solution requests.

if not in this PR, let's create an issue and follow up if you feel like it? Otherwise, that's fine

I'll create a follow up issue.

@kowalczyk-krzysztof
Copy link
Member Author

Added follow-up issue: #240117

@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner October 22, 2025 15:38
.then((response) => {
const deploymentName = response?.resourceData?.deployment?.name;
if (deploymentName) {
(coreStart.chrome as InternalChromeStart)?.project?.setKibanaName(deploymentName);
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems a bit hacky to me.

  • We need to access an internal property to set a name.
  • That setter is under a "project" property, but here we're specifically talking about ECH and !Serverless, thus deployments. I'm guessing this was used on Serverless only and your PR sets it on ECH too.

If the chrome plugin does not know how to set a name yet it owns the logic to set it... the setter should be available in its public API IMO. And if project property holds functionality for both ECH and Serverless perhaps we should generalise it into something that covers both. I wonder if any of these setters make sense for self-managed customers.

Copy link
Contributor

@Dosant Dosant Oct 23, 2025

Choose a reason for hiding this comment

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

the idea for InternalChromeStart was that we had to expose apis for plugins like serverless, but we didn't want anyone else to know about them :D I am also fine to move this to public type, but we really don't want other plugins to call this ever

That setter is under a "project" property, but here we're specifically talking about ECH and !Serverless, thus deployments. I'm guessing this was used on Serverless only and your PR sets it on ECH too.

This part got messed up when we added solution view to ech/hosted.
What is "project" navigation in chrome initially was build for "serverless" but now it is "serverless" + "solution view of hosted/ech" .

In theory, we could refactor this from Project to SolutionView or something like that.

In this PR we need to set breadcrumb for "solution view of ech" . We do it from cloud plugin, but cloud plugin is also run in serveless, so we don't want to override what serverless plugin has set :(
Ideally, we would have a ech plugin that runs only for ECH and another that runs only in serverless. But we don't.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarifications!
I'm fine with renaming project to solutionView in a follow-up PR.

Copy link
Member Author

@kowalczyk-krzysztof kowalczyk-krzysztof Oct 27, 2025

Choose a reason for hiding this comment

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

Created follow-up issue: #240747

};

const setProjectName = (projectName: string) => {
validateChromeStyle();
Copy link
Contributor

@gsoldevila gsoldevila Oct 23, 2025

Choose a reason for hiding this comment

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

Seems related to my other comment.
Does this mean that everybody can now set the text of the first breadcrumb?
Not saying it's necessarily a bad thing, goes in the lines of exposing the setter publicly in Chrome's API.

@Dosant Dosant requested a review from gsoldevila October 23, 2025 11:32
Copy link
Contributor

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

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

Core changes LGTM (code review only)

@kowalczyk-krzysztof kowalczyk-krzysztof enabled auto-merge (squash) October 27, 2025 07:04
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 27, 2025

💚 Build Succeeded

Metrics [docs]

Page load bundle

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

id before after diff
cloud 8.7KB 9.1KB +335.0B
core 511.4KB 511.6KB +207.0B
serverless 7.0KB 7.0KB -1.0B
total +541.0B

History

cc @kowalczyk-krzysztof

@kowalczyk-krzysztof kowalczyk-krzysztof merged commit 2cff90f into elastic:main Oct 27, 2025
14 checks passed
@kowalczyk-krzysztof kowalczyk-krzysztof deleted the feat/add-deployment-name-to-breadcrumbs branch October 27, 2025 20:40
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 release_note:enhancement Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// v9.3.0

7 participants