[Nitro CLI] Use a larger print width when running in CI environments#9513
Merged
tobias-tengler merged 4 commits intomainfrom Apr 8, 2026
Merged
[Nitro CLI] Use a larger print width when running in CI environments#9513tobias-tengler merged 4 commits intomainfrom
tobias-tengler merged 4 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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.Updateinto a single method with optionaldetails, 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.
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.