Fix AI Catalog private-item alert copy to remove top-level group mention

What does this MR do and why?

Fixes the info alert shown in the AI Catalog consumer modal for private items. The copy claimed a private item could be enabled in "the project it was created in or its top-level group" — but group-level Enable does not exist, so users were sent hunting for a UI that isn't there.

Before:

This %{itemType} is private and can only be enabled in the project it was created in or its top-level group. Duplicate the agent to use the same configuration in other projects.

After:

This %{itemType} is private and can only be enabled in its managing project: %{projectName}. Duplicate the %{itemType} to use the same configuration in other projects.

Changes:

  • Removes the incorrect "top-level group" enablement path from the private alert
  • Names the managing project via the existing getAiCatalogItemOwningProjectName helper so users know exactly which project they need access to
  • Uses %{itemType} consistently in the duplicate nudge instead of hardcoding "agent"
  • Regenerates locale/gitlab.pot (translated .po files are left to the Crowdin sync)
  • Asserts the full alert text, including the project name, in the component spec

Note: restricted items (which genuinely can be enabled across a top-level group) have their own separate alert and are unaffected — this only touches the truly private case.

This supersedes the stale drafts !233282 (closed) and !233283 (closed), redone from scratch on current master.

Resolves #598099 (closed)

References

Screenshots or screen recordings

Before After
before_598099 after_598099

How to set up and validate locally

  1. Open the AI Catalog from Explore or a group page
  2. Click Enable on a private item you don't own
  3. The modal alert should name the item's managing project and no longer mention the top-level group

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 Jannik Lehmann

Merge request reports

Loading
Loading