Make dashboard launch opt-in by default#18361
Conversation
Stop opening the Aspire Dashboard automatically by default from the VS Code extension while preserving notification, browser, and debug-browser launch behaviors. Add a launch.json dashboardBrowser override and prompt for it from the Configure launch.json command. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18361Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18361" |
There was a problem hiding this comment.
Pull request overview
This PR makes the Aspire VS Code extension stop opening the Aspire Dashboard automatically by default (resolving #17923). Starting an AppHost still prints the dashboard URL and keeps it available from the Aspire panel, but the dashboard launch now defaults to none. Users opt back in via the global aspire.dashboardBrowser setting (now extended with none/notification) or a new per-launch dashboardBrowser debug-configuration property, and the Configure launch.json command prompts for the behavior. Existing users who explicitly set the legacy aspire.enableAspireDashboardAutoLaunch (launch/notification/off) keep their effective behavior, and a one-time notification informs unconfigured users of the default change.
Changes:
- Centralizes dashboard-launch resolution in
InteractionService.getDashboardLaunchBehavior, layering per-launch debug config → explicit global setting → legacy setting → newnonedefault, plus a one-time "default changed" notification gated onglobalState. - Adds a per-launch
dashboardBrowserdebug property and a quick-pick prompt in Configure launch.json, with new localized strings acrossstrings.ts,package.nls.json,package.json, and the regenerated.xlf. - Updates and adds tests (
interactionServiceTests, newconfigureLaunchJson.test.ts) and a CHANGELOG entry.
Show a summary per file
| File | Description |
|---|---|
extension/src/server/interactionService.ts |
New precedence/normalization helpers, behavior resolution, and one-time changed-default notification |
extension/src/server/rpcClient.ts |
Threads globalState into InteractionService |
extension/src/extension.ts |
Passes context.globalState when creating the RPC client |
extension/src/debugger/AspireDebugSession.ts |
Adds DashboardLaunchBehavior type union |
extension/src/dcp/types.ts |
Adds dashboardBrowser to AspireExtendedDebugConfiguration |
extension/src/commands/configureLaunchJson.ts |
Prompts for launch behavior and writes dashboardBrowser into generated config |
extension/src/loc/strings.ts |
New localized strings for the prompt and notification |
extension/package.nls.json / extension/package.json |
New setting/enum values, default changes (enableAspireDashboardAutoLaunch→off, dashboardBrowser→none), debug property |
extension/loc/xlf/aspire-vscode.xlf |
Regenerated translation source |
extension/CHANGELOG.md |
Documents the behavior change |
extension/src/test/rpc/interactionServiceTests.test.ts |
Updated/added tests with createAspireConfiguration helper |
extension/src/test/configureLaunchJson.test.ts |
New tests for the prompt flow |
Copilot's findings
- Files reviewed: 13/13 changed files
- Comments generated: 2
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
(automated comment) Edge-case review + standard path proof after
Panel used: architecture ( |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
(automated comment) CI follow-up: the Windows I pushed |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
(automated comment) Follow-up on the repeated Windows I pushed |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Limit the integrated browser dashboard opt-in to the E2E that actually verifies dashboard launch behavior. The other debug-dashboard tests now run under the new default so repeated Windows debug stop checks do not keep Simple Browser sessions open unnecessarily. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The E2E harness seeds dashboard launch globally for legacy coverage, so clearing the workspace value still left the stop-focused tests opted in. Explicitly opt the suite out by default and only override the dashboard-opening test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
VS Code's active debug session can be a child session during extension E2E tests. Dispose the extension's tracked Aspire sessions before calling stopDebugging so AppHost child sessions are stopped deterministically. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No code changes; this forces GitHub Actions to run against the latest PR head after a stale rerun remained on the previous commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d-launch # Conflicts: # extension/src/extension.ts
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the E2E stop control pending until VS Code has stopped the tracked Aspire debug sessions and the extension state no longer reports running or stopping AppHosts. This prevents the debug-dashboard tests from asserting against stale state after the control bridge returns. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…o issue17923-dashboard-launch
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Clarify legacy dashboard setting precedence in localized metadata and treat canceled Configure launch.json selection as command cancellation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make the README and localized setting description match the exact precedence between explicit new settings and legacy values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove any launch.json left by earlier E2E specs before exercising Configure launch.json in the CLI-unavailable edge case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
(automated comment) Final review-fix pass after
Validation/proof:
Review orchestration lanes (all actual task invocations used GPT-5.5, high reasoning):
|
Description
Make the VS Code extension stop opening the Aspire Dashboard automatically by default. Starting an AppHost still prints the dashboard URL and keeps the dashboard available from the Aspire panel, but users now opt into notifications, an external browser, the integrated browser, or browser-debug launches.
This also adds a per-launch
dashboardBrowserdebug configuration property and updates Configure launch.json to prompt for the launch behavior. Explicit legacyaspire.enableAspireDashboardAutoLaunchsettings are preserved so existing users who configurednotification,off, orlaunchkeep the same effective behavior. Explicit newaspire.dashboardBrowsernoneornotificationvalues win. Otherwise, legacynotificationandoffoverride browser-opening choices, and legacylaunchusesaspire.dashboardBrowserwhen configured or falls back to VS Code's integrated browser for compatibility.Fixes #17923
User-facing usage
Users can set the global behavior with:
{ "aspire.dashboardBrowser": "none" }Or override it per launch configuration:
{ "type": "aspire", "request": "launch", "name": "Aspire: Launch default AppHost", "program": "${workspaceFolder}", "dashboardBrowser": "notification" }Supported values are
none,notification,openExternalBrowser,integratedBrowser,debugChrome,debugEdge, anddebugFirefox.Screenshots / Recordings
No static screenshot uploaded. The changed UI is the Configure launch.json quick pick; local Extension Host E2E drove that command, selected Do not open the dashboard, and verified
launch.jsoncontaineddashboardBrowser: "none". The E2E harness only captured failure screenshots for unrelated browser startup failures, so the useful proof here is the command transcript/state evidence in the automated testing comment.Validation
corepack yarn run compile-testscorepack yarn run compilecorepack yarn run lintcorepack yarn run compile-e2ecorepack yarn vscode-test --config .test-artifacts/vscode-test-short.mjs --grep "configureLaunchJsonCommand|displayDashboardUrls"— 15 passingASPIRE_EXTENSION_E2E_TEMP_ROOT=../../e2e18361,ASPIRE_EXTENSION_E2E_SHARD=commandPalette-fix,ASPIRE_EXTENSION_E2E_SPEC='out/test-e2e/test-e2e/commandPalette.e2e.test.js',ASPIRE_EXTENSION_E2E_SKIP_RESTORE_PREWARM=true: 3 passing / 1 pending before an unrelated multiple-AppHost discovery timeout. The passed path includes Aspire: Configure launch.json file writingdashboardBrowser: "none".SessionNotCreatedError: DevToolsActivePort file doesn't exist. The edge-case source now removes any launch.json left by earlier specs before driving Configure launch.json.Checklist
<remarks />and<code />elements on your triple slash comments?