Add a progress indicator with cancel for Switch Header/Source.#14386
Open
sean-mcmanus wants to merge 7 commits intomainfrom
Open
Add a progress indicator with cancel for Switch Header/Source.#14386sean-mcmanus wants to merge 7 commits intomainfrom
sean-mcmanus wants to merge 7 commits intomainfrom
Conversation
bobbrow
reviewed
Apr 16, 2026
There was a problem hiding this comment.
Pull request overview
Adds a cancellable progress notification for the Switch Header/Source command to address the lack of user feedback and inability to stop long-running switch operations (per issue #14379), with a 2-second delay before showing the notification (matching the Find All References UX).
Changes:
- Wrap
onSwitchHeaderSourceexecution in a delayedwithProgressnotification that supports user cancellation. - Plumb a
vscode.CancellationTokenthrough the extension → client request path for Switch Header/Source. - Translate LSP cancellation response codes into
vscode.CancellationErrorfor consistent cancellation handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Extension/src/LanguageServer/extension.ts | Adds delayed progress notification + cancel wiring around Switch Header/Source and handles cancellation cleanly. |
| Extension/src/LanguageServer/client.ts | Updates requestSwitchHeaderSource to accept a cancellation token and maps LSP cancellation to vscode.CancellationError. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 #14379 .
Implemented by Copilot (took a few iterations though).
Waits 2 seconds before showing the notification (same as Find All References).