Fix active nav state for AI features

What does this MR do and why?

Sub-items in the AI / Automate super sidebar section (Agents, Flows, Triggers, Sessions, MCP servers, Onboarding) never highlighted as active when their page was open.

References

N/A

Screenshots or screen recordings

Before After
CleanShot_2026-08-31_at_16.25.42_2 CleanShot_2026-09-01_at_08.09.31_2x
CleanShot_2026-08-31_at_16.25.52_2 CleanShot_2026-09-01_at_08.09.44_2x

How to set up and validate locally

  1. Ensure you have a group/project with GitLab Duo / AI features enabled so the AI (or Automate) section appears in the super sidebar.
  2. Visit each AI page and confirm the corresponding sidebar item is highlighted as active:
    • /-/automate/agents
    • /-/automate/flows
    • /-/automate/triggers
    • /-/automate/agent-sessions
    • /-/automate/mcp-servers
    • /-/automate/onboarding
  3. Repeat the checks at the group level (/groups/<group>/-/automate/...) for Agents, Flows, and MCP servers.
  4. Validate with the :hide_unpinned_sidebar_items feature flag disabled (default):
    Feature.disable(:hide_unpinned_sidebar_items)
    Confirm each page above highlights the correct sidebar item.
  5. Validate with the :hide_unpinned_sidebar_items feature flag enabled:
    Feature.enable(:hide_unpinned_sidebar_items)
    Confirm the active state still resolves correctly for each page (item highlighting and, where applicable, the section/flyout showing as active).

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Austin Regnery

Merge request reports

Loading
Loading