Conversation
Rizmi
marked this pull request as draft
September 16, 2026 04:45
Allow users to configure custom search exclusions in Settings under "SEARCH & FILTERING". Exclusions support both folder names (e.g. `.venv`, matching any folder with that name across the directory tree) and specific directory paths (e.g. `~/Downloads` or `/var/log`, matching only that directory and its subtrees). - Add `search_exclusions` preference to ThemeManager and Preferences. - Introduce `SearchExclusions` to parse and evaluate folder name vs directory rules. - Update `index_trees_with_exclusions`, recursive scheduler, and directory indexing to prune excluded directories from search results. - Implement "Search exclusions" modal dialog matching the "Copy to" layout and styling 1:1, allowing users to list, add (via text entry or native directory picker), and remove exclusions. - Wire into settings navigation and search. - Add unit and integration tests for exclusions and dialog behavior. Closes lgse#1062
Rizmi
force-pushed
the
feat/1062-search-exclusions
branch
from
September 16, 2026 04:53
736c66a to
663bd45
Compare
Rizmi
marked this pull request as ready for review
September 16, 2026 06:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow users to configure custom search exclusions in Settings under "SEARCH & FILTERING". Exclusions support both folder names (e.g.
.venv, matching any folder with that name across the directory tree) and specific directory paths (e.g.~/Downloadsor/var/log, matching only that directory and its subtrees).• Adds
search_exclusionspreference toPreferencesandThemeManager(Vec<String>, serialized only when non-empty).• Implements
SearchExclusionshelper to classify entries into folder names vs directory paths (resolving~to user home).• Updates search tree indexing (
index_trees_with_exclusions, recursive walker scheduler, and single-directory walker) to skip excluded folder names anywhere in the hierarchy and specific directory paths.• Provides a dedicated "Global search exclusions" modal dialog matching the layout, tokens, and style 1:1 with the "Copy to" dialog (
modal_layout, entry with inline error validation, "Browse…" button viagtk::FileDialog, type badges for folder name vs directory, and delete action for each row).• Wires the "Manage" row under "SEARCH & FILTERING" in General settings and indexes the action in settings search (
Target { id: "search-exclusions", title: "Global search exclusions", ... }).• Adds unit and integration tests covering configuration persistence, exclusion classification, directory pruning in search results, and dialog validation.
Note
In-folder filtering (search in current pane) and destination selection dialogs intentionally operate within their explicit browsing context and bypass global search exclusions (documented in
search.rs).Visual evidence
screenrecording-2026-09-16_11-07-05.mp4
How to test
Ctrl+,) and navigate to General -> SEARCH & FILTERING.• Type
.venvornode_modulesand press Enter (or click "Add").• Verify it appears in the list with a "Folder name" badge.
• Type
~/Documents/Privateor use the "Browse…" button to select a directory.• Verify it appears in the list with a "Directory" badge.
• Attempting to add an empty name, root/home (
/or~), ambiguous relative paths without leading/or~/, or duplicate entries shows an inline error message and highlights the field withform-field-error.• In global search (
Ctrl+K), search for a file known to be inside an excluded folder or directory.• Verify matching items inside excluded paths are not returned in results.
• Click the "Remove" button next to an entry in the exclusions modal.
• Verify the entry is removed immediately, persisted, and subsequent searches include that path again.
Related issue
Closes #1062