Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0b4053b
wip clean up nav trees structure. clean up search tress
Dosant Nov 5, 2025
61be02c
Implement changes for Observability ECH and Serverless nav.
justinkambic Nov 5, 2025
74f6461
Merge branch 'main' of github.com:elastic/kibana into d/sidenav-clean…
Dosant Nov 6, 2025
83b9b7d
Merge branch 'd/sidenav-cleanup-2' of github.com:Dosant/kibana into d…
Dosant Nov 6, 2025
3fd00be
remove redundant level
Dosant Nov 6, 2025
5353f3f
move level up, fix home, fix tests
Dosant Nov 6, 2025
b9e7066
Changes from node scripts/generate codeowners
kibanamachine Nov 6, 2025
f86cc38
remove i18n
Dosant Nov 6, 2025
9b0f612
Merge branch 'd/sidenav-cleanup-2' of github.com:Dosant/kibana into d…
Dosant Nov 6, 2025
30d52a0
Merge branch 'main' of github.com:elastic/kibana into d/sidenav-clean…
Dosant Nov 7, 2025
acb22a5
clean test utils
Dosant Nov 7, 2025
f17fccf
fix nav service tests
Dosant Nov 7, 2025
4fe6179
fix tests ts
Dosant Nov 7, 2025
5c6f70f
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 10, 2025
9f1f280
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 12, 2025
f0997ff
Merge branch 'main' of github.com:elastic/kibana into d/sidenav-clean…
Dosant Nov 14, 2025
ba484fc
security ECH nav tree cleanup
ashokaditya Nov 14, 2025
d8b3ad1
move custom icons and export
ashokaditya Nov 14, 2025
f148238
Update deep_links.ts
ashokaditya Nov 14, 2025
12ce683
Serverless EASE Nav cleanup
ashokaditya Nov 17, 2025
d8535a7
ECH missing nav ids for launchpad sub links
ashokaditya Nov 17, 2025
a5caee3
serverless essentials/complete tier nav cleanup
ashokaditya Nov 17, 2025
9a1e97a
cleanup redundant footer children ECH nav
ashokaditya Nov 17, 2025
cc64b5c
cleanup redundant footer children EASE nav
ashokaditya Nov 17, 2025
e3da34a
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 17, 2025
20c7299
fix security home link
Dosant Nov 17, 2025
7d93a4a
fix mapper tests
Dosant Nov 17, 2025
cfbe3dd
clean docs
Dosant Nov 17, 2025
87c67d4
Changes from node scripts/lint_ts_projects --fix
kibanamachine Nov 17, 2025
5db0465
fix ts
Dosant Nov 17, 2025
a979e16
Merge branch 'd/sidenav-cleanup-2' of github.com:Dosant/kibana into d…
Dosant Nov 17, 2025
535c00a
fix more tests
Dosant Nov 17, 2025
17c5a29
Merge branch 'main' of github.com:elastic/kibana into d/sidenav-clean…
Dosant Nov 18, 2025
ab190da
fix selector
Dosant Nov 18, 2025
8f7e51d
fix selector
Dosant Nov 18, 2025
81c6e8b
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 20, 2025
e3fa762
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 20, 2025
1e4e2b4
fix incorrect cases link
Dosant Nov 20, 2025
cfbd230
fix
Dosant Nov 20, 2025
b513f43
Merge branch 'main' of github.com:elastic/kibana into d/sidenav-clean…
Dosant Nov 20, 2025
80fe569
fix
Dosant Nov 20, 2025
b9a4ba8
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 23, 2025
73c6794
Merge branch 'main' of github.com:elastic/kibana into d/sidenav-clean…
Dosant Nov 24, 2025
26aba27
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Nov 24, 2025
3d79c2d
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 25, 2025
2768b3f
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Nov 25, 2025
24cae73
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 25, 2025
0eae704
Merge branch 'main' into d/sidenav-cleanup-2
Dosant Nov 25, 2025
6db2354
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,6 @@ src/core/packages/user-settings/server-mocks @elastic/kibana-security
src/core/test-helpers/kbn-server @elastic/kibana-core
src/core/test-helpers/model-versions @elastic/kibana-core
src/platform/packages/private/analytics/utils/analytics_collection_utils @elastic/kibana-core
src/platform/packages/private/default-nav/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations
src/platform/packages/private/default-nav/devtools @elastic/kibana-management
src/platform/packages/private/default-nav/management @elastic/kibana-management
src/platform/packages/private/default-nav/ml @elastic/ml-ui
src/platform/packages/private/kbn-ambient-common-types @elastic/kibana-operations
src/platform/packages/private/kbn-ambient-ftr-types @elastic/kibana-operations @elastic/appex-qa
src/platform/packages/private/kbn-apm-config-loader @elastic/kibana-core @vigneshshanmugam
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,6 @@
"@kbn/deeplinks-shared": "link:src/platform/packages/shared/deeplinks/shared",
"@kbn/deeplinks-workflows": "link:src/platform/packages/shared/deeplinks/workflows",
"@kbn/deeplinks-workplace-ai": "link:src/platform/packages/shared/deeplinks/workplace_ai",
"@kbn/default-nav-analytics": "link:src/platform/packages/private/default-nav/analytics",
"@kbn/default-nav-devtools": "link:src/platform/packages/private/default-nav/devtools",
"@kbn/default-nav-management": "link:src/platform/packages/private/default-nav/management",
"@kbn/default-nav-ml": "link:src/platform/packages/private/default-nav/ml",
"@kbn/default-tracer": "link:src/platform/packages/shared/kbn-default-tracer",
"@kbn/delete-managed-asset-callout": "link:src/platform/packages/shared/kbn-management/delete_managed_assets_callout",
"@kbn/dependency-injection-example-plugin": "link:examples/dependency_injection",
Expand Down
4 changes: 0 additions & 4 deletions src/core/packages/chrome/browser-internal/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ dependsOn:
- '@kbn/core-custom-branding-common'
- '@kbn/core-analytics-browser-mocks'
- '@kbn/core-analytics-browser'
- '@kbn/default-nav-analytics'
- '@kbn/default-nav-ml'
- '@kbn/default-nav-management'
- '@kbn/default-nav-devtools'
- '@kbn/shared-ux-router'
- '@kbn/core-http-browser-internal'
- '@kbn/core-base-browser-internal'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ This service manages the side navigation's state using a decoupled, plugin-based

## Architecture at a Glance

- **Plugins for Stateful Deployment**: Register navigation trees via the `addSolutionNavigation` service from `@kbn/shared-navigation-plugin`.
- **Serverless Plugins**: Register navigation trees via the `initNavigation` method from the serverless plugin's start contract.
- **`ProjectNavigationService`**: Manages the source-of-truth nav state and logic.
- **`ChromeService`**: Orchestrates the UI and bridges the service layer with React.
- **Plugins for Stateful Deployment**: Register navigation trees via the `addSolutionNavigation` service from `@kbn/shared-navigation-plugin`.
- **Serverless Plugins**: Register navigation trees via the `initNavigation` method from the serverless plugin's start contract.
- **`ProjectNavigationService`**: Manages the source-of-truth nav state and logic.
- **`ChromeService`**: Orchestrates the UI and bridges the service layer with React.

## Data Flow

Expand All @@ -34,7 +34,7 @@ The following diagram illustrates how navigation state flows through the system
| |
+--------+--------+
| Props passed directly
| via useObservable()
| via useObservable()
v
+------------------+
| Navigation |
Expand All @@ -56,20 +56,21 @@ This service has three primary responsibilities:

The service does not contain any UI. Instead, it processes navigation trees registered by plugins. This allows the navigation to be extended and customized by different parts of Kibana.

- **Plugins for Stateful Deployment**: Register navigation trees via the `addSolutionNavigation` service from `@kbn/shared-navigation-plugin`.
- **Serverless Plugins**: Register navigation trees via the `initNavigation` method from the serverless plugin's start contract.
- **Plugins for Stateful Deployment**: Register navigation trees via the `addSolutionNavigation` service from `@kbn/shared-navigation-plugin`.
- **Serverless Plugins**: Register navigation trees via the `initNavigation` method from the serverless plugin's start contract.

- **How it works**: Plugins register their components, and the `ChromeService` selects the appropriate one to render based on the current context.
- **How it works**: Plugins register their components, and the `ChromeService` selects the appropriate one to render based on the current context.

### 2. Tracking Active State

This is the most common function of the service. It determines the currently active link and broadcasts it to the UI.

**State Stream**: The active state is exposed as an RxJS observable, `activeNodes$`, which streams the active link and its parent nodes.
- **UI Consumption**: The `ChromeService` subscribes to this stream using the `useObservable` hook and passes the result directly to the Navigation component as props.
- **Detection Algorithm**: The active node is found by the `findActiveNodes` utility, which uses two methods:
1. **Custom Logic (`getIsActive`)**: A node can define its own function for complex activation logic.
2. **Longest URL Match**: As a fallback, the utility finds the most specific link by matching the longest URL prefix.

- **UI Consumption**: The `ChromeService` subscribes to this stream using the `useObservable` hook and passes the result directly to the Navigation component as props.
- **Detection Algorithm**: The active node is found by the `findActiveNodes` utility, which uses two methods:
1. **Custom Logic (`getIsActive`)**: A node can define its own function for complex activation logic.
2. **Longest URL Match**: As a fallback, the utility finds the most specific link by matching the longest URL prefix.

#### Breadcrumbs Generation

Expand All @@ -88,12 +89,3 @@ The Navigation component uses the active nodes information to highlight the curr
2. When rendering the navigation tree, each item compares its ID with the active node's ID
3. If they match, the item is rendered with an "active" state (different styling)
4. Parent nodes of the active item may also receive special styling to show the active path

### 3. Managing Solution Navigation

The service also manages the top-level navigation structure for different **Solutions** (major sections of Kibana like Observability or Security).

- **What it is**: This allows for entirely different navigation trees to be swapped out.
- **Key Methods**:
- `changeActiveSolutionNavigation()`: Swaps the active solution.
- `getNavState$()`: Provides a combined observable with all relevant nav state (active nodes, breadcrumbs, etc.).

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import type {
AppDeepLinkId,
ChromeProjectNavigationNode,
NavigationTreeDefinition,
GroupDefinition,
SolutionNavigationDefinition,
} from '@kbn/core-chrome-browser';
import { ProjectNavigationService } from './project_navigation_service';
Expand Down Expand Up @@ -302,94 +301,6 @@ describe('initNavigation()', () => {
],
});
});

test('should leave "recentlyAccessed" as is', async () => {
const treeDefinition = await getNavigationTree();
const nodes = treeDefinition.body as ChromeProjectNavigationNode[];
expect(nodes[2]).toEqual({
type: 'recentlyAccessed',
});
});

test('should load preset', async () => {
const treeDefinition = await getNavigationTree();
const nodes = treeDefinition.body as ChromeProjectNavigationNode[];

expect(nodes[3]).toMatchInlineSnapshot(`
Object {
"children": Array [
Object {
"deepLink": Object {
"baseUrl": "/app",
"href": "/app/discover",
"id": "discover",
"title": "DISCOVER",
"url": "/app/discover",
"visibleIn": Array [
"globalSearch",
],
},
"href": "/app/discover",
"id": "discover",
"isExternalLink": false,
"onClick": undefined,
"path": "rootNav:analytics.discover",
"sideNavStatus": "visible",
"title": "DISCOVER",
},
Object {
"deepLink": Object {
"baseUrl": "/app",
"href": "/app/dashboards",
"id": "dashboards",
"title": "DASHBOARDS",
"url": "/app/dashboards",
"visibleIn": Array [
"globalSearch",
],
},
"href": "/app/dashboards",
"id": "dashboards",
"isExternalLink": false,
"onClick": undefined,
"path": "rootNav:analytics.dashboards",
"sideNavStatus": "visible",
"title": "DASHBOARDS",
},
Object {
"deepLink": Object {
"baseUrl": "/app",
"href": "/app/visualize",
"id": "visualize",
"title": "VISUALIZE",
"url": "/app/visualize",
"visibleIn": Array [
"globalSearch",
],
},
"href": "/app/visualize",
"id": "visualize",
"isExternalLink": false,
"onClick": undefined,
"path": "rootNav:analytics.visualize",
"sideNavStatus": "visible",
"title": "VISUALIZE",
},
],
"deepLink": undefined,
"href": undefined,
"icon": "stats",
"id": "rootNav:analytics",
"isExternalLink": false,
"onClick": undefined,
"path": "rootNav:analytics",
"renderAs": "accordion",
"sideNavStatus": "visible",
"title": "Data exploration",
"type": "navGroup",
}
`);
});
});

test('should handle race condition when initNavigation() is called after getNavigationTreeUi$()', async () => {
Expand Down Expand Up @@ -578,7 +489,6 @@ describe('breadcrumbs', () => {
id: 'root',
title: 'Root',
breadcrumbStatus: 'hidden' as 'hidden',
type: 'navGroup',
children: [
{
id: 'subNav',
Expand Down Expand Up @@ -822,7 +732,7 @@ describe('breadcrumbs', () => {
expect(breadcrumbs).toHaveLength(4);

// navigation node contents changed, but not the path
const [node] = mockNavigation.body as [GroupDefinition];
const [node] = mockNavigation.body;
updateDefinition({
body: [{ ...node, title: 'Changed title' }, ...mockNavigation.body],
});
Expand Down
Loading