Skip to content

Fix Remote SSH dashboard auto-launch from run command#17389

Merged
mitchdenny merged 3 commits into
microsoft:mainfrom
adamint:dev/adamint/remote-ssh-dashboard-autolaunch
May 25, 2026
Merged

Fix Remote SSH dashboard auto-launch from run command#17389
mitchdenny merged 3 commits into
microsoft:mainfrom
adamint:dev/adamint/remote-ssh-dashboard-autolaunch

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented May 22, 2026

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:

dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-method "*.RunCommand_InRemoteExtensionHost_DisplaysDashboardUrlsBeforeLiveEndpointDisplayCompletes" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Result: 1 test passed.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

@adamint adamint requested a review from mitchdenny as a code owner May 22, 2026 18:37
Copilot AI review requested due to automatic review settings May 22, 2026 18:37
@adamint adamint requested review from JamesNK and davidfowl as code owners May 22, 2026 18:37
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17389

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17389"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RunCommand so 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 DisplayLiveAsync so 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.

Copy link
Copy Markdown
Member

@mitchdenny mitchdenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mitchdenny mitchdenny enabled auto-merge (squash) May 25, 2026 05:32
mitchdenny and others added 2 commits May 25, 2026 17:04
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mitchdenny mitchdenny merged commit 581a169 into microsoft:main May 25, 2026
311 checks passed
@github-actions github-actions Bot added this to the 13.4 milestone May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

after upgrading to 13.3, browser does not launch [SSH Remote]

4 participants