Fix duplicate dashboard stopping message - #18827
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR removes the duplicate shutdown output when stopping aspire dashboard run by centralizing cancellation message rendering in BaseCommand, while allowing commands (dashboard) to override the displayed message.
Changes:
- Added a virtual cancellation-message hook in
BaseCommandand routed cancellation rendering through it. - Overrode cancellation rendering in
DashboardRunCommandto emit only the dashboard-specific stopping message. - Updated tests and localization resources to reflect the punctuated “Stopping dashboard.” message.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/Commands/DashboardRunCommandTests.cs | Updates cancellation test to validate the single stopping message on both fast/slow cancellation paths. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.zh-Hant.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.zh-Hans.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.tr.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.ru.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.pt-BR.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.pl.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.ko.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.ja.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.it.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.fr.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.es.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.de.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/xlf/DashboardCommandStrings.cs.xlf | Updates localized resource string to include trailing period. |
| src/Aspire.Cli/Resources/DashboardCommandStrings.resx | Updates the source resource string to include trailing period. |
| src/Aspire.Cli/Commands/DashboardRunCommand.cs | Adds a command-specific cancellation message override and removes message emission from local cancellation paths. |
| src/Aspire.Cli/Commands/BaseCommand.cs | Introduces overridable cancellation rendering and uses it from centralized cancellation handling. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18827Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18827" |
This comment has been minimized.
This comment has been minimized.
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 2 / 100 test projects · 5 jobs, from 28 changed files. Selected test projects (2 / 100)
Selected jobs (5)
How these were chosen — grouped by what changed📦 affected project 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
This comment has been minimized.
This comment has been minimized.
|
📝 Documentation has been drafted in microsoft/aspire.dev#1445 targeting Triggered signals: Updated Note This draft PR needs human review before merging. |
Description
Stopping
aspire dashboard runcurrently displays both the dashboard-specific shutdown message and the generic Aspire shutdown message. This change centralizes cancellation rendering inBaseCommandwhile allowing commands to customize the message, so dashboard run emits exactly one punctuated shutdown line for both fast and slow cancellation paths.User-facing usage
Pressing Ctrl+C while the standalone dashboard is running now changes the shutdown output from:
to:
Validation
BaseCommandTestsandDashboardRunCommandTestspassed.dotnet build /t:UpdateXlf src/Aspire.Cli/Aspire.Cli.csproj.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?