Match the Repositories nav item on its controller

What does this MR do and why?

The organization sidebar has an "Artifact registry" menu. This menu has a "Repositories" child item.

Before this change, the item used active_routes: { page: repositories_path }. This setting matches only the exact repositories index URL.

The repositories route is a Vue catch-all route: artifact_registry/:slug/repositories(/*vueroute), defined in ee/config/routes/organizations.rb. It is served by the artifact_registry_repositories controller. Nested Vue routes have a different full path, so the old setting did not mark the nav item as active on those pages.

This MR changes the setting to active_routes: { controller: 'organizations/artifact_registry_repositories' }. The nav item now stays highlighted on every page under this route, including nested Vue routes.

The changed file is ee/lib/sidebars/organizations/menus/artifact_registry_menu.rb. The spec ee/spec/lib/sidebars/organizations/menus/artifact_registry_menu_spec.rb now checks that active_routes equals { controller: 'organizations/artifact_registry_repositories' }.

References

No related issue.

Screenshots or screen recordings

Before After

Screenshots are not included. This change affects only which sidebar item stays highlighted. It causes no visible layout change.

How to set up and validate locally

  1. Enable the artifact_registry_ui feature flag.
  2. Configure Artifact Registry so an organization has a resolved registry slug.
  3. Open /o/<organization>/-/artifact_registry/<slug>/repositories.
  4. Navigate into a repository. This is a nested Vue route.
  5. Confirm the "Repositories" sidebar item stays highlighted.

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.

🤖 Generated with Claude Code

Merge request reports

Loading
Loading