Improve VS Code AppHost build failure notifications - #19755
Improve VS Code AppHost build failure notifications#19755Ella Hathaway (ellahathaway) wants to merge 8 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4574890-67c5-476a-abdd-cd5ac59e9418
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19755Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19755" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Consolidates CLI build failures into one VS Code notification with an Open CLI Log action while preserving diagnostics and backward compatibility.
Changes:
- Adds capability-gated CLI/extension RPC support for associated log files.
- Opens CLI logs in a non-preview editor.
- Adds unit, compatibility, command, and extension E2E coverage.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/Aspire.Cli.Tests/TestServices/TestInteractionService.cs |
Records combined errors and log paths. |
tests/Aspire.Cli.Tests/TestServices/TestExtensionInteractionService.cs |
Implements the new test interface method. |
tests/Aspire.Cli.Tests/TestServices/TestExtensionBackchannel.cs |
Supports combined-error RPC testing. |
tests/Aspire.Cli.Tests/Templating/DotNetTemplateFactoryTests.cs |
Updates the interaction test stub. |
tests/Aspire.Cli.Tests/Projects/ExtensionGuestLauncherTests.cs |
Updates the interaction test stub. |
tests/Aspire.Cli.Tests/Interaction/ExtensionInteractionServiceTests.cs |
Tests capability and fallback behavior. |
tests/Aspire.Cli.Tests/Commands/UpdateCommandTests.cs |
Forwards the new interaction method. |
tests/Aspire.Cli.Tests/Commands/RunCommandTests.cs |
Verifies build failures include the CLI log. |
tests/Aspire.Cli.Tests/Commands/PublishCommandPromptingIntegrationTests.cs |
Updates the interaction test implementation. |
tests/Aspire.Cli.Tests/Commands/BaseCommandTests.cs |
Verifies combined unexpected-error reporting. |
src/Aspire.Cli/Utils/ExtensionHelper.cs |
Defines the versioned capability. |
src/Aspire.Cli/Interaction/IInteractionService.cs |
Adds combined error/log reporting. |
src/Aspire.Cli/Interaction/ExtensionInteractionService.cs |
Negotiates RPC behavior and preserves console output. |
src/Aspire.Cli/Interaction/ConsoleInteractionService.cs |
Retains the console two-line presentation. |
src/Aspire.Cli/Commands/BaseCommand.cs |
Routes eligible failures through combined reporting. |
src/Aspire.Cli/Backchannel/ExtensionBackchannel.cs |
Sends the optional log path over RPC. |
extension/src/test/rpc/interactionServiceTests.test.ts |
Tests the notification action. |
extension/src/test-e2e/debugDashboard.e2e.test.ts |
Covers the complete failure UX. |
extension/src/server/interactionService.ts |
Displays the action and opens the log. |
extension/src/capabilities.ts |
Advertises extension support. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4574890-67c5-476a-abdd-cd5ac59e9418
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4574890-67c5-476a-abdd-cd5ac59e9418
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4574890-67c5-476a-abdd-cd5ac59e9418
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4574890-67c5-476a-abdd-cd5ac59e9418
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Replace extension-side log-message parsing with capability-gated CLI message actions for opening files or running registered commands. Preserve legacy notifications for older extensions and keep diagnostic paths in console output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4574890-67c5-476a-abdd-cd5ac59e9418
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4574890-67c5-476a-abdd-cd5ac59e9418
Tests selector2 / 99 PR test projects · 4 PR jobs · 1 advisory-only target, from 32 changed files. Selected PR test projects (2 / 99)
Selected PR jobs (4)
Advisory workflow impact (1)
How these were chosen — grouped by what changed📦 affected project 🔧 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
Description
AppHost build failures in VS Code currently produce separate error and log-path notifications, and the log path must be copied manually. This change consolidates that experience into one error notification with Open CLI Log and, when available, Open AppHost Log actions while keeping the full diagnostics and log locations in the Debug Console.
The CLI/extension backchannel now supports reusable structured message actions. Each action has a display name and either a command to execute or a file path to open. VS Code hides actions whose command is not registered or whose file is not an existing absolute path, and action selection remains asynchronous so the CLI does not wait for the notification.
The behavior is gated by the extension-advertised
message-actions.v1capability. A newer CLI paired with an older extension retains the existing separate error and log notifications; an older CLI paired with the newer extension continues using the existing pathless message RPCs. This replaces the previous localized-message parsing approach and incorporates the diagnostic-log scenarios from #19679.User-facing usage
When an AppHost fails to build during a run or debug launch, VS Code shows one error notification. Selecting a log action opens that file directly in a non-preview editor.
Screenshots / Recordings
Before:
https://github.com/user-attachments/assets/5d2f732e-a11d-4c77-abea-005f3afc43d2
After:
https://github.com/user-attachments/assets/d53a6b0f-fe4f-4f77-bde9-fda29081aad3
Validation
extension\build.ps1after merging currentmain.Aspire.Cli.Testscovering combined actions, legacy fallback, capability failures, console output, and the AOT JSON wire shape.Fixes #19748
Fixes #19511
Checklist
<remarks />and<code />elements on your triple slash comments?