Skip to content

Add 'Open Aspire Dashboard' to Command Palette#15499

Merged
adamint merged 1 commit intomicrosoft:mainfrom
adamint:add-open-dashboard-command
Mar 23, 2026
Merged

Add 'Open Aspire Dashboard' to Command Palette#15499
adamint merged 1 commit intomicrosoft:mainfrom
adamint:add-open-dashboard-command

Conversation

@adamint
Copy link
Member

@adamint adamint commented Mar 23, 2026

Description

Add "Open Aspire Dashboard" to the VS Code extension Command Palette.

Previously, the openDashboard command was only accessible from the tree view inline button. This change:

  • Enables the command in the Command Palette when at least one Aspire app host is running (!aspire.noRunningAppHosts)
  • Renames the command from "Open Dashboard" to "Open Aspire Dashboard" for clarity
  • Adds a quick pick selector when multiple app hosts have dashboard URLs (global mode)
  • Strips the resource-specific /?resource= suffix from workspace dashboard URLs so the base dashboard opens instead of a resource-specific view

Fixes #15445

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

- Enable openDashboard command in Command Palette when app hosts are running
- Rename command from 'Open Dashboard' to 'Open Aspire Dashboard'
- Show quick pick selector when multiple app hosts have dashboards (global mode)
- Strip resource-specific query from workspace dashboard URL to open base dashboard
- Add selectDashboardPlaceholder localized string
Copilot AI review requested due to automatic review settings March 23, 2026 18:58
@github-actions
Copy link
Contributor

🚀 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 -- 15499

Or

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

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

Adds an “Open Aspire Dashboard” command to the VS Code Command Palette, making the dashboard easier to open outside the tree-view inline action while improving behavior in multi-apphost (global) scenarios and avoiding resource-specific dashboard URLs in workspace mode.

Changes:

  • Exposes aspire-vscode.openDashboard in the Command Palette when at least one app host is running (!aspire.noRunningAppHosts).
  • Updates the command title to “Open Aspire Dashboard” and adds a Quick Pick chooser when multiple dashboard URLs are available in global mode.
  • Normalizes workspace-mode dashboard URLs to open the base dashboard (strips /?resource= suffix).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
extension/src/views/AspireAppHostTreeProvider.ts Makes openDashboard async, adds multi-dashboard Quick Pick in global mode, and strips resource-specific suffixes for workspace dashboard URLs.
extension/src/loc/strings.ts Adds localized placeholder text for the dashboard Quick Pick.
extension/package.nls.json Renames the command display string and adds a localization entry for the new placeholder.
extension/package.json Enables the dashboard command in the Command Palette when app hosts are running.
extension/loc/xlf/aspire-vscode.xlf Updates localization units for the renamed command and new placeholder string.

Comment on lines +481 to +487
function getBaseDashboardUrl(resourceDashboardUrl: string | null): string | null {
if (!resourceDashboardUrl) {
return null;
}
const idx = resourceDashboardUrl.indexOf('/?resource=');
return idx >= 0 ? resourceDashboardUrl.substring(0, idx) : resourceDashboardUrl;
}
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

New behavior in openDashboard now depends on URL normalization (getBaseDashboardUrl) and multi-apphost selection via Quick Pick, but there are no unit tests covering these cases. Consider extracting/exporting getBaseDashboardUrl (or moving it to a small util) and adding tests that verify: (1) resource URLs with /?resource= are stripped correctly, and (2) in global mode with multiple dashboard URLs a selection is required/cancel is handled.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@adamint adamint merged commit 97a9d96 into microsoft:main Mar 23, 2026
502 of 505 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Open Aspire dashhboard" to Command Pallette in VS Code extension

3 participants