Skip to content

Search in Folder (Explorer context menu), release 1.4.0 - #4

Merged
jkyberneees merged 3 commits into
mainfrom
feat/search-in-folder
Oct 29, 2026
Merged

jkyberneees merged 3 commits into
mainfrom
feat/search-in-folder

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

What

Right-click a folder in the Explorer and pick Search in Folder…. The sidebar switches to Search, sets "files to include" to <folder>/** and focuses the query; a query that is already there runs again, limited to that folder.

Details

  • Literal scope. Glob metacharacters (\ * ? [ ] { } !), commas and whitespace in the folder name are backslash-escaped, so pages/[id], a,b and docs scope to exactly that folder. parseGlobs on the server now treats \, as a literal comma rather than a list separator; other escapes pass through to Bun.Glob.
  • Ignored folders. Choosing a .gitignore'd folder (dimmed in the Explorer) turns on "Include ignored files", otherwise it could never return results.
  • One request. The scope is set before the view is shown, so a stale view does not first fire an unscoped refresh.
  • Long paths. A scope over the server's 1,024-character glob cap shows a message instead of marking the query as invalid.
  • Kept as is: an existing exclude filter is left alone, and the query text is selected on open, the same as ⌘⇧F. Both are documented in DESIGN.md §13.
  • package.json is bumped to 1.4.0.

Tests

  • test/client.search.folder.test.ts: folderGlob matching (metacharacters, comma, siblings) and searchIn filling the include field and re-running the query.
  • test/client.search.folder.scope.test.ts: ignored toggle, single scoped request, \, round-trip through parseGlobs, edge whitespace, over-long scope.
  • Full suite passes locally (606 tests). Changed measured lines: 100 % covered. app.ts / tree.ts are not loaded by any test.

Known minors left open: the client duplicates the 1,024 limit, and the ignored toggle is only ever switched on.

🤖 Generated with Claude Code

jkyberneees and others added 3 commits October 29, 2026 09:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Search in Folder: right-click a folder in the Explorer to scope search in files to it. The scope is literal (glob metacharacters, commas and edge whitespace escaped; parseGlobs accepts `\,`), turns on ignored files for a .gitignore'd folder, and issues a single scoped request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jkyberneees
jkyberneees merged commit 04780fb into main Oct 29, 2026
4 of 5 checks passed
@jkyberneees
jkyberneees deleted the feat/search-in-folder branch October 29, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant