Enable project-wide text search in the Web IDE
What does this MR do and why?
Search in the Web IDE (Ctrl+Shift+F) only finds matches in files that are already open. This MR turns on project-wide search, which was added to the Web IDE in gitlab-web-ide!639 (merged).
It does three things:
-
Updates
@gitlab/web-ideto0.0.1-dev-20261105125040. Besides the search, this package has changes that apply to everyone, even with the feature flag off:- The VS Code fork update from gitlab-web-ide-vscode-fork!139 (merged) removes the "Only results from opened files are shown" message, brings back the Toggle Search Details button (files to include and exclude), and makes files to exclude filter the results.
- The Web IDE keeps at most 100 recently opened workspaces and removes older ones on start (gitlab-web-ide@408a8b53).
- The bundled GitLab for VS Code extension goes from 6.63.0 to 6.65.1.
The other changes since
0.0.1-dev-20260106142046are dependency updates and test or docs changes. -
Adds the
web_ide_project_wide_text_searchfeature flag (beta, enabled by default) and passes it to the Web IDE asprojectWideTextSearch, so the search can be turned off on GitLab.com or any instance without a release. -
Updates the Web IDE docs.
How the search works: files that weren't changed are searched on the server with the project search API and search_type=basic. That's a live git grep through Gitaly on the commit the Web IDE opened, so it doesn't need advanced search or Zoekt and works on all tiers. Changes made in the Web IDE that aren't committed are searched in the browser. A search only runs when you press Enter, and makes at most 2 API requests.
References
- gitlab-web-ide#409
- &9466
- gitlab-web-ide!639 (merged)
- gitlab-web-ide-vscode-fork!139 (merged)
- Rollout issue: #638883
Screenshots or screen recordings
| Before | After |
|---|---|
| Search only finds matches in files that are open, and the Search view says "Only results from opened files are shown. Full project search to be enabled at a later date." | ![]() |
The after screenshot is from the Web IDE example app with this package. No files are open, and the search finds the same 14 matches as git grep.
How to set up and validate locally
- Check out this branch in GDK and run
yarn install. - Open a project in the Web IDE, for example
gitlab-org/gitlab-testonmaster. - Without opening a file, press Ctrl+Shift+F (Shift+Cmd+F on macOS), search for a word you know is in the repository and press Enter. Matches from files that aren't open show up.
- Edit a file without committing and search for the text you typed. The new match shows, and the old server match for that file doesn't.
- Select Toggle Search Details (...), add a folder to files to exclude and search again. Matches from that folder are gone.
- In the Rails console run
Feature.disable(:web_ide_project_wide_text_search)and reload the Web IDE. Search only finds matches in open files again.
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.
