Skip to content

Fix stuck "Find All References" progress notifications on overlapping requests#14397

Open
Subham-KRLX wants to merge 1 commit intomicrosoft:mainfrom
Subham-KRLX:fix/far-progress-stuck
Open

Fix stuck "Find All References" progress notifications on overlapping requests#14397
Subham-KRLX wants to merge 1 commit intomicrosoft:mainfrom
Subham-KRLX:fix/far-progress-stuck

Conversation

@Subham-KRLX
Copy link
Copy Markdown
Contributor

Closes #14381

Fixed a regression where overlapping "Find All References" requests (e.g., from DevTools) caused notifications to get stuck.
The fix ensures ReferencesManager properly clears previous timers and resolves active promises before starting a new request, preventing orphaned background loops. Verified via simulation.

@Subham-KRLX Subham-KRLX requested a review from a team as a code owner April 18, 2026 05:43
@github-project-automation github-project-automation Bot moved this to Pull Request in cpptools Apr 18, 2026
@Subham-KRLX Subham-KRLX force-pushed the fix/far-progress-stuck branch from a749947 to 74cec67 Compare April 18, 2026 05:44
Copy link
Copy Markdown
Member

@carsonRadtke carsonRadtke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to add some additional context here:

Note: Everything I'm describing is when pre-release (0.5.4) devtools is paired with pre-release (1.32.0) cpptools.

Requests from devtools should not be interacting with the UI; they should be using the new, silent, C_Cpp.FindAllReferences command meaning the UI progress dialog never appears. In an effort to make new devtools compatible with older cpptools, devtools asks vscode at extension startup if the C_Cpp.FindAllReferences command exists. If not, it falls back to vscode.executeReferenceProvider which issues UI progress updates.

What was happening is that vscode was loading devtools before cpptools. This was causing devtools to determine that C_Cpp.FindAllReferences didn't exist (because the command was not yet registered). This bug has since been fixed internally on the devtools side.


Now there is a question of what happens when devtools correctly identifies that it should fallback to vscode.executeReferenceProvider -- devtools may fire off several concurrent find all references requests which will trigger UI progress updates and some of them may get stuck. I believe this PR is still valuable in that scenario where new devtools are paired with old cpptools.

@bobbrow, WDYT - is this backwards compatibility something we wish to maintain?
@DavidARaygoza, is any additional context relevant on the internal devtools fix?
@sean-mcmanus, the parts of code that this diff touches are not familiar to me, but it seems OK. Requesting further review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

1.32.0 pre-release: Multiple Find All References progress UIs get stuck if DevTools invokes a FAR operation

2 participants