Skip to content

[Nitro CLI] Use a larger print width when running in CI environments#9513

Merged
tobias-tengler merged 4 commits intomainfrom
tte/fix-cli-print-width
Apr 8, 2026
Merged

[Nitro CLI] Use a larger print width when running in CI environments#9513
tobias-tengler merged 4 commits intomainfrom
tte/fix-cli-print-width

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 8, 2026 10:55
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 adjusts Nitro CLI console rendering to behave better in non-terminal contexts (e.g., CI/log capture) by widening the effective console width and improving how activity/error/warning output is rendered.

Changes:

  • Set a wide default console width when stdout/stderr are redirected (and align tests to the same default).
  • Simplify INitroConsoleActivity.Update into a single method with optional details, and update call sites accordingly.
  • Add/extend rendering helpers and styling so warnings/errors are consistently highlighted (including in activity trees).

Reviewed changes

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

Show a summary per file
File Description
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/CommandTestBase.cs Uses shared default print width in test consoles to avoid wrapping-dependent output.
src/Nitro/CommandLine/src/CommandLine/Services/Console/NitroConsoleActivity.cs Updates activity update API, adds warning/error styling, and fixes detail rendering width to account for indentation.
src/Nitro/CommandLine/src/CommandLine/Services/Console/NitroConsole.cs Renames ctor parameter to outConsole and routes console operations through it consistently.
src/Nitro/CommandLine/src/CommandLine/Services/Console/InteractiveNitroConsoleChildActivity.cs Adapts to unified Update signature and makes details optional.
src/Nitro/CommandLine/src/CommandLine/Services/Console/InteractiveNitroConsoleActivity.cs Adapts to unified Update signature and makes details optional.
src/Nitro/CommandLine/src/CommandLine/Services/Console/INitroConsoleActivity.cs Collapses Update overloads into a single method with optional details.
src/Nitro/CommandLine/src/CommandLine/Services/Console/ActivityTree.cs Styles warning/failed entry text (in addition to existing icon styling).
src/Nitro/CommandLine/src/CommandLine/Program.cs Sets wider console width when output/error are redirected to avoid Spectre’s 80-col default in non-terminal output.
src/Nitro/CommandLine/src/CommandLine/Helpers/Constants.cs Introduces DefaultPrintWidth.
src/Nitro/CommandLine/src/CommandLine/Extensions/TreeNodeExtensions.cs Refactors error rendering and output formatting for validation trees.
src/Nitro/CommandLine/src/CommandLine/Extensions/ConsoleRenderingExtensions.cs Adds AsError / AsWarning helpers for consistent markup styling.
src/Nitro/CommandLine/src/CommandLine/Commands/Schemas/PublishSchemaCommand.cs Updates Update call argument order to match new signature.
src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/PublishOpenApiCollectionCommand.cs Updates Update call argument order to match new signature.
src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/PublishMcpFeatureCollectionCommand.cs Updates Update call argument order to match new signature.
src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishHelpers.cs Updates Update call argument order to match new signature.
src/Nitro/CommandLine/src/CommandLine/Commands/Clients/PublishClientCommand.cs Updates Update call argument order to match new signature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Nitro/CommandLine/src/CommandLine/Services/Console/INitroConsoleActivity.cs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants