Fix VS Code informational message not disappearing after aspire add #12264
+42
−0
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.
Problem
When running
aspire add
command in VS Code, the informational success message would remain visible indefinitely after the operation completed, rather than automatically dismissing like other messages.Root Cause
The issue occurred due to a timing mismatch between progress notification clearing and success message display:
AddCommand
usesShowStatusAsync
to display a progress notification during package installationShowStatusAsync
sendsnull
to clear the progress notificationProgressNotifier
has a 250ms debounce delay before actually clearing (to handle rapid status updates)AddCommand
immediately callsDisplaySuccess
to show the success messageDisplaySuccess
displayed a new information modal but didn't clear the pending progress notificationSolution
Updated
displaySuccess
,displayMessage
, anddisplayPlainText
methods in the extension'sInteractionService
to callclearProgressNotification()
after displaying their messages. This ensures any pending progress notifications are immediately cleared, matching the existing behavior ofdisplayError
.Changes
extension/src/server/interactionService.ts
clearProgressNotification()
call todisplaySuccess()
clearProgressNotification()
call todisplayMessage()
clearProgressNotification()
call todisplayPlainText()
extension/src/test/rpc/interactionServiceTests.test.ts
Testing
displayError
implementationFixes: Issue where VS Code informational message does not go away after aspire add
Original prompt
Fixes #12224
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.