Show full namespace path in agent platform breadcrumbs

What does this MR do and why?

Shows the full namespace path in the agent platform breadcrumbs, so a foundational agent in a subgroup-nested project says Group / Subgroup / Project / AI Catalog / Agents / ... instead of dropping the last namespace crumb.

The breadcrumb injection helper passes the server breadcrumbs minus their last item, since Vue app replaces that crumb anyway. The DAP pages skip the current-level crumb on the server, so their last crumb is the namespace itself and slicing it was dropping the project name at the project level and the whole prefix at the group level.

I added to the shared breadcrumbs component an optional namespace param. The Explore catalog doesn't use this, so its behaviour is the same as it was.

All of this is behind the :ai_catalog_synthetic_foundational_items feature flag. This MR builds on !244243 (merged).

Level Before After
Project GitLab Duo / AI Catalog / Agents / ... GitLab Duo / Test / AI Catalog / Agents / ...
Group AI Catalog / Agents / ... GitLab Duo / AI Catalog / Agents / ...
Subgroup project GitLab Duo / AI Catalog / Agents / ... GitLab Duo / A Sub Group / Test sub project / AI Catalog / Agents / ...

Screenshots

Level Screenshot
Project breadcrumb_project
Group breadcrumb_group
Explore (unchanged) breadcrumb_explore

How to set up and validate locally

  1. Enable the ai_catalog_synthetic_foundational_items feature flag
  2. Visit a foundational agent at the project and group level, for example /gitlab-duo/test/-/automate/foundational_agents/support_assistant/
  3. Confirm the breadcrumb shows the full namespace path
  4. Visit /explore/ai-catalog/agents and confirm the breadcrumb still says Explore / AI Catalog / Agents with a single AI Catalog crumb

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Related to #599494 (closed)

Edited by Angus Ryer

Merge request reports

Loading
Loading