Fix status badge logic in AI Catalog list item

What does this MR do and why?

Fix status badge logic in AI Catalog list item

The statusBadgeTitle and statusBadgeTooltip was incorrectly checking Boolean(this.item.configurationForGroup) && !this.item.configurationForGroup?.enabled which would show "Pending approval" only when configurationForGroup exists but is disabled. It should instead check !this.item.configurationForGroup?.enabled to show "Pending approval" when the configuration is null or disabled.

Consolidate redundant status badge computations into a single statusBadge computed property that returns an object with title, variant, and tooltipText, or null when the badge should not be displayed. This eliminates the separate showStatusBadge, statusBadgeTitle, statusBadgeVariant, and statusBadgeTooltipText properties, reducing duplication and making it harder to introduce inconsistencies.

Update corresponding specs to test the consolidated property.

Closes #587491 (closed)

Screenshots or screen recordings

Before After
Screenshot_2026-01-29_at_12.26.40 Screenshot_2026-01-29_at_12.25.54

How to set up and validate locally

  1. Prerequisite: You have a Duo workflow-enabled project.
  2. Enable the feature flags for the global_ai_catalog (https://gitlab.com/gitlab-org/ai-powered/workflow-catalog/team-tasks/-/wikis/Product-decisions#feature-flags-overview)
  3. Create a new agent (or flow) in your project namespace, e.g. http://gdk.test:3000/gitlab-duo/test/-/automate/agents
  4. After creating it, check it out on the 'Managed tab'. It shows a yellow badge saying 'Pending approval' and tooltip explains about group enablement
  5. Enable agent (or flow) in group. Badge is now green saying 'Ready to enable' and tooltip explains about project maintainership

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 Vanessa Otto

Merge request reports

Loading