From aaece3483bb12c5ba3d823fe2eeed933b7a2b956 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Sun, 29 Mar 2026 19:09:33 -0700 Subject: [PATCH] fix: quick-open file search returns no results (#213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ripgrep command used --hidden with positive re-inclusion globs ('.github', '.github/**') to keep .github files visible. However, positive globs in ripgrep act as a whitelist — once present, only files matching those positive patterns are returned, which excluded every non-dotfile (including CLAUDE.md and all source files). Drop --hidden entirely so rg uses its default behavior: skip hidden dirs, respect .gitignore, and return all normal files. --- src/main/ipc/filesystem-list-files.ts | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/main/ipc/filesystem-list-files.ts b/src/main/ipc/filesystem-list-files.ts index 50affe29690..4aad27a793e 100644 --- a/src/main/ipc/filesystem-list-files.ts +++ b/src/main/ipc/filesystem-list-files.ts @@ -39,27 +39,12 @@ export async function listQuickOpenFiles(rootPath: string, store: Store): Promis 'rg', [ '--files', - '--hidden', - '--glob', - '!.git', - '--glob', - '!.git/**', + // Why: --hidden + positive re-inclusion globs (e.g. '.github') made + // ripgrep treat them as a whitelist, filtering out every non-dotfile. + // Without --hidden, rg skips dot-dirs by default and respects + // .gitignore, so normal files like CLAUDE.md are returned correctly. '--glob', '!**/node_modules', - '--glob', - '!**/node_modules/**', - '--glob', - '!.*', - '--glob', - '!.*/*', - '--glob', - '!**/.*', - '--glob', - '!**/.*/**', - '--glob', - '.github', - '--glob', - '.github/**', authorizedRootPath ], {