feat(desktop): add file search to the changes sidebar

Merged
AV
2mo ago
+368-6

Summary

Adds filename search to the workspace sidebar's Changes tab. A magnifier toggle in the toolbar opens a search row that filters the changed-file list by path:

  • Case-insensitive substring match; every whitespace-separated term must match (locales messages.po narrows like a quick-open), and renames also match their pre-rename path.
  • Works in both folders and tree views; section headers show matched counts and diffstats while the tab badge keeps the unfiltered total.
  • Escape or the toggle dismisses the row and restores the full list; a non-matching query shows a "No files match your search" empty state.
  • Filtering runs on a deferred value so the Pierre tree's path resets don't run on every keystroke.

The changes pane itself already has Cmd+F content search (#5648); this covers the file list, which had none. New strings go through Lingui with translations filled for all 16 locales.

Test plan

  • Unit tests for filterChangesetFiles (empty query, case-insensitivity, multi-term AND, rename old-path match, no cross-boundary term matches)
  • check:i18n, typecheck, biome
  • Verified end-to-end over CDP in the dev app: toggle focuses the input, "toolbar" narrows 42 files to 1, multi-term matches the 17 locale catalogs, folders↔tree switching keeps the filter, Escape restores the full list, and clicking a filtered row opens its diff — no console errors

https://claude.ai/code/session_013D2iwYgdkbA6wmJ9Lmc8Cn


Summary by cubic

Adds filename search to the Changes tab in the workspace sidebar, covering the changed-file list which previously had no search of its own.

New Features

  • A magnifier toggle in the toolbar opens a search row that filters the list by path; every whitespace-separated term must match, case-insensitively, and renames match their pre-rename path.
  • Works in folders and tree views; Escape or the toggle restores the full list, and no matches shows a "No files match your search" empty state — even when there are no changed files at all.
  • Filtering runs on a deferred value so the tree view's path resets don't run on every keystroke.
  • New strings are translated across all 16 locales.

Summary by CodeRabbit

  • New Features

    • Added file search to the Changes tab for quickly finding changed files by path.
    • Search supports multiple terms, case-insensitive matching, and renamed files.
    • Added clear, close, and Escape-key controls for the search field.
    • Added a clear empty state when no files match the search.
  • Localization

    • Added translated search interface text across supported languages.
  • Tests

    • Added coverage for search matching, whitespace handling, and renamed files.