Add Aspire Activity Bar panel with running apphosts and resources tree view#14848
Merged
adamint merged 8 commits intodotnet:release/13.2from Mar 2, 2026
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14848Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14848" |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Aspire” Activity Bar panel in the VS Code extension to surface running AppHosts/resources via aspire ps, and extends the CLI ps command with a --resources JSON-only flag to provide per-AppHost resource details that the extension can render.
Changes:
- VS Code extension: contribute an Activity Bar container + “Running Apphosts” TreeView that polls
aspire ps --format json --resourceswith a fallback for older CLIs. - Aspire CLI: add
ps --resourcesto include mappedResourceSnapshotdetails in JSON output (ignored for table output). - Tests + localization: add CLI tests and new localized string resources for the new CLI option and extension UI.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/Commands/PsCommandTests.cs | Adds unit tests validating ps --resources JSON behavior and ensuring table output doesn’t fetch resources. |
| src/Aspire.Cli/Commands/PsCommand.cs | Implements --resources option and conditionally fetches/maps resource snapshots into JSON output. |
| src/Aspire.Cli/Resources/PsCommandStrings.resx | Adds ResourcesOptionDescription string for the new CLI option. |
| src/Aspire.Cli/Resources/PsCommandStrings.Designer.cs | Updates generated resource accessor for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.cs.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.de.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.es.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.fr.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.it.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.ja.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.ko.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.pl.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.pt-BR.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.ru.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.tr.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.zh-Hans.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.zh-Hant.xlf | Adds new trans-unit for ResourcesOptionDescription. |
| extension/src/views/AspireAppHostTreeProvider.ts | New TreeDataProvider to run aspire ps and render AppHosts/resources/endpoints in a tree with polling + fallback. |
| extension/src/loc/strings.ts | Adds localized UI strings for the new panel/tree labels and messages. |
| extension/src/extension.ts | Wires up the TreeView, polling based on visibility, refresh/open-dashboard commands, and welcome-context. |
| extension/resources/aspire-activity-bar.svg | Adds Aspire Activity Bar icon. |
| extension/package.nls.json | Adds localized contribution strings for the new view container/view/welcome and new commands. |
| extension/package.json | Contributes the Activity Bar container, tree view, welcome view, and new commands/menus. |
| extension/loc/xlf/aspire-vscode.xlf | Adds localization entries for the new view and command strings. |
Files not reviewed (1)
- src/Aspire.Cli/Resources/PsCommandStrings.Designer.cs: Language not supported
4f7c795 to
849c103
Compare
- Add Aspire sidebar panel in VS Code with running AppHosts tree view - Extend 'aspire ps --format json --resources' to include per-AppHost resource data - Show resources (with state, type, endpoints) as collapsible tree items - Backward-compatible: falls back gracefully if CLI doesn't support --resources - Visibility-based polling (only fetches when panel is visible) - Add SVG icon, localized strings, and unit tests
…g, and spawn error handling - Show welcome view with upgrade prompt when CLI is missing or too old - Add 'Update Aspire CLI' command (aspire update --self) - Start polling immediately if tree view is already visible on creation - Handle spawn errors (ENOENT) to prevent polling from getting stuck - Change dashboard icon to link-external for clickable items - Remove unused InfoMessageItem in favor of viewsWelcome-based error display
- Stop AppHost: right-click context menu runs 'aspire stop --project <path>' - Stop Resource: right-click context menu runs 'aspire stop <name> --project <path>' - View Logs: right-click context menu runs 'aspire logs <name> --project <path> --follow' - All commands hidden from command palette (tree-only actions) - Localized all new command titles
- Add Start, Restart, Stop resource and Stop apphost context menu actions - Add View logs context menu for streaming resource logs - Add Execute command... context menu with quick pick for resource commands - Fix RPC race condition: register interaction service endpoints before connection.listen() to prevent unhandled 'displayEmptyLine' errors - Fix RPC client factory to use lazy debugSessionId reference - Use --apphost flag (primary) instead of --project (legacy alias) - Normalize casing: 'apphost' (lowercase h) in user-facing strings
- Register custom 'aspire.brandPurple' color (#512BD4 light, #7455DD dark) - Color apphost and resources group icons with Aspire purple - Color resource state icons: green for success, yellow for warning, red for error, purple for other active states
…ands - Merge duplicate detail item classes into single DetailItem - Extract _runResourceCommand helper for stop/start/restart/logs - Store appHostPid directly on ResourceItem instead of parsing ID string - Remove no-op resourceEndpointLabel wrapper - Fix resource state icons to use exact PascalCase state values from KnownResourceStates - Respect stateStyle overrides for health check warnings/errors on Running resources - Show Start/Stop/Restart context menus only when resource has those commands available - Reduce polling interval from 5s to 3s
dd2f08f to
8011960
Compare
mitchdenny
pushed a commit
that referenced
this pull request
Mar 5, 2026
…e view (#14848) * Add Aspire Activity Bar panel with running apphosts tree view - Add Aspire sidebar panel in VS Code with running AppHosts tree view - Extend 'aspire ps --format json --resources' to include per-AppHost resource data - Show resources (with state, type, endpoints) as collapsible tree items - Backward-compatible: falls back gracefully if CLI doesn't support --resources - Visibility-based polling (only fetches when panel is visible) - Add SVG icon, localized strings, and unit tests * Add error welcome view, updateSelf command, initial visibility polling, and spawn error handling - Show welcome view with upgrade prompt when CLI is missing or too old - Add 'Update Aspire CLI' command (aspire update --self) - Start polling immediately if tree view is already visible on creation - Handle spawn errors (ENOENT) to prevent polling from getting stuck - Change dashboard icon to link-external for clickable items - Remove unused InfoMessageItem in favor of viewsWelcome-based error display * Add Stop and View Logs context menu actions for AppHosts and Resources - Stop AppHost: right-click context menu runs 'aspire stop --project <path>' - Stop Resource: right-click context menu runs 'aspire stop <name> --project <path>' - View Logs: right-click context menu runs 'aspire logs <name> --project <path> --follow' - All commands hidden from command palette (tree-only actions) - Localized all new command titles * Add resource management commands and fix RPC race condition - Add Start, Restart, Stop resource and Stop apphost context menu actions - Add View logs context menu for streaming resource logs - Add Execute command... context menu with quick pick for resource commands - Fix RPC race condition: register interaction service endpoints before connection.listen() to prevent unhandled 'displayEmptyLine' errors - Fix RPC client factory to use lazy debugSessionId reference - Use --apphost flag (primary) instead of --project (legacy alias) - Normalize casing: 'apphost' (lowercase h) in user-facing strings * Remove unused string constants from strings.ts * Add Aspire brand purple and semantic colors to tree view icons - Register custom 'aspire.brandPurple' color (#512BD4 light, #7455DD dark) - Color apphost and resources group icons with Aspire purple - Color resource state icons: green for success, yellow for warning, red for error, purple for other active states * Simplify tree provider, fix resource state icons and conditional commands - Merge duplicate detail item classes into single DetailItem - Extract _runResourceCommand helper for stop/start/restart/logs - Store appHostPid directly on ResourceItem instead of parsing ID string - Remove no-op resourceEndpointLabel wrapper - Fix resource state icons to use exact PascalCase state values from KnownResourceStates - Respect stateStyle overrides for health check warnings/errors on Running resources - Show Start/Stop/Restart context menus only when resource has those commands available - Reduce polling interval from 5s to 3s
Copilot AI
pushed a commit
that referenced
this pull request
Mar 10, 2026
…e view (#14848) * Add Aspire Activity Bar panel with running apphosts tree view - Add Aspire sidebar panel in VS Code with running AppHosts tree view - Extend 'aspire ps --format json --resources' to include per-AppHost resource data - Show resources (with state, type, endpoints) as collapsible tree items - Backward-compatible: falls back gracefully if CLI doesn't support --resources - Visibility-based polling (only fetches when panel is visible) - Add SVG icon, localized strings, and unit tests * Add error welcome view, updateSelf command, initial visibility polling, and spawn error handling - Show welcome view with upgrade prompt when CLI is missing or too old - Add 'Update Aspire CLI' command (aspire update --self) - Start polling immediately if tree view is already visible on creation - Handle spawn errors (ENOENT) to prevent polling from getting stuck - Change dashboard icon to link-external for clickable items - Remove unused InfoMessageItem in favor of viewsWelcome-based error display * Add Stop and View Logs context menu actions for AppHosts and Resources - Stop AppHost: right-click context menu runs 'aspire stop --project <path>' - Stop Resource: right-click context menu runs 'aspire stop <name> --project <path>' - View Logs: right-click context menu runs 'aspire logs <name> --project <path> --follow' - All commands hidden from command palette (tree-only actions) - Localized all new command titles * Add resource management commands and fix RPC race condition - Add Start, Restart, Stop resource and Stop apphost context menu actions - Add View logs context menu for streaming resource logs - Add Execute command... context menu with quick pick for resource commands - Fix RPC race condition: register interaction service endpoints before connection.listen() to prevent unhandled 'displayEmptyLine' errors - Fix RPC client factory to use lazy debugSessionId reference - Use --apphost flag (primary) instead of --project (legacy alias) - Normalize casing: 'apphost' (lowercase h) in user-facing strings * Remove unused string constants from strings.ts * Add Aspire brand purple and semantic colors to tree view icons - Register custom 'aspire.brandPurple' color (#512BD4 light, #7455DD dark) - Color apphost and resources group icons with Aspire purple - Color resource state icons: green for success, yellow for warning, red for error, purple for other active states * Simplify tree provider, fix resource state icons and conditional commands - Merge duplicate detail item classes into single DetailItem - Extract _runResourceCommand helper for stop/start/restart/logs - Store appHostPid directly on ResourceItem instead of parsing ID string - Remove no-op resourceEndpointLabel wrapper - Fix resource state icons to use exact PascalCase state values from KnownResourceStates - Respect stateStyle overrides for health check warnings/errors on Running resources - Show Start/Stop/Restart context menus only when resource has those commands available - Reduce polling interval from 5s to 3s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an Aspire Activity Bar panel to the VS Code extension that shows running AppHosts and their resources in a native TreeView. Also adds a --resources option to aspire ps (basically just the stuff from aspire describe) that the extension can consume.
The tree view refreshes every 5 seconds. If using an old CLI version, only the dashboard URL, apphost ID, and CLI ID are visible. If using a CLI version without aspire ps, an error message is shown in the panel. The resources entry is collapsed by default.
You can execute resource commands, open endpoints, and restart/stop/start resources via context menu.
Changes
VS Code Extension:
AspireAppHostTreeProviderthat pollsaspire ps --format json --resourcesto display:--resourcesflagpackage.nls.jsonandstrings.tsAspire CLI (
aspire ps):--resourcesflag that includes per-AppHost resource details in JSON outputGetResourceSnapshotsAsyncand mapped throughResourceSnapshotMapper--resourcesonly takes effect with--format json(ignored for table output)Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: