Repository navigation
Clear buffered results before a new Quick Search - #347031
Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits intoNov 13, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change preventing stale Quick Search results from appearing after input changes.
No open issues 🎉
What changed in this PR
Fixes #195165 by preventing buffered results from a previous Quick Search query from appearing after the input changes.
Changes:
- Clears the result queue after cancelling the previous search and before starting the next.
- Adds model regressions for new queries with and without synchronous matches.
- Adds a Quick Search provider regression covering picker input changes.
| File | Description |
|---|---|
src/vs/workbench/contrib/search/test/browser/textSearchQuickAccess.test.ts |
Tests that changing picker input excludes buffered matches from the previous query. |
src/vs/workbench/contrib/search/test/browser/searchModel.test.ts |
Tests queue clearing with and without synchronous results. |
src/vs/workbench/contrib/search/browser/searchTreeModel/searchModel.ts |
Clears buffered results before initializing a new search. |
Review effort: Balanced
Collaborator
|
Sameer (@sameerihs) Thank you! |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
approved these changes
Nov 13, 2026
Nick Trogh (ntrogh)
approved these changes
Nov 13, 2026
Alexandru Dima (alexdima)
approved these changes
Nov 13, 2026
Dmitriy Vasyura (dmitrivMS)
merged commit Nov 13, 2026
394efff
into
microsoft:main
52 of 53 checks passed
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.

Fixes #195165
Quick Search starts a new search while the previous one may still have buffered progress results. Those old results can be flushed into the new query, leaving entries such as
old.txt: oldafter the input changes tonew.Clear the previous result queue after cancelling the old search and before starting the new one. Regressions cover new queries with and without synchronous matches and the actual Quick Search provider through
provide()and the picker's input-change event. They use no post-cancellation provider callbacks.All three regressions fail on unchanged main and exact 1.145.2 model source, then pass after the fix. The 52 neighbouring checks, targeted ESLint and client typecheck pass. Stable validation is source-based; the ordinary Search view's serial query path is not claimed as another reproduced trigger.