Use display name in lifecycle command response messages#16143
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates lifecycle command (start/stop/restart) response messages in Aspire Hosting so notifications use the friendly resource name instead of the internal DCP resource ID, improving Dashboard Notification Center readability.
Changes:
- Updated start/stop/restart command success messages to use a resolved “display” name rather than
context.ResourceName. - Added a small helper to choose between
resource.Name(single instance) andcontext.ResourceName(replicated resources).
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16143Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16143" |
Contributor
|
🎬 CLI E2E Test Recordings — 71 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24385790056 |
mitchdenny
approved these changes
Apr 14, 2026
radical
pushed a commit
that referenced
this pull request
Apr 14, 2026
This was referenced Apr 24, 2026
Closed
Closed
Closed
Closed
Closed
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
Lifecycle command response messages (start, stop, restart) were using the internal DCP resource ID (e.g.,
apiservice-abcdefgh) instead of the friendly resource name. This caused the Notification Center in the Dashboard to display messages likeSuccessfully stopped 'apiservice-abcdefgh'instead ofSuccessfully stopped 'apiservice'.Added a
GetResolvedResourceNamehelper that returnsresource.Namefor single-instance resources andcontext.ResourceName(the full DCP ID) for replicated resources, matching the existing display name resolution pattern used elsewhere in the codebase.Fixes #16141
After:

Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: