Skip to content

Improve aspire config list output formatting#14600

Merged
adamint merged 1 commit intorelease/13.2from
maleger/config-list-cleanup
Feb 23, 2026
Merged

Improve aspire config list output formatting#14600
adamint merged 1 commit intorelease/13.2from
maleger/config-list-cleanup

Conversation

@maddymontaquila
Copy link
Copy Markdown
Contributor

Summary

Cleans up the aspire config list output to make configuration values more visually distinct from the available features section.

Changes

Configuration tables: Local and global configuration sections now render in Spectre.Console tables with rounded borders and titled headers (matching the pattern used by aspire describe and aspire docs). This gives them clear visual boundaries so they don't blend into the feature list.

Available features: Instead of a comma-separated list of feature names, each feature is now displayed on its own line with:

  • The feature name in cyan
  • Its default value (true/false)
  • A description of what the feature controls

A hint line at the bottom shows users how to set a feature: aspire config set features.<name> true|false.

Before

\
Local configuration:
some.key = some-value

Global configuration:
No global configuration found.

Available features:
execCommandEnabled, showDeprecatedPackages, stagingChannelEnabled, ...
\\

After

\
Local configuration
╭──────────┬────────────╮
│ Key │ Value │
├──────────┼────────────┤
│ some.key │ some-value │
╰──────────┴────────────╯
Global configuration
╭───────────────────────────────────╮
│ Key │ │
├───────────────────────────────────┤
│ No global configuration found. │
╰───────────────────────────────────╯

Available features:
execCommandEnabled (default: false)
Enable or disable the 'aspire exec' command...
showDeprecatedPackages (default: false)
Show or hide deprecated packages in 'aspire add' search results

Use 'aspire config set features. true|false' to enable or disable a feature.
\\

Testing

All 1300 Aspire.Cli.Tests pass.

- Render local and global configuration in Spectre.Console tables with
  rounded borders and titled headers for visual distinction
- Show each available feature on its own line with description and
  default value instead of a comma-separated list
- Add hint text showing how to enable/disable features via
  aspire config set

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 22:23
@github-actions
Copy link
Copy Markdown
Contributor

🚀 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14600

Or

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

@maddymontaquila
Copy link
Copy Markdown
Contributor Author

image

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 improves the output formatting of the aspire config list command by replacing plain text output with Spectre.Console tables featuring rounded borders and titles, and enhancing the display of available features with descriptions and default values.

Changes:

  • Refactored configuration display to use formatted tables with visual separation
  • Enhanced feature listing with individual lines showing name, default value, and description
  • Added localized hint message to guide users on setting feature flags

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.

File Description
src/Aspire.Cli/Commands/ConfigCommand.cs Refactored ListCommand to render config in Spectre.Console tables with rounded borders and titles; improved feature display with metadata
src/Aspire.Cli/Resources/ConfigCommandStrings.Designer.cs Auto-generated designer file for new SetFeatureHint resource string
src/Aspire.Cli/Resources/ConfigCommandStrings.resx Added SetFeatureHint resource string for feature configuration guidance
src/Aspire.Cli/Resources/xlf/*.xlf Added SetFeatureHint translation entries (marked as "new" for localization) in all 12 supported languages
Files not reviewed (1)
  • src/Aspire.Cli/Resources/ConfigCommandStrings.Designer.cs: Language not supported

@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 5a52895:

Test Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
ResourcesCommandShowsRunningResources ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22243526428

}

return ExitCodeConstants.Success;
AnsiConsole.Write(table);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Previously we used to Write using the InteractionService, as oposed to bypassing and going directly to AnsiConsole.Write. To be honest, I'm not sure why listing config was done through the interaction service, but might be an important scenario, so just calling it out in case someone else knows why and we should change this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's some centrlaized logic for understanding wht is suspported by the environment. Does it support color? is it inteactive? Are we in a CI environment? etc.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AnsiConsole.Write it's a static method and makes unit testing output difficult. However, a bunch of other commands are also using it. Should clean up in the future.

Copy link
Copy Markdown
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Minor question, but this looks good otherwise.

}

return ExitCodeConstants.Success;
AnsiConsole.Write(table);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AnsiConsole.Write it's a static method and makes unit testing output difficult. However, a bunch of other commands are also using it. Should clean up in the future.

foreach (var feature in unconfiguredFeatures)
{
InteractionService.DisplayMarkupLine($" [cyan]{kvp.Key.EscapeMarkup()}[/] = [yellow]{kvp.Value.EscapeMarkup()}[/]");
var defaultText = feature.DefaultValue ? "true" : "false";
Copy link
Copy Markdown
Member

@adamint adamint Feb 23, 2026

Choose a reason for hiding this comment

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

Later, we'll need to go do a loc pass because there's a bunch of other stuff that's slipped through the cracks. Same thoughts as the others about the interaction service. I'll clean up in a follow up.

@adamint adamint merged commit f9f7acd into release/13.2 Feb 23, 2026
349 checks passed
@adamint adamint deleted the maleger/config-list-cleanup branch February 23, 2026 16:27
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 23, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
- Render local and global configuration in Spectre.Console tables with
  rounded borders and titled headers for visual distinction
- Show each available feature on its own line with description and
  default value instead of a comma-separated list
- Add hint text showing how to enable/disable features via
  aspire config set

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2026
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.

6 participants