Clarify AI Catalog search scope
What does this MR do and why?
AI Catalog search only matches an item's name and description (Ai::Catalog::Item.search), but the cards also show project, visibility and item type. A search for one of those returns nothing, and nothing tells users why. This MR sets expectations in two places, as proposed in #598537 (closed):
- The search bar on the Flows and Agents list pages now shows the placeholder Search by name or description, set through
FilteredSearchBar'ssearchInputPlaceholderprop inai_catalog_list_wrapper.vue. - When a search returns no items, the empty state's description ends with the hint: Search matches names and descriptions only. Project, visibility and item type are not searched.
ResourceListsEmptyState switches to the shared EmptyResult component when there's a search term, which ignores description. So this MR adds an optional searchHint prop to EmptyResult (passed through by ResourceListsEmptyState) that's appended to the search description. It defaults to empty, so other empty states are unchanged. The empty state without a search term is unchanged.
References
Closes #598537 (closed)
Screenshots or screen recordings
These are renders of the real AiCatalogListWrapper component, mounted with Jest on master (before) and on this branch (after), and styled with GitLab UI's stylesheets in headless Chromium. They aren't screenshots of a running instance: the AI Catalog needs Ultimate with GitLab Duo, which I don't have locally. Fonts may differ slightly.
Search bar placeholder
| Before | After |
|---|---|
![]() |
![]() |
Search with no results (searching for a project path; after UX review the hint moved into the empty state, see the latest render in the review thread)
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Go to Explore > AI Catalog and open the Agents or Flows list.
- The search bar shows the placeholder Search by name or description.
- Search for a term that matches no name or description, such as a project path. Below "No results found", the scope hint appears.
- Clear the search. The usual empty state shows, with no hint.
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.



