Skip to content

Conversation

@adamint
Copy link
Member

@adamint adamint commented Nov 11, 2025

Description

We already have access to the proper dashboard login URL later in the apphost startup process, when the CLI tells the extension that it has dashboard URLs available.

Instead of setting a serverReadyAction for the apphost, we can use VS Code's openExternal API to open the dashboard URL we get from the CLI (which already includes the token) in the user's browser.

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
  • Does the change require an update in our Aspire docs?

@adamint adamint self-assigned this Nov 11, 2025
Copilot AI review requested due to automatic review settings November 11, 2025 20:00
@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

🚀 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12907

Or

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

Copilot finished reviewing on behalf of adamint November 11, 2025 20:01
Copy link
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

This PR refactors how the Aspire dashboard is opened when debugging an apphost. Instead of using VS Code's serverReadyAction mechanism (which would open the dashboard URL without the login token), the extension now manually opens the dashboard URL (which includes the login token) using VS Code's openExternal API after receiving the dashboard URLs from the CLI.

Key Changes:

  • Removed serverReadyAction setup for apphost debugging sessions
  • Added manual browser opening logic that uses the dashboard URL with login token
  • Properly handles Codespaces URL preference when available

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
extension/src/debugger/languages/dotnet.ts Modified to skip serverReadyAction setup for apphost projects by inverting the conditional logic
extension/src/server/interactionService.ts Added logic to automatically open the dashboard URL with login token when auto-launch is enabled

@adamint
Copy link
Member Author

adamint commented Nov 11, 2025

to test: create new starter project, run using aspire debugger

@adamint adamint merged commit 6314f65 into dotnet:main Nov 11, 2025
296 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 13.1 milestone Nov 11, 2025
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.

2 participants