[go: up one dir, main page]

Implement global search in the file tree browser

What does this MR do and why?

This replaces the local filter functionality in the repository file tree browser with an integration to GitLab's global search. Instead of filtering files within the tree view, users can now trigger the global search modal directly from the file tree browser.

References

Screenshots or screen recordings

2025-11-20_12.02.20

How to set up and validate locally

  1. Navigate to a repository's file tree browser:
    • Go to any project on your local GitLab instance
    • Visit the repository files page (e.g., https://gitlab.com/your-project/-/tree/main)
  2. Test the search button:
    • Click the "Search files (*.vue, *.rb...)" button in the file tree browser
    • Verify that the global search modal opens
    • Confirm that the search input is pre-populated with ~ character
  3. Test the keyboard shortcut:
    • Press the f key while viewing the repository
    • Verify that the global search modal opens (instead of focusing a filter input)
    • Confirm the search input contains ~
  4. Test the toggle shortcut:
    • Press Shift+f to toggle the file tree browser visibility
    • Verify this still works as expected
  5. Verify the search functionality:
    • In the opened global search modal, type a file name
    • Confirm that file search works correctly across the repository

Note: The ~ character in the search input triggers GitLab's file search mode in the global search, allowing users to search for files by name or pattern across the entire repository.

Related to #543753 (closed)

Edited by Jacques Erasmus

Merge request reports

Loading