Skip to content

Feature: Add File Browser Functionality to Everything Search - #56

Merged
ant981228 merged 3 commits into
ant981228:mainfrom
cheepsahoy:fileBrowser
Sep 19, 2026
Merged

ant981228 merged 3 commits into
ant981228:mainfrom
cheepsahoy:fileBrowser

Conversation

@cheepsahoy

Copy link
Copy Markdown
Contributor

Browse Folders, Too!

Everything Search is so much help, but sometimes our knowledge of a file is geographic instead of nominal. What do you do if you know where something is, but not what its called? Before, you'd have to open an explorer/finder, or use card mirror's existing open-file interface. Now, with fileBrowser, you can navigate to that folder from within card mirror!

What it adds

This PR adds a new functionality to the Search Everything palette designed to navigate to and through folders.

"browse" mode is accessible by the search-prefix /

Upon typing, users are sent to the 'roots' of the folders configured for File Search.

Users can also jump to the 'current' folder that houses the file currently open by adding a c to the prefix, i.e.,: /c If that file isn't within a configured root folder for File Search, the user will be told that jumping to that file's folder is impossible.

Users can navigate the folder by clicking/tabbing, and can go "up" a folder by pressing esc.

Once at a folder, users can access / interface with the files in that folder as if the file was found through f search. All functionality is preserved. Browse folder uses f search's existing index system to find file paths. Folders are only shown if they have files inside that are accessible by f search

Adds fileBrowser functionality
fileBrowser option added to Search Everything palette
fileBrowser command accessible by / and /c
Use existing path-tracking, minimal extra load
Remove visual bug switching between palette modes
Change title to 'Browse folders'
add nested path ui [e.g., "...parent/child"]
Hover tooltip adds little value to /path/ and poses chromium issues.
Fix: remove tooltip
ant981228 added a commit that referenced this pull request Sep 19, 2026
… document's folder, text searches the folder you're in

Reworks PR #56's folder browser into the palette's prefix model. `/ ` and
`/c ` end at whitespace like the letter prefixes (a bare `/` shows a hint
instead of running the everything search over a slash); the query after
the prefix searches the current folder at any depth, with each file
carrying its sub-path, plus subfolders whose name matches. Enter/Tab step
into a folder and Esc steps up, both clearing the query; only a change of
prefix relocates, so wandering off after `/c ` and typing never snaps back.

The listing derivation moves to src/editor/file-browse.ts, a pure,
separator-agnostic helper shared by the index service and the palette
test fake (which now implements browse/locateCurrentFile, fixing the
typecheck). Folders exist only while an indexed file sits beneath them;
relative directories reject any .. or absolute segment. Tests cover the
helper, the service, and the palette flow; manual and changelogs updated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015vDCxeP1FvdfeEWXSKqzao
ant981228 added a commit that referenced this pull request Sep 19, 2026
…worked as a palette prefix)

Folder browsing in the Search Everything palette: `/ ` starts at the
file-search roots, `/c ` in the current document's folder, and text after
the prefix searches the folder you are in. Contributor's branch plus the
maintainer rework on top (pure shared listing helper, prefix-transition
model, tests, docs).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015vDCxeP1FvdfeEWXSKqzao
@ant981228
ant981228 merged commit 86a2e95 into ant981228:main Sep 19, 2026
@ant981228

Copy link
Copy Markdown
Owner

Merged — thank you for this! Browsing by place rather than by name was a real gap, and the approach of deriving folders from the existing index (so nothing new touches the filesystem) was exactly right.

Before merging I reworked it into the palette's prefix model so it behaves like the other prefixes. What changed, in case you're curious:

  • / and /c are now space-terminated prefixes like f and q . A bare / shows a hint until the space arrives.
  • Text after the prefix searches the folder you're in — every file beneath it at any depth (each row shows its subfolder), plus subfolders whose name matches — using the same matcher as f search.
  • Enter/Tab into a folder and Esc up both clear the query; only a change of prefix relocates (so after /c you can navigate away and keep typing without being pulled back; deleting the c returns to the roots).
  • The listing logic moved into src/editor/file-browse.ts, a pure separator-agnostic helper shared by the index service and the palette's test fake. That also fixed the typecheck failure (the fake didn't implement the two new client methods), which CI would have caught had it been able to run on a first-time contributor's branch.
  • Tests added for the helper, the service, and the palette flow; manual and changelogs updated.

It's on main now and will ship with the next release. Thanks again!

@cheepsahoy
cheepsahoy deleted the fileBrowser branch September 19, 2026 15:33
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.

2 participants