[Nitro CLI] Fix issues with live activity and refine output#9560
Merged
tobias-tengler merged 12 commits intomainfrom Apr 16, 2026
Merged
[Nitro CLI] Fix issues with live activity and refine output#9560tobias-tengler merged 12 commits intomainfrom
tobias-tengler merged 12 commits intomainfrom
Conversation
55ce1b9 to
ecc1021
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines Nitro CLI messaging and interaction flows, primarily by standardizing required-option/argument errors, improving prompt handling in interactive vs non-interactive modes, and tightening URL/auth initialization behavior.
Changes:
- Standardize CLI error messages (e.g., “Missing required option …”, workspace/auth guidance) and update snapshots accordingly across many command tests.
- Refactor interactive selection/prompt logic (API/workspace selection) and centralize “required in non-interactive mode” enforcement via new helpers.
- Improve client context URL construction (scheme handling, UriBuilder) and adjust HTTP client auth behavior when no auth is available.
Reviewed changes
Copilot reviewed 104 out of 104 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Nitro/CommandLine/test/CommandLine.Tests/HttpClient/NitroClientRegistrationTests.cs | Updates expectation to allow client creation without auth headers being set. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ShowWorkspaceCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/SetDefaultWorkspaceCommandTests.cs | Updates error messages for missing options/no workspaces/non-interactive requirements. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CreateWorkspaceCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/ListStagesCommandTests.cs | Updates missing option/auth error messages. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/EditStagesCommandTests.cs | Updates expected interactive output and error assertions. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/DeleteStageCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Session/LoginCommandTests.cs | Updates “no workspaces” message formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/ValidateSchemaCommandTests.cs | Updates activity text/snapshots for schema validation flow. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/UploadSchemaCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/PublishSchemaCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/DownloadSchemaCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/CreatePersonalAccessTokenCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ValidateOpenApiCollectionCommandTests.cs | Updates validation activity text to include collection id. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/UploadOpenApiCollectionCommandTests.cs | Updates upload activity text to new phrasing. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/PublishOpenApiCollectionCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ListOpenApiCollectionCommandTests.cs | Updates workspace/api-id error messages. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/DeleteOpenApiCollectionCommandTests.cs | Updates required argument error message. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/CreateOpenApiCollectionCommandTests.cs | Updates missing api-id error message. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/UpdateMockCommandTests.cs | Updates required id error message. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/ListMockCommandTests.cs | Updates workspace/api-id error messages. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/CreateMockCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ValidateMcpFeatureCollectionCommandTests.cs | Updates validation activity text to include collection id. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/UploadMcpFeatureCollectionCommandTests.cs | Updates upload activity text to new phrasing. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/PublishMcpFeatureCollectionCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ListMcpFeatureCollectionCommandTests.cs | Updates workspace/api-id error messages. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/DeleteMcpFeatureCollectionCommandTests.cs | Updates required argument error message. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/CreateMcpFeatureCollectionCommandTests.cs | Updates missing api-id error message. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionValidateCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionUploadCommandTests.cs | Updates activity text for upload to include source schema name. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionPublishCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionDownloadCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishStartCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCommitCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCancelCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishBeginCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ShowEnvironmentCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ListEnvironmentCommandTests.cs | Updates workspace error message wording. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/CreateEnvironmentCommandTests.cs | Updates workspace error message wording. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ValidateClientCommandTests.cs | Updates validation activity text and auth guidance snapshots. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UploadClientCommandTests.cs | Updates upload activity text to new phrasing. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UnpublishClientCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ShowClientCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/PublishClientCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientVersionsCommandTests.cs | Updates missing client-id message and client-not-found snapshot. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientPublishedVersionsCommandTests.cs | Updates missing client-id message and client-not-found snapshot. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientCommandTests.cs | Updates workspace/api-id error messages and API-not-found snapshot. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DownloadClientCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DeleteClientCommandTests.cs | Updates required argument error message. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/CreateClientCommandTests.cs | Adds interactive workspace error test and updates missing api-id messaging. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ShowApiCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/SetApiSettingsCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ListApiCommandTests.cs | Updates workspace error message wording. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/DeleteApiCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/CreateApiCommandTests.cs | Updates workspace error message wording. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/ListApiKeyCommandTests.cs | Updates workspace error message wording. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/DeleteApiKeyCommandTests.cs | Updates authentication guidance text formatting. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/CreateApiKeyCommandTests.cs | Updates required option/workspace error messages. |
| src/Nitro/CommandLine/src/CommandLine/ThrowHelper.cs | Simplifies/standardizes required option/argument messages; removes some helpers. |
| src/Nitro/CommandLine/src/CommandLine/Services/Sessions/SessionService.cs | Improves session-load/construct error messages and formatting. |
| src/Nitro/CommandLine/src/CommandLine/Services/NitroClientContext.cs | Reworks URL initialization and robust URL building for /graphql endpoint. |
| src/Nitro/CommandLine/src/CommandLine/Helpers/PaginationContainer.cs | Inlines operation-result data validation/error conversion after removing extension. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/ParseResultExtensions.cs | Adds helpers for required values in non-interactive mode; updates workspace resolution error. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/NitroConsoleExtensions.cs | Refactors confirm and API-id prompting behavior and required-option enforcement. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/ConsoleRenderingExtensions.cs | Adds Dim() markup helper for consistent “(ID: …)” rendering. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/AnsiConsoleExtensions.cs | Changes error output rendering to use markup (currently without escaping). |
| src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/SetDefaultWorkspaceCommand.cs | Uses new parse-result helper for non-interactive required workspace-id; updates messages. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Status/StatusCommand.cs | Tweaks login hint formatting and workspace status display. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Stages/ListStagesCommand.cs | Uses centralized API-id prompting and required option helper. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Stages/EditStagesCommand.cs | Uses centralized API-id prompting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Stages/DeleteStageCommand.cs | Uses centralized API-id prompting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Schemas/ValidateSchemaCommand.cs | Updates validation activity title wording. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Schemas/SchemaHelpers.cs | Uses Dim() formatting for request id updates. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Schemas/PublishSchemaCommand.cs | Uses Dim() formatting for request id updates. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ValidateOpenApiCollectionCommand.cs | Updates validation activity title and request id formatting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/UploadOpenApiCollectionCommand.cs | Refactors activity lifetime and error handling; updates upload title wording. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/PublishOpenApiCollectionCommand.cs | Uses Dim() formatting for request id updates. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs | Uses centralized API-id prompting and required option helper; simplifies errors. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs | Uses non-interactive required-argument helper and centralized API selection. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/CreateOpenApiCollectionCommand.cs | Uses centralized API-id prompting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/Component/SelectOpenApiCollectionPrompt.cs | Simplifies API-not-found error handling. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/UpdateMockCommand.cs | Uses centralized API selection prompting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/ListMockCommand.cs | Uses centralized API-id prompting and required option helper. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ValidateMcpFeatureCollectionCommand.cs | Updates validation activity title and request id formatting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/UploadMcpFeatureCollectionCommand.cs | Refactors activity lifetime and error handling; updates upload title wording. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/PublishMcpFeatureCollectionCommand.cs | Uses Dim() formatting for request id updates. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs | Uses centralized API-id prompting and required option helper; simplifies errors. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs | Uses non-interactive required-argument helper and centralized API selection. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/CreateMcpFeatureCollectionCommand.cs | Uses centralized API-id prompting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Component/SelectMcpFeatureCollectionPrompt.cs | Simplifies API-not-found error handling. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Login/LoginCommand.cs | Tweaks wording and makes cloud-url retrieval consistent with argument fallback. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/PublishCommand/FusionConfigurationPublishBeginCommand.cs | Treats subgraph id/name as optional values instead of required. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionUploadCommand.cs | Includes source schema name in activity title and refactors error handling. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ValidateClientCommand.cs | Updates activity title wording and request id formatting. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/UploadClientCommand.cs | Refactors activity lifetime and error handling; updates upload title wording. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/PublishClientCommand.cs | Uses Dim() formatting for request id updates. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientVersionsCommand.cs | Uses required option helper and simplifies “not found” errors. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientPublishedVersionsCommand.cs | Uses required option helper and simplifies “not found” errors. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientCommand.cs | Centralizes API-id prompting and reduces duplicate non-interactive validation. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DeleteClientCommand.cs | Uses non-interactive required-argument helper and centralized API selection. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/Components/SelectClientPrompt.cs | Simplifies API-not-found error handling. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Extensions/NitroClientServiceCollectionExtensions.cs | Stops throwing when auth is missing; allows unauthenticated client setup. |
| src/Nitro/CommandLine/src/CommandLine/Helpers/StrawberryShakeExtensions.cs | Removes StrawberryShake EnsureData extension (logic moved into PaginationContainer). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
34a6829 to
9bfc4d9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 142 out of 142 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 1, 2026
This was referenced May 4, 2026
Open
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.