-
Notifications
You must be signed in to change notification settings - Fork 708
Change VS Code confirmation message to quick pick in interaction service #12263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: adamint <[email protected]>
Co-authored-by: adamint <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12263Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12263" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the modal confirmation dialog with a quick pick interface in the VS Code extension's interaction service, providing a less intrusive user experience while maintaining backward compatibility.
Key changes:
- Modified
confirm()method to useshowQuickPickinstead ofshowInformationMessagewith modal - Added comprehensive test coverage for all confirmation scenarios (Yes/No/Cancel)
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| extension/src/server/interactionService.ts | Replaced modal dialog with quick pick for confirmation prompts |
| extension/src/test/rpc/interactionServiceTests.test.ts | Added three test cases covering Yes/No/Cancel scenarios and validation of quick pick options |
Files not reviewed (1)
- extension/package-lock.json: Language not supported
|
|
||
| // Verify options passed to showQuickPick | ||
| const callArgs = showQuickPickStub.getCall(0).args; | ||
| assert.deepStrictEqual(callArgs[0], ['Yes', 'No'], 'should show Yes and No choices'); | ||
| assert.strictEqual(callArgs[1]?.canPickMany, false, 'canPickMany should be false'); | ||
| assert.strictEqual(callArgs[1]?.ignoreFocusOut, true, 'ignoreFocusOut should be true'); | ||
|
|
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the blank line 88 before the comment. According to the .editorconfig formatting guidelines, unnecessary blank lines should be avoided within test method bodies.
| // Verify options passed to showQuickPick | |
| const callArgs = showQuickPickStub.getCall(0).args; | |
| assert.deepStrictEqual(callArgs[0], ['Yes', 'No'], 'should show Yes and No choices'); | |
| assert.strictEqual(callArgs[1]?.canPickMany, false, 'canPickMany should be false'); | |
| assert.strictEqual(callArgs[1]?.ignoreFocusOut, true, 'ignoreFocusOut should be true'); | |
| // Verify options passed to showQuickPick | |
| const callArgs = showQuickPickStub.getCall(0).args; | |
| assert.deepStrictEqual(callArgs[0], ['Yes', 'No'], 'should show Yes and No choices'); | |
| assert.strictEqual(callArgs[1]?.canPickMany, false, 'canPickMany should be false'); | |
| assert.strictEqual(callArgs[1]?.ignoreFocusOut, true, 'ignoreFocusOut should be true'); |
| assert.deepStrictEqual(callArgs[0], ['Yes', 'No'], 'should show Yes and No choices'); | ||
| assert.strictEqual(callArgs[1]?.canPickMany, false, 'canPickMany should be false'); | ||
| assert.strictEqual(callArgs[1]?.ignoreFocusOut, true, 'ignoreFocusOut should be true'); | ||
|
|
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the blank line 94 before showQuickPickStub.restore(). The extra whitespace is inconsistent with the other test methods in this file (see lines 103-104 and 112-113 where restore() follows immediately after the assertion).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally. this is good
Summary
This PR replaces the blocking modal confirmation dialog with a non-blocking quick pick interface in the Aspire VS Code extension's interaction service. This provides a more consistent and less intrusive user experience.
Changes
Core Implementation
Modified the
confirm()method inextension/src/server/interactionService.tsto usevscode.window.showQuickPickinstead ofvscode.window.showInformationMessagewith a modal dialog.Before:
After:
Test Coverage
Added comprehensive test coverage in
extension/src/test/rpc/interactionServiceTests.test.ts:truefalsenullshowQuickPickBenefits
promptForSelection()andpromptForSelections()methodsignoreFocusOut: true)true/false/null)Visual Comparison
All selection methods in the
InteractionServicenow use a unified quick pick pattern, creating a predictable and consistent user experience across all prompts.Original prompt
Fixes #12251
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.