Empty search item shouldn't be added to recent searches list

When searching without any filters, recent searches list shows empty search item on pages like issues, merge requests etc

Steps to reproduce

  1. Go to issues or merge requests page
  2. Search without any filter (click search icon or click on search input and click enter)
  3. Open the recent searches dropdown
  4. Notice the empty search item

Expected Behaviour

Empty search item probably shouldn't be added to recent searches list.

Edited Feb 18, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading