Keep canceled resource commands in dashboard notification center#17204
Conversation
Previously, canceled resource commands were removed from the notification center entirely. Now they remain visible with a Warning intent and a 'canceled' status message, consistent with how succeeded/failed commands are handled. Fixes #16614
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17204Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17204" |
There was a problem hiding this comment.
Pull request overview
This PR updates dashboard resource-command cancellation handling so canceled commands remain visible in the notification center as warning notifications instead of being removed.
Changes:
- Replaces canceled command notifications with a warning entry and localized canceled title.
- Adds the
ResourceCommandCanceledresource and generated localization entries. - Adds dashboard command executor tests for canceled, succeeded, and failed notification intents.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/Aspire.Dashboard/Model/DashboardCommandExecutor.cs |
Keeps canceled command notifications with warning intent. |
src/Aspire.Dashboard/Resources/Resources.resx |
Adds canceled command notification string. |
src/Aspire.Dashboard/Resources/Resources.Designer.cs |
Adds generated accessor for the new resource string. |
src/Aspire.Dashboard/Resources/xlf/Resources.cs.xlf |
Adds Czech XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.de.xlf |
Adds German XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.es.xlf |
Adds Spanish XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.fr.xlf |
Adds French XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.it.xlf |
Adds Italian XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.ja.xlf |
Adds Japanese XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.ko.xlf |
Adds Korean XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.pl.xlf |
Adds Polish XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.pt-BR.xlf |
Adds Portuguese (Brazil) XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.ru.xlf |
Adds Russian XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.tr.xlf |
Adds Turkish XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.zh-Hans.xlf |
Adds Simplified Chinese XLIFF entry. |
src/Aspire.Dashboard/Resources/xlf/Resources.zh-Hant.xlf |
Adds Traditional Chinese XLIFF entry. |
tests/Aspire.Dashboard.Tests/Model/DashboardCommandExecutorTests.cs |
Adds unit coverage for notification outcomes. |
Files not reviewed (1)
- src/Aspire.Dashboard/Resources/Resources.Designer.cs: Language not supported
|
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.
|
|
❓ CLI E2E Tests unknown — 86 passed, 0 failed, 1 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26039676091 |
mitchdenny
left a comment
There was a problem hiding this comment.
LGTM, might want to consider adding a test to lock in this behavior.
Canceled resource commands now remain visible in the notification center with a warning (amber) notification instead of being silently removed. Update the notification center description to reflect this behavior, listing success (information), failure (error), and canceled (warning) as the three retained completed-command notification states. Documents microsoft/aspire#17204. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Pull request created: #1008
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1008 targeting Updated Note This draft PR needs human review before merging. |
Summary
Previously, when a resource command was canceled, its notification was completely removed from the notification center. This made it impossible for users to see that a command had been canceled.
Now, canceled commands remain visible in the notification center with a Warning intent (amber styling) and a title like
"Stop" canceled, consistent with how succeeded and failed commands are handled.Changes
DashboardCommandExecutor.cs: Changed theCancelledhandler fromRemoveNotificationtoReplaceNotificationwithMessageIntent.WarningResources.resx+Resources.Designer.cs: AddedResourceCommandCanceledstring ("{0}" canceled)UpdateXlftargetDashboardCommandExecutorTests.cs: Added unit tests covering canceled, succeeded, and failed notification behaviorsFixes #16614