Repository navigation
Improve Quick Open matching, file locations and recent history - #25371
Conversation
There was a problem hiding this comment.
Important
The new separator matching has a trailing-separator false positive that contradicts this PR's own test contract, and the version-probe change silently downgrades query search for SSH relays that still report version 1.
Reviewed changes
- Shared multi-term matcher — query terms now AND-match across whitespace,
-/_/space are equivalent, and camelCase/acronym boundaries bridge a typed separator;QUICK_OPEN_SEARCH_VERSIONis now 3. - Location-aware opening — trailing
:line[:col]parsing that preserves literal colon filenames, plus authorized pasted absolute/Windows/UNC/WSL paths resolved on the owning host. - Recent-file history — per-owner/workspace localStorage history (100 files, 64 scopes) ranked ahead of ordinary results and validated by one bounded candidate scan on the host.
- Listing-option plumbing —
includeIgnored/followSymlinks/candidatePathsthreaded through local IPC, relay, SSH provider, and paired runtime, with a newfollowSymlinkedDirectoriessetting. - Selection revocation — generation guards cancel a pending open on dismissal/reopen, owner, root, or workspace change.
ℹ️ An SSH relay reporting quickOpenSearchVersion: 1 now loses relay-side query search
probeSshQuickOpenSearchCapability moved from === 1 to >= QUICK_OPEN_SEARCH_VERSION (now 3). Every relay deployed before this build advertises version 1, so until it is redeployed a query is no longer sent to the relay and is instead ranked client-side over a 32/33-path cap — matches outside those paths become unreachable. The paired-runtime surface added a complete-inventory fallback for the same version-1 case; the SSH surface did not, and no test covers it.
Technical details
# SSH version-1 peer query search downgraded
## Affected sites
- `src/main/providers/ssh-filesystem-provider-capabilities.ts:54-56` — predicate changed `=== 1` to `>= QUICK_OPEN_SEARCH_VERSION` (3).
- `src/main/ipc/filesystem/filesystem-search-handlers.ts:55-74` — a v1 relay now enters the legacy branch (`QUICK_OPEN_SSH_LEGACY_RESULT_LIMIT` = 33) and ranks client-side instead of forwarding `searchQuery`.
- `src/main/runtime/runtime-file-commands-search-remote-quick-open-file-paths.ts:25-45` — same, via `QUICK_OPEN_LEGACY_REMOTE_RESULT_LIMIT` = 32.
- `src/shared/quick-open-path-search.ts:8` — `QUICK_OPEN_SEARCH_VERSION = 3`.
## Required outcome
- Confirm whether a version-1 relay is expected to fall back to the 32/33-path cap for ordinary query search, or whether the intended behavior is to keep relay-side query search for peers that already advertised the query-aware path (bumping the version only for the new `candidatePaths`/`includeIgnored`/`followSymlinks` semantics).
- If the downgrade is intended, the 32/33 cap (vs. the complete-inventory fallback used on the paired-runtime path) should be covered by a test so the asymmetry is deliberate.
## Open questions for the human
- Are v1 relays a real support target, or do they always get redeployed on the next reconnect (narrowing the window to a single connection)?deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
ebbd972 to
57f935f
Compare
13a87ff to
c05f4e1
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Trailing-separator false positive removed — dropped the
ti === -1 && qi === query.length - 1disjunct fromfuzzyMatchIndexedFileand the corresponding fallback frommatchQuickOpenSeparatorAlternatives;abc-→abc.ts,bar-→foo-bar.ts, andproduct_→productdetail.tsnow assert no match, while real boundaries (abc-→abc-file.ts,product_→ProductDetail.ts,http-→HTTPServer.ts) still match. - SSH v1 relay query search restored —
probeSshQuickOpenSearchCapabilitynow accepts aminimumVersion; the search handler passes1for a plain query,2for listing options, and3forcandidatePaths, so a v1 relay keeps relay-side query search instead of silently falling back to the 32/33-path cap. Covered across versions 1–4. - Recent-candidate validation reworked — a shared, cancellable
EligibleRecentRequestreplaces the previous ref-of-result cache:load/dispose, auseQuickOpenRecentCacheeffect keyed onenabled+ eligibility, andwaitForQuickOpenRecentValidationgating the main listing so a pending validation precedes the latest host query. Results fail open on error and drop deleted candidates from the ordinary listing. - Fresh legacy snapshot for recents —
refreshSettledforces a newfiles.listwhen validating candidates, closing the reopened-palette gap where an inventory-cached deleted file could be offered. - Relay candidate dispatch —
candidatePathsvalidation and normalization moved into relayfs.listFiles(they were onsearch); new dispatch unit + integration tests cover late candidates beyond the capped inventory and ignore policy. - SFTP abort threading — abort signals now reach SFTP
readdirand the symlinkstat, with a regression proving a cancelled silentstatcloses its directory handle; deadreadDirViaSftpremoved. - Literal-suffix selection —
openQuickOpenFilekeeps a literalname:linefilename as selected when a partial query matches that suffix, so it does not jump to a line in a differently-named file.
I traced the recent-validation cache/pending/cancel lifecycle against workspace/owner/root/query changes and found no stale-apply, leaked scan, or candidate-membership defect.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
57f935f to
da285f1
Compare
c05f4e1 to
252a6df
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review at 57f935f, the branch was rebased onto the current base (a pure rebase — a6cbd0e ≡ ea1797b, 1297c7d ≡ 57f935f, 46857fd ≡ c86e405, all with identical diffs) and gained two commits:
- Localized Quick Open eligibility errors —
mergeQuickOpenRecentCandidatesnow builds its failure message withtranslate('quickOpen.recentValidationFailed', …)while still interpolating the backend error, with the newen.jsonentry added. - Localized the symlink settings search aliases — the four
followSymlinkedDirectorieskeywords are now produced bytranslateSearchKeyword, retaining the English aliases while indexing localized variants, plusen.jsonentries and an en/ko regression test. - Render-phase test callback removed — the Quick Open file-list test harness records each render into a
statesarray instead of invoking anonStatecallback during render (test-only).
Both prior quick-open-path-search.ts review threads are resolved, and nothing in the delta re-opens them. I traced the localized string to its only consumer (QuickOpen.tsx renders recentError verbatim; nothing parses it), so localizing the wrapper is safe.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
252a6df to
d36f171
Compare
da285f1 to
b17cb28
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review at da285f1193, the branch gained exactly one commit — b17cb28b ("Validate file inventory with bundled search and runtime preferences"), a test-only CI repair with no production behavior change:
- Real-process relay tests configured with the bundled search executable —
filesystem-quick-open-options.integration.test.tsnow setsconfigureRelayBundledRipgrep(bundledRipgrepCommand())inbeforeEachand resets it toundefinedinafterEach. - Runtime symlink-override regression — a new
it.eachinorca-runtime-files-mobile-explorer-reads.test.tsassertsoptions.followSymlinkswins overstore.getSettings().followSymlinkedDirectories, matching the production expressionoptions.followSymlinks ?? store.getSettings().followSymlinkedDirectories ?? false. - Test harness default settings —
orca-runtime-files-test-harness.tsadds agetSettingsmock returning{ followSymlinkedDirectories: false }. - Worktree-selector expectations updated — both
readDirassertions inworktree-selector-resolution.spec.tsnow include the empty options object{}threaded through by the listing-option change.
The delta is confined to test files and fixtures; the new regression can fail (it would fail if the override were ignored), and the production override precedence it pins was previously reviewed. No new concerns.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
d36f171 to
94ae722
Compare
119ed89 to
4836c82
Compare
fad7480 to
e639b82
Compare
4152e3b to
e44c29d
Compare
e639b82 to
a6d5c5d
Compare
e44c29d to
5e9c48c
Compare
5e9c48c to
d7ea3b9
Compare
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

ELI5
Part 3 of 3; stacks on #25370 after #25369.
Quick Open matches multi-part and separator queries, opens at the requested location, and ranks successfully opened recent files. Linked Explorer folders refresh when their in-project targets change.
What Changed
Uses one prepared/streamed matcher, preserves numeric-colon filenames, and records history after successful loading. Ordinary results appear before optional recent-file validation. Complete inventories avoid another scan; other validation waits 200 ms, cancels when the query changes and reuses settled eligibility.
Preserves existing punctuation queries and inherited ignore preferences on older hosts. Checks discovery version 2 separately from newer matching/candidate support, reports the actual delegated SSH capability, and avoids reusing an unfiltered inventory after discovery settings change.
Reuses bounded Explorer refresh and stale-cache handling for cached linked folders. Remote link expansion retains its historical behavior; Quick Open traversal has its own opt-in setting. Windows directory-link fixtures use junctions.
Why
Shared matching keeps host and client results consistent. Publishing search results first prevents history validation from delaying typing; host-owned cancellation prevents abandoned scans from queuing. Existing Explorer caches and refresh scheduling repair linked views without introducing another watcher or cache.
Linked Issue
Fixes #9895. Fixes #19853. Fixes #11366. Fixes #17356. Fixes #16423.
Visual Proof
The same
.env apiquery previously returned no files; it now finds the API environment file. The before image uses the original matcher in the same fixture. Exact caret, successful-load history and discovery settings were separately asserted.Before: no match
After: matching API file
Testing
Combined-stack verification passed 88 suites (888 tests, one existing skip), full typecheck and changed-code quality checks. Seven hidden macOS Electron checks passed: linked-folder mutation/retargeting, four Markdown navigation flows, large paired-runtime search and Quick Open rendered results. Two hidden Linux Electron checks passed on the final head. Native Windows corrected discovery and compatibility/history suites passed eight files / 78 tests.
Real production SSH handlers/clients passed nine current/older version pairings, including punctuation queries, inherited ignore compatibility and a complete 23,000-file inventory. Independent measurements used 100 recent candidates: search p95 was 50.9 ms baseline / 52.5 ms with validation; with 100 ms added transport delay, 150.9 / 149.9 ms. New searches superseded validation in all 27 samples. These measure provider latency, not renderer paint.
Two hidden native Windows Electron checks also passed on final head
e44c29d019e0: linked-folder refresh through retargeting and Quick Open rendered filename/path results.All tests/apps used
ORCA_BACKGROUND_LAUNCH=1. Fresh hosted CI on the rewritten heads is queued; merge remains gated on required checks.Review
A fresh independent reviewer rated the final combined source
e44c29d019e0low risk, with no unresolved concrete blocker after adversarial review, compatibility repairs, real SSH latency checks and native WSL cleanup evidence. Their focused stable-source rerun passed 20 suites / 155 tests. Counts above overlap and are not summed.The final production TypeScript is 58 net lines smaller than the previous candidate; additional tests preserve the behavior that the simplification must keep.
Agent skill upstream boundary
Notes
Older hosts retain their existing query behavior or a truthfully truncated compatibility page. New opt-in traversal and recent validation require their respective capabilities. The local dialog inventory remains a snapshot until reopening. Explorer links outside the project remain denied. The nine-pairing harness uses production handlers and framing with test routing; it is not every installed-runtime upgrade combination.
Checklist