[SideNav] Make solutions navigation respect 'visibleIn': ['sideNav']#270634
[SideNav] Make solutions navigation respect 'visibleIn': ['sideNav']#270634paulinashakirova wants to merge 12 commits into
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
/oblt-deploy |
|
Project deployments require a Github label, please add one or more of |
|
/ci |
…and 'solutionSideNav' This commit modifies the visibility settings for various applications and deep links to replace 'sideNav' with 'classicSideNav' and 'solutionSideNav'. The changes ensure that links are appropriately categorized for the new navigation structure, enhancing user experience across different navigation styles. Affected files include application registration, deep link definitions, and test cases to reflect the updated visibility settings.
|
/ci |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates app/deep-link visibleIn handling to distinguish between classic (hamburger) navigation and solution navigation, and ensures solution side nav respects visibleIn settings.
Changes:
- Replaces legacy
'sideNav'visibility with'classicSideNav'and/or'solutionSideNav'across apps and deep links. - Updates core navigation filtering to remove solution side nav links when
solutionSideNavis not included invisibleIn. - Expands/updates tests to validate the new visibility behavior in core and multiple solution plugins.
Reviewed changes
Copilot reviewed 52 out of 52 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| x-pack/solutions/workplaceai/plugins/workplace_ai_app/public/application/register.ts | Updates app visibleIn to include both classic + solution nav. |
| x-pack/solutions/security/plugins/security_solution/public/onboarding/links.ts | Adjusts onboarding link visibility for classic + solution nav. |
| x-pack/solutions/security/plugins/security_solution/public/app/links/deep_links.ts | Updates derived deep link visibility to classic/solution nav and adjusts unavailable link handling. |
| x-pack/solutions/security/plugins/security_solution/public/app/links/deep_links.test.ts | Updates expectations for solution-side-nav visibility. |
| x-pack/solutions/search/plugins/search_synonyms/public/plugin.ts | Adds solution side nav visibility to app/deeplinks; updates classic/solution nav visibility. |
| x-pack/solutions/search/plugins/search_query_rules/public/plugin.ts | Updates app visibility to classic + solution nav. |
| x-pack/solutions/search/plugins/search_playground/public/plugin.ts | Updates app visibility to classic + solution nav. |
| x-pack/solutions/search/plugins/search_homepage/public/plugin.ts | Updates app visibility to classic + solution nav. |
| x-pack/solutions/search/plugins/search_getting_started/public/plugin.ts | Updates app visibility to classic + solution nav. |
| x-pack/solutions/observability/plugins/uptime/public/plugin.ts | Adds visibleIn to a deep link for solution nav + global search. |
| x-pack/solutions/observability/plugins/synthetics/public/plugin.ts | Adds visibleIn to deep links for solution nav + global search. |
| x-pack/solutions/observability/plugins/profiling/public/plugin.ts | Adds deep link visibleIn and tightens typing with satisfies AppDeepLink[]. |
| x-pack/solutions/observability/plugins/observability_shared/public/services/update_global_navigation.tsx | Updates dynamic nav link visibility to classic + solution nav. |
| x-pack/solutions/observability/plugins/observability_shared/public/services/update_global_navigation.test.tsx | Updates tests for new visibility locations. |
| x-pack/solutions/observability/plugins/observability_onboarding/public/plugin.ts | Adds solution side nav visibility. |
| x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/plugin.tsx | Makes AI Assistant visible in solution side nav. |
| x-pack/solutions/observability/plugins/observability/public/plugin.ts | Updates deep link visibilities and app visibility for classic/solution nav modes. |
| x-pack/solutions/observability/plugins/infra/public/plugin.ts | Introduces getInfraDeepLinks and sets deep link visibleIn for solution nav/global search. |
| x-pack/solutions/observability/plugins/infra/public/plugin.test.ts | Adds unit tests for Infra deep link visibility behavior. |
| x-pack/solutions/observability/plugins/infra/public/pages/logs/routes.ts | Adds optional visibleIn to log routes and sets it for anomalies/categories. |
| x-pack/solutions/observability/plugins/apm/public/plugin.ts | Adds deep link visibleIn for solution nav + global search. |
| x-pack/platform/plugins/shared/triggers_actions_ui/public/plugin.ts | Adds solution side nav visibility for Rules entry. |
| x-pack/platform/plugins/shared/streams_app/public/plugin.tsx | Updates updater to include classic + solution nav. |
| x-pack/platform/plugins/shared/ml/public/register_helper/register_search_links/search_deep_links.ts | Adds/updates deep link visibility rules for solution nav + global search. |
| x-pack/platform/plugins/shared/ml/public/register_helper/register_search_links/search_deep_links.test.ts | Adds test coverage for ML deep link visibility behavior. |
| x-pack/platform/plugins/shared/ingest_hub/public/plugin.tsx | Updates feature-flagged visibility to classic + solution nav. |
| x-pack/platform/plugins/shared/ingest_hub/public/plugin.test.tsx | Updates test expectation for classic + solution nav visibility. |
| x-pack/platform/plugins/shared/inbox/public/plugin.tsx | Updates Inbox visibility to classic + solution nav. |
| x-pack/platform/plugins/shared/inbox/public/plugin.test.ts | Updates tests to assert classic + solution nav visibility. |
| x-pack/platform/plugins/shared/fleet/public/deep_links.ts | Updates Fleet deep links to include solution side nav when authorized. |
| x-pack/platform/plugins/shared/fleet/public/deep_links.test.ts | Adds tests for Fleet deep link visibility by authorization state. |
| x-pack/platform/plugins/shared/agent_builder/public/register.ts | Updates app visibility to classic + solution nav. |
| src/platform/test/plugin_functional/test_suites/core_plugins/application_status.ts | Updates functional test to use classic/solution nav locations. |
| src/platform/plugins/shared/workflows_management/public/plugin.ts | Updates computed visibility locations and clarifies intent in comments. |
| src/platform/plugins/shared/workflows_management/public/plugin.test.ts | Updates tests and descriptions for classic/solution nav behavior. |
| src/platform/plugins/shared/visualizations/public/plugin.ts | Updates visibility logic to use classicSideNav instead of sideNav. |
| src/platform/plugins/shared/management/public/plugin_deep_links.test.ts | Adds tests for Management deep link defaulting/preservation rules. |
| src/platform/plugins/shared/management/public/plugin.tsx | Defaults management deep-link visibility to include global search + both nav modes. |
| src/platform/plugins/shared/discover/public/plugin.tsx | Updates Discover visibility to classic + solution nav. |
| src/platform/plugins/shared/dev_tools/public/plugin.ts | Adds solution side nav visibility for dev tools deep links. |
| src/platform/plugins/private/kibana_overview/public/plugin.ts | Updates visibility to include classic + solution nav. |
| src/core/packages/chrome/browser-internal/src/services/project_navigation/utils.ts | Filters solution nav nodes based on solutionSideNav in visibleIn. |
| src/core/packages/chrome/browser-internal/src/services/project_navigation/utils.test.ts | Updates visibility defaults used in tests. |
| src/core/packages/chrome/browser-internal/src/services/project_navigation/project_navigation_service.test.ts | Adds tests ensuring solution nav filters out links excluding solutionSideNav. |
| src/core/packages/chrome/browser-internal/src/services/nav_links/to_nav_link.test.ts | Updates test fixtures to new nav visibility locations. |
| src/core/packages/chrome/browser-internal/src/services/nav_links/nav_links_service.test.ts | Updates test fixtures to new nav visibility locations. |
| src/core/packages/chrome/browser-components/src/project/sidenav/navigation/to_navigation_items.test.tsx | Updates test fixture visibility to new locations. |
| src/core/packages/chrome/browser-components/src/classic/collapsible_nav.tsx | Switches classic nav filtering from sideNav to classicSideNav. |
| src/core/packages/chrome/browser-components/src/classic/collapsible_nav.test.tsx | Updates test fixtures to use classic + solution nav locations. |
| src/core/packages/application/browser/src/application.ts | Updates API docs/types: replaces sideNav with classicSideNav/solutionSideNav and default visibility. |
| src/core/packages/application/browser-internal/src/utils/get_app_info.test.ts | Updates expected default visibilities in core app info tests. |
| src/core/packages/application/browser-internal/src/utils/constants.ts | Updates default app visibility constant to include classic + solution nav. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Three FTR failures on the latest CI run trace back to the bridge commit that introduced 'sideNav' on deep links that previously had no explicit visibleIn: 1. Serverless ML search_bar_features (search, security, observability) File upload / Index data visualizer / Data drift had ['sideNav'] in the bridge commit, which dropped them from globalSearch. Restored ['globalSearch', 'solutionSideNav'] and reset their breadcrumb-only "*Page" variants back to visibleIn: [] (matching main). 2. data_views feature_controls/security (read-only privileges) 3. APM feature_controls/apm_security (all privileges) The Management plugin's appUpdater default of ['globalSearch', 'classicSideNav', 'solutionSideNav'] surfaced every Stack Management subapp (Data Views, Content Connectors, Alerts, ...) as a top-level entry in the classic hamburger nav. Main never did that because it omitted 'sideNav' by default. Dropped 'classicSideNav' from the default so the classic nav behavior matches main while keeping 'solutionSideNav' for solution nav trees that reference management deep links by id (e.g. 'management:dataViews'). Unit tests updated to match new expectations.
|
/ci |
…SideNav' This commit modifies the default visibility settings for management plugins to exclude 'classicSideNav', ensuring that management sub-apps do not appear as top-level entries in the classic hamburger navigation. The changes also update related unit tests to reflect the new expectations for deep link visibility, specifically for applications without an explicit 'visibleIn' setting. Additionally, the test cases for file upload, index data visualizer, and data drift have been adjusted to confirm their visibility in both 'globalSearch' and 'solutionSideNav', while breadcrumb-only page variants are now correctly set to be hidden everywhere.
|
/ci |
| id: tool.id, | ||
| title: tool.title as string, | ||
| path: `#/${tool.id}`, | ||
| visibleIn: ['globalSearch', 'solutionSideNav'], |
There was a problem hiding this comment.
Without this line these deep links default to ['globalSearch'] (deep-link default, not the app one). On main that still worked in solution navs because the resolver was silently ignoring visibleIn — this PR makes it actually respect it, so without 'solutionSideNav' here the Console / Grok Debugger / Painless Lab / Search Profiler entries would disappear from any solution nav that references them.
Skipping 'classicSideNav' on purpose: the classic hamburger already has the single "Dev Tools" app entry. Adding it here would surface all four tools as separate top-level hamburger items, which isn't what main shows.
| // top-level entries in the classic hamburger nav (the "Stack Management" app | ||
| // is the entry point there). 'solutionSideNav' is included so solution | ||
| // navigation trees can keep referencing them by id (e.g. 'management:dataViews'). | ||
| visibleIn: mgmtApp.visibleIn ?? ['globalSearch', 'solutionSideNav'], |
There was a problem hiding this comment.
Default excludes 'classicSideNav' so management sub-apps do not surface as top-level entries in the classic nav.
'solutionSideNav' is included so solution navigation trees can keep referencing them by id (e.g. 'management:dataViews').
| title: i18n.translate('xpack.fleet.deepLinks.agents.title', { defaultMessage: 'Agents' }), | ||
| path: FLEET_ROUTING_PATHS.agents, | ||
| visibleIn: !authz?.fleet.readAgents ? [] : ['globalSearch'], | ||
| visibleIn: !authz?.fleet.readAgents ? [] : ['globalSearch', 'solutionSideNav'], |
There was a problem hiding this comment.
Adding 'solutionSideNav' here keeps these Fleet sub-links visible in solution navs that reference them by id (e.g. Stack Management in the Search solution). On main they rendered there only because the resolver was bypassing visibleIn; without this they'd disappear.
| defaultMessage: 'Overview', | ||
| }), | ||
| path: `/${ML_PAGES.OVERVIEW}`, | ||
| visibleIn: ['globalSearch', 'solutionSideNav'], |
There was a problem hiding this comment.
Without this line these deep links default to ['globalSearch'] (deep-link default, not the app one). On main that still worked in solution navs because the resolver was silently ignoring visibleIn — this PR makes it actually respect it, so without 'solutionSideNav' here, all deep link entries would disappear from any solution nav that references them.
| defaultMessage: 'Rules', | ||
| }), | ||
| visibleIn: ['globalSearch'], | ||
| visibleIn: ['globalSearch', 'solutionSideNav'], |
There was a problem hiding this comment.
On main that still worked in solution nav implicitly because the resolver was silently ignoring visibleIn — this PR makes it actually respect it, so without 'solutionSideNav' here sub menu entries would disappear from any solution nav that references them.
| id: 'service-groups-list', | ||
| title: serviceGroupsTitle, | ||
| path: '/service-groups', | ||
| visibleIn: ['globalSearch', 'solutionSideNav'], |
There was a problem hiding this comment.
Without this line these deep links default to ['globalSearch'] (deep-link default, not the app one). On main that still worked in solution navs because the resolver was silently ignoring visibleIn — this PR makes it actually respect it, so without 'solutionSideNav' here, all deep link entries would disappear from any solution nav that references them.
| id: 'anomalies', | ||
| title: logsAnomaliesTitle, | ||
| path: '/anomalies', | ||
| visibleIn: ['globalSearch', 'solutionSideNav'], |
There was a problem hiding this comment.
Without this line these deep links default to ['globalSearch'] (deep-link default, not the app one). On main that still worked in solution navs because the resolver was silently ignoring visibleIn — this PR makes it actually respect it, so without 'solutionSideNav' here, all deep link entries would disappear from any solution nav that references them.
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
|
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
jennypavlova
left a comment
There was a problem hiding this comment.
obs-presentation code changes LGTM
cauemarcondes
left a comment
There was a problem hiding this comment.
OBS exploration changes LGTM
TattdCodeMonkey
left a comment
There was a problem hiding this comment.
search app changes LGTM
Kibana Exploratory Testing — execution reportRun Metadata
FindingsNo findings -- all journeys completed without issues. Additional detailsScreenshotsScreenshots are available in the workflow artifacts. Workflow run: View workflow run |
ana-davydova
left a comment
There was a problem hiding this comment.
Actionable-obs changes look good, tested. No regressions found.
ElenaStoeva
left a comment
There was a problem hiding this comment.
Changes in dev tools and management plugins lgtm
|
@elasticmachine merge upstream |
tonyghiani
left a comment
There was a problem hiding this comment.
LGTM, code review only
chrisbmar
left a comment
There was a problem hiding this comment.
workchat-eng change LGTM
⏳ Build in-progress
Failed CI Steps
Test Failures
History
|
Summary
Splits the
'sideNav'value inAppDeepLinkLocationsinto two explicit values:'classicSideNav'and'solutionSideNav'. The solution-nav resolver (getNodeStatus) now honorsvisibleInthe same way classic chrome and global search already do.Resolves [SharedUx] Project nav ignores "sideNav" entry in visibleIn setting issue.
Why
The solution-nav resolver was silently ignoring
visibleIn, so deep links appeared in solution navs regardless of what their owners declared. Fixing the bypass under the existing'sideNav'literal would flip the meaning of every existing declaration at once. Splitting the literal lets each call site declare its surfaces explicitly, so the migration is mechanical and reviewable per plugin.What changes for plugin owners
visibleInvalue'classicSideNav''solutionSideNav'['classicSideNav', 'solutionSideNav']'globalSearch'(unchanged)Default for registered apps:
['globalSearch', 'classicSideNav', 'solutionSideNav'](unchanged behavior).Default for deep links:
['globalSearch'](unchanged).Each plugin's existing
'sideNav'usages have been mapped 1:1 to preserve current behavior inmain:['classicSideNav', 'solutionSideNav']['solutionSideNav']What I tested
mainobltspacesecurityspaceJest, FTR, Scout: green in CI.
Follow-ups
'solutionSideNav'collapses back to a single'sideNav'once'classicSideNav'is removed (already deprecated in security). ATODOmarker is left on the type union for that future cleanup.