Skip to content
Merged
3 changes: 2 additions & 1 deletion src/platform/plugins/shared/management/public/plugin.tsx
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ export class ManagementPlugin
title: section.title,
deepLinks: section
.getAppsEnabled()
.filter((mgmtApp) => !mgmtApp.hideFromGlobalSearch)
.filter((mgmtApp) => mgmtApp.visibleIn || !mgmtApp.hideFromGlobalSearch)
.map((mgmtApp) => ({
id: mgmtApp.id,
title: mgmtApp.title,
path: mgmtApp.basePath,
keywords: mgmtApp.keywords,
...(mgmtApp.visibleIn ? { visibleIn: mgmtApp.visibleIn } : {}),
})),
})
);
Expand Down
2 changes: 2 additions & 0 deletions src/platform/plugins/shared/management/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
CoreStart,
ChromeBreadcrumb,
CoreTheme,
AppDeepLinkLocations,
} from '@kbn/core/public';
import type { LocatorPublic } from '@kbn/share-plugin/common';
import type { CardsNavigationComponentProps } from '@kbn/management-cards-navigation';
Expand Down Expand Up @@ -110,6 +111,7 @@ export interface CreateManagementItemArgs {
icon?: string; // URL to image file; fallback if no `euiIconType`
hideFromSidebar?: boolean;
hideFromGlobalSearch?: boolean; // Hide from global search results
visibleIn?: AppDeepLinkLocations[]; // Controls deep link visibility; takes precedence over hideFromGlobalSearch
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.

Is there a reason t have both hideFromGlobalSearch and visibleIn? Could visibleIn be more descriptive, such as deepLinkVisibility?

Copy link
Copy Markdown
Contributor Author

@baileycash-elastic baileycash-elastic Apr 1, 2026

Choose a reason for hiding this comment

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

hideFromGlobalSearch is being used in a couple of other places. This is a last minute change as part of the unified rules effort next week, trying to get approvals for its removal may delay us. I also didn't want to nuke a use case I'm not aware of.

visibleIn is a newer toggle used elsewhere in Kibana for deep link visibility management. I agree it's vague, but I didn't want to break away from convention in one place and have a discrepancy with how we manage visibility

Copy link
Copy Markdown
Contributor

@mattkime mattkime Apr 1, 2026

Choose a reason for hiding this comment

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

I also didn't want to nuke a use case I'm not aware of.

I just wanted to verify my understanding, any cleanup could happen later.

visibleIn is a newer toggle used elsewhere in Kibana for deep link visibility management

Looks like its used in the core app interface, good reason to reuse it.

capabilitiesId?: string; // overrides app id
redirectFrom?: string; // redirects from an old app id to the current app id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import type { AppDeepLinkLocations } from '@kbn/core/public';
import type { CreateManagementItemArgs } from '../types';

export class ManagementItem {
Expand All @@ -16,6 +17,7 @@ export class ManagementItem {
public readonly order: number;
public readonly hideFromSidebar?: boolean;
public readonly hideFromGlobalSearch?: boolean;
public readonly visibleIn?: AppDeepLinkLocations[];
public readonly euiIconType?: string;
public readonly icon?: string;
public readonly capabilitiesId?: string;
Expand All @@ -30,6 +32,7 @@ export class ManagementItem {
order = 100,
hideFromSidebar = false,
hideFromGlobalSearch = false,
visibleIn,
euiIconType,
icon,
capabilitiesId,
Expand All @@ -41,6 +44,7 @@ export class ManagementItem {
this.order = order;
this.hideFromSidebar = hideFromSidebar;
this.hideFromGlobalSearch = hideFromGlobalSearch;
this.visibleIn = visibleIn;
this.euiIconType = euiIconType;
this.icon = icon;
this.capabilitiesId = capabilitiesId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ export class Plugin
id: PLUGIN_ID,
title: featureTitle,
order: 1,
visibleIn: [],
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.

added visibleIn here to avoid changing the intentions behind hideFromGlobalSearch filter in management plugin. We still need the app in deep links to retain sidenav appearance

async mount(params: ManagementAppMountParams) {
const [coreStart] = (await core.getStartServices()) as [CoreStart, PluginsStart, unknown];

Expand Down
Loading