Skip to content

Update Spectre.Console to 0.55.0#16106

Merged
JamesNK merged 7 commits intomainfrom
update-spectre-console-0.55.0
Apr 14, 2026
Merged

Update Spectre.Console to 0.55.0#16106
JamesNK merged 7 commits intomainfrom
update-spectre-console-0.55.0

Conversation

@JamesNK
Copy link
Copy Markdown
Member

@JamesNK JamesNK commented Apr 13, 2026

Fixes #14595
Fixes #15309

Description

Update Spectre.Console from 0.52.1-preview.0.5 to 0.55.0.

Changes

  • Directory.Packages.props: Bump Spectre.Console version from 0.52.1-preview.0.5 to 0.55.0
  • CliHostEnvironment.cs: Replace the workaround of creating a full AnsiConsole instance for ANSI detection with the new AnsiCapabilities.Create(Console.Out) API from Spectre.Console.Ansi (transitive dependency)
  • ConsoleInteractionServiceTests.cs: Implement the new IAnsiConsole.WriteAnsi interface member added in 0.55.0 on the test helper class

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

- Update Spectre.Console from 0.52.1-preview.0.5 to 0.55.0
- Use AnsiCapabilities.Create for ANSI detection instead of creating a full AnsiConsole instance
- Implement IAnsiConsole.WriteAnsi in test helper
Copilot AI review requested due to automatic review settings April 13, 2026 02:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 13, 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 -- 16106

Or

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

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

Updates the Aspire CLI’s Spectre.Console dependency and adapts CLI/test code to the updated ANSI capability detection and console interface surface area.

Changes:

  • Bump Spectre.Console from 0.52.1-preview.0.5 to 0.55.0.
  • Switch ANSI detection in CliHostEnvironment to AnsiCapabilities.Create(Console.Out).
  • Update the test IAnsiConsole wrapper to implement IAnsiConsole.WriteAnsi.

Reviewed changes

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

File Description
Directory.Packages.props Updates central package version for Spectre.Console.
src/Aspire.Cli/Utils/CliHostEnvironment.cs Uses new Spectre ANSI capability detection API instead of creating an AnsiConsole instance.
tests/Aspire.Cli.Tests/Interaction/ConsoleInteractionServiceTests.cs Implements newly-required IAnsiConsole.WriteAnsi on a test console wrapper.

Comment thread Directory.Packages.props
JamesNK added 4 commits April 13, 2026 11:25
Spectre.Console's GitHubEnricher sets Links=false when GITHUB_ACTIONS
is detected, which prevents OSC 8 hyperlink sequences from being emitted.
Disable default enrichers in tests to get consistent behavior across
local and CI environments.
Replace the AnsiConsole.Create workaround with the new
AnsiCapabilities.Create API from Spectre.Console.Ansi, which
provides direct ANSI capability detection without creating a
full AnsiConsole instance.
Copy link
Copy Markdown
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

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

LGTM: does this also close this issue #14595 and does this impact #15309?

@JamesNK
Copy link
Copy Markdown
Member Author

JamesNK commented Apr 14, 2026

LGTM: does this also close this issue #14595 and does this impact #15309?

#14595: Yes, fixed
#15309: Not sure, I'll test

Copy link
Copy Markdown
Contributor

@sebastienros sebastienros left a comment

Choose a reason for hiding this comment

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

Focused problems only. Looks good overall; I did not find any high-confidence issues to flag.review

JamesNK added 2 commits April 14, 2026 11:05
The upstream search highlighting bug in Spectre.Console has been fixed.
Remove MakeSafeFormatter and use EscapeMarkup() directly in selection
prompts, passing choiceFormatter through to Spectre's UseConverter().

Fixes #15309
@JamesNK
Copy link
Copy Markdown
Member Author

JamesNK commented Apr 14, 2026

#15309: Not sure, I'll test

Looks fixed.

@JamesNK JamesNK enabled auto-merge (squash) April 14, 2026 03:11
@JamesNK JamesNK merged commit 682811d into main Apr 14, 2026
556 of 559 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 71 recordings uploaded (commit 81981d8)

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
DoListStepsShowsPipelineSteps ▶️ 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
OtelLogsReturnsStructuredLogsFromStarterApp ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ 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 #24378934646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove MakeSafeFormatter workaround after Spectre.Console fix Update Spectre.Console to latest version (blocked by hyperlink rendering change)

5 participants