Skip to content

Keep canceled resource commands in dashboard notification center#17204

Merged
JamesNK merged 4 commits into
mainfrom
fix/canceled-command-notification
May 19, 2026
Merged

Keep canceled resource commands in dashboard notification center#17204
JamesNK merged 4 commits into
mainfrom
fix/canceled-command-notification

Conversation

@JamesNK
Copy link
Copy Markdown
Member

@JamesNK JamesNK commented May 18, 2026

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 the Cancelled handler from RemoveNotification to ReplaceNotification with MessageIntent.Warning
  • Resources.resx + Resources.Designer.cs: Added ResourceCommandCanceled string ("{0}" canceled)
  • xlf files: Updated via UpdateXlf target
  • DashboardCommandExecutorTests.cs: Added unit tests covering canceled, succeeded, and failed notification behaviors

Fixes #16614

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
Copilot AI review requested due to automatic review settings May 18, 2026 10:07
@JamesNK JamesNK requested a review from adamint as a code owner May 18, 2026 10:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

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

Or

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

Copy link
Copy Markdown
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

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 ResourceCommandCanceled resource 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

Comment thread tests/Aspire.Dashboard.Tests/Model/DashboardCommandExecutorTests.cs Outdated
JamesNK and others added 3 commits May 18, 2026 18:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown
Contributor

CLI E2E Tests unknown — 86 passed, 0 failed, 1 unknown (commit e2227cd)

View all recordings
Status Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View recording
AddPackageWhileAppHostRunningDetached ▶️ View recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View recording
AgentInitCommand_DefaultSelection_InstallsDefaultSkills ▶️ View recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View recording
AspireInitSingleFileAppHostRunsViaDotnetRunAppHost ▶️ View recording
AspireInitWithExistingAppHostDirRecreatesMissingNuGetConfigAndPreservesFiles ▶️ View recording
AspireInitWithSolutionFileGeneratesAppHostThatBuildsAgainstChannelHive ▶️ View recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View recording
AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent ▶️ View recording
Banner_DisplayedOnFirstRun ▶️ View recording
Banner_DisplayedWithExplicitFlag ▶️ View recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View recording
CertificatesClean_RemovesCertificates ▶️ View recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View recording
CreateAndRunAspireStarterProject ▶️ View recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View recording
CreateAndRunEmptyAppHostProject ▶️ View recording
CreateAndRunJavaEmptyAppHostProject ▶️ View recording
CreateAndRunJsReactProject ▶️ View recording
CreateAndRunPythonReactProject ▶️ View recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View recording
CreateAndRunTypeScriptStarterProject ▶️ View recording
CreateJavaAppHostWithViteApp ▶️ View recording
CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain ▶️ View recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View recording
DeployK8sBasicApiService ▶️ View recording
DeployK8sWithExternalHelmChart ▶️ View recording
DeployK8sWithGarnet ▶️ View recording
DeployK8sWithMongoDB ▶️ View recording
DeployK8sWithMySql ▶️ View recording
DeployK8sWithPostgres ▶️ View recording
DeployK8sWithRabbitMQ ▶️ View recording
DeployK8sWithRedis ▶️ View recording
DeployK8sWithSqlServer ▶️ View recording
DeployK8sWithValkey ▶️ View recording
DeployTypeScriptAppToKubernetes ▶️ View recording
DescribeCommandResolvesReplicaNames ▶️ View recording
DescribeCommandShowsRunningResources ▶️ View recording
DetachFormatJsonProducesValidJson ▶️ View recording
DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ▶️ View recording
DoListStepsShowsPipelineSteps ▶️ View recording
DocsCommand_RendersInteractiveMarkdownFromLocalSource ▶️ View recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View recording
DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain ▶️ View recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View recording
GlobalMigration_PreservesAllValueTypes ▶️ View recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View recording
InteractiveCSharpInitCreatesExpectedFiles ▶️ View recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View recording
LatestCliCanStartStableChannelAppHost ▶️ View recording
LatestCliCanStartStableChannelTypeScriptAppHost ▶️ View recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View recording
LogLevelTrace_ProducesTraceEntriesInCliLogFile ▶️ View recording
LogsCommandShowsResourceLogs ▶️ View recording
OtelLogsReturnsStructuredLogsFromStarterApp ▶️ View recording
OtelLogsReturnsStructuredLogsFromStarterAppIsolated ▶️ View recording
PsCommandListsRunningAppHost ▶️ View recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View recording
PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View recording
ResourceCommand_FailedExecution_DisplaysAppHostLogPathAndLogContainsEntries ▶️ View recording
ResourceCommand_FailsWhenInteractionServiceIsRequired ▶️ View recording
ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput ▶️ View recording
RestoreGeneratesSdkFiles ▶️ View recording
RestoreGeneratesSdkFiles_WithConfiguredToolchain ▶️ View recording
RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ View recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View recording
SecretCrudOnDotNetAppHost ▶️ View recording
SecretCrudOnTypeScriptAppHost ▶️ View recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View recording
StopAllAppHostsFromAppHostDirectory ▶️ View recording
StopNonInteractiveSingleAppHost ▶️ View recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View recording
UpdateProjectChannelToStable_TypeScript_PicksUpStablePackages ▶️ View recording

📹 Recordings uploaded automatically from CI run #26039676091

Copy link
Copy Markdown
Member

@mitchdenny mitchdenny left a comment

Choose a reason for hiding this comment

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

LGTM, might want to consider adding a test to lock in this behavior.

@JamesNK JamesNK merged commit 3a3403f into main May 19, 2026
588 of 591 checks passed
@JamesNK JamesNK deleted the fix/canceled-command-notification branch May 19, 2026 03:50
@github-actions github-actions Bot added this to the 13.4 milestone May 19, 2026
aspire-repo-bot Bot added a commit to microsoft/aspire.dev that referenced this pull request May 19, 2026
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>
@aspire-repo-bot
Copy link
Copy Markdown
Contributor

Pull request created: #1008

Generated by PR Documentation Check

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1008 targeting release/13.4.

Updated src/frontend/src/content/docs/dashboard/explore.mdx to reflect that canceled resource commands now remain visible in the notification center with a warning (amber) notification, consistent with how succeeded and failed commands are handled. The existing text listed only started/succeeded/failed states; the revised bullet now lists all three completed-command states: success (information), failure (error), and canceled (warning).

Note

This draft PR needs human review before merging.

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.

Dashboard: Cancelling parameter edit shows 'Succeeded' in notification tray

4 participants