Improve CLI deployment rendering: symbol fixes, log level helper, render scenarios#16080
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16080Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16080" |
There was a problem hiding this comment.
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
ParseLogLevelhelper returning bothLogLeveland 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, | |||
There was a problem hiding this comment.
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.
| ActivityState.Failure => _enableColor ? "[red]" + FailureSymbol + "[/]" : FailureSymbol, | |
| ActivityState.Failure => _enableColor ? "[red]" + FailureSymbol + "[/]" : FailureSymbol, | |
| ActivityState.Info => _enableColor ? "[dim]" + InfoSymbol + "[/]" : InfoSymbol, |
- 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
|
🎬 CLI E2E Test Recordings — 68 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24299541395 |
Description
Improve CLI deployment rendering with several small fixes:
\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.ParseLogLevelhelper method that returns both theLogLevelenum 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 mapsnulltoLogLevel.Information.publish-summary-markupscenario data. Add anInfo-state step to thepublish-summary-mixed-hierarchyscenario to exercise theInfoSymbol.Before (warning is emoji instead of text):

After (warning is text):

Checklist