Skip to content

Improve CLI deployment rendering: symbol fixes, log level helper, render scenarios#16080

Merged
JamesNK merged 3 commits into
mainfrom
jamesnk/deployment-rendering
Apr 12, 2026
Merged

Improve CLI deployment rendering: symbol fixes, log level helper, render scenarios#16080
JamesNK merged 3 commits into
mainfrom
jamesnk/deployment-rendering

Conversation

@JamesNK
Copy link
Copy Markdown
Member

@JamesNK JamesNK commented Apr 12, 2026

Description

Improve CLI deployment rendering with several small fixes:

  • Symbol rendering: Append VS15 (\uFE0E) to , , and to force text presentation on all platforms. Replace with (U+25B3) since VS15 didn't reliably suppress emoji rendering for that character.
  • Log level helper: Extract a shared ParseLogLevel helper method that returns both the LogLevel enum value and its 3-letter prefix (e.g. "TRC", "DBG", "INF"). Replaces duplicated switch expressions in both the debug and non-debug processing paths. Also handles "INFO" and "WARN" short forms, and maps null to LogLevel.Information.
  • Render scenarios: Escape Spectre markup brackets in the publish-summary-markup scenario data. Add an Info-state step to the publish-summary-mixed-hierarchy scenario to exercise the InfoSymbol.

Before (warning is emoji instead of text):
image

After (warning is text):
image

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Copilot AI review requested due to automatic review settings April 12, 2026 04:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 12, 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 -- 16080

Or

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

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

Improves Aspire CLI publish/deployment rendering consistency across platforms by adjusting symbol glyphs, consolidating log-level parsing, and enhancing debug render scenarios.

Changes:

  • Force text presentation for common status symbols (✓ ✗ →) and replace the warning glyph to avoid emoji rendering.
  • Factor duplicated log-level parsing into a shared ParseLogLevel helper returning both LogLevel and a 3-letter prefix.
  • Update debug-only render scenarios to escape Spectre markup and add an info-state scenario record.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Aspire.Cli/Utils/ConsoleActivityLogger.cs Updates status symbols and adjusts summary rendering comments around Spectre-safe text.
src/Aspire.Cli/Commands/RenderCommand.cs Fixes scenario strings for Spectre markup escaping and adds an Info-state scenario record.
src/Aspire.Cli/Commands/PipelineCommandBase.cs Introduces ParseLogLevel to remove duplicated switch logic and normalize log-level handling.

@@ -410,10 +410,10 @@ private void WriteStepDurationsSummary(IReadOnlyList<StepDurationRecord> records
ActivityState.Failure => _enableColor ? "[red]" + FailureSymbol + "[/]" : FailureSymbol,
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

ActivityState.Info isn’t handled in the step-summary symbol mapping, so an info record will render with the in-progress arrow (and cyan) rather than using InfoSymbol/dim styling. Add an explicit ActivityState.Info arm (and consider matching the summary bar colorization) so the new render scenario actually exercises the info symbol as intended.

Suggested change
ActivityState.Failure => _enableColor ? "[red]" + FailureSymbol + "[/]" : FailureSymbol,
ActivityState.Failure => _enableColor ? "[red]" + FailureSymbol + "[/]" : FailureSymbol,
ActivityState.Info => _enableColor ? "[dim]" + InfoSymbol + "[/]" : InfoSymbol,

Copilot uses AI. Check for mistakes.
- Add explicit ActivityState.Info arm to step-summary symbol mapping
- Use blue color (instead of dim) for Info state symbols and timeline bars
- Extract GetStateColor helper for consistent state-to-color mapping
- Simplify ColorizeSymbol and ColorizeSummaryBar to delegate to GetStateColor
- Make {bad} bold in publish-summary-markup scenario
@JamesNK JamesNK enabled auto-merge (squash) April 12, 2026 05:31
@JamesNK JamesNK merged commit ed74706 into main Apr 12, 2026
279 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 68 recordings uploaded (commit 7f1679d)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AllPublishMethodsBuildDockerImages ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ 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
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DeployK8sBasicApiService ▶️ 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
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ 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
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ 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
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #24299541395

@joperezr joperezr added this to the 13.3 milestone Apr 14, 2026
radical pushed a commit that referenced this pull request Apr 14, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
@JamesNK JamesNK deleted the jamesnk/deployment-rendering branch May 29, 2026 22:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants