Fix Remote SSH dashboard auto-launch from run command#17389
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17389Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17389" |
There was a problem hiding this comment.
Pull request overview
Fixes a regression in aspire run when executed under VS Code Remote SSH (and similar remote extension-host environments) where the Aspire Dashboard auto-launch could be blocked behind the live remote endpoint display loop.
Changes:
- Move extension-host notifications (dashboard URL payload + startup-complete signal) earlier in
RunCommandso the extension can launch the dashboard before the live endpoint display potentially waits on forwarding. - Add a test validating dashboard URLs are sent before the live endpoint display completes in a simulated Remote SSH extension-host scenario.
- Extend the test interaction service to allow intercepting
DisplayLiveAsyncso the test can intentionally block live rendering.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Cli/Commands/RunCommand.cs | Sends dashboard URL info + startup-complete notification to the extension before entering remote live endpoint display. |
| tests/Aspire.Cli.Tests/Commands/RunCommandTests.cs | Adds coverage ensuring dashboard URL notification occurs even if live endpoint display is blocked. |
| tests/Aspire.Cli.Tests/TestServices/TestExtensionInteractionService.cs | Adds a callback hook to control DisplayLiveAsync behavior for tests. |
mitchdenny
left a comment
There was a problem hiding this comment.
Fix makes sense: moving the extension notification before the blocking DisplayLiveAsync loop ensures NotifyAppHostStartupCompleted actually fires in remote environments (SSH, Codespaces, Remote Containers) so the dashboard auto-launches.
…h-dashboard-autolaunch
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
Fixes #17176
This fixes the Remote SSH dashboard auto-launch regression where launching an Aspire AppHost from VS Code could build and enter debug mode but never open the dashboard browser.
The CLI now sends dashboard URL information and the app-host startup-complete notification to the extension before entering the live remote endpoint display flow. In Remote SSH and similar remote environments, that live display can wait on endpoint forwarding, so notifying the extension first lets the extension launch the dashboard as soon as the dashboard URL is available.
User-facing usage
When using VS Code Remote SSH to launch an Aspire AppHost with dashboard auto-launch enabled, F5/start debugging can open the Aspire Dashboard again without waiting for the remote endpoint display loop to finish.
Validation:
Result: 1 test passed.
Checklist
<remarks />and<code />elements on your triple slash comments?