Repository navigation
Reorder root help around the app development workflow - #987
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Build Metrics ReportValidation passed. All required build and validation jobs succeeded. Binary Sizes
.NET Test Results (TRX reports)Other suites are reflected in the overall validation status above. ✅ 8062 passed, 37 skipped out of 8099 tests in 1466.1s (+10 tests, +277.1s vs. baseline) Test Coverage✅ 86.4% line coverage, 81% branch coverage · ✅ no change vs. baseline CLI Startup Time65ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 987Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 987Run Updated 2026-10-06 17:48:28 UTC · commit |
Root help and every subcommand's help listed --on, including commands that reject it. Keep a hidden recursive --on on the root so every command still parses (and rejects) it, and attach the visible option only to target-aware commands (run, unregister, ui). The CLI schema now lists --on on those commands, so the npm generator no longer needs its own target-aware list. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The intended help ordering lacks regression coverage, and the user-visible --on change contradicts the stated PR scope.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Reorders root help around the app-development workflow and changes where --on is advertised.
Changes:
- Reorders and renames root help categories and descriptions.
- Exposes
--ononly on target-aware commands. - Regenerates CLI schema and npm documentation.
| File | Description |
|---|---|
src/winapp-npm/src/winapp-commands.ts |
Regenerates wrappers for relocated --on. |
src/winapp-npm/scripts/generate-commands.mjs |
Simplifies recursive-option generation. |
src/winapp-CLI/WinApp.Cli/Telemetry/Events/CommandInvokedEvent.cs |
Recognizes both selector declarations. |
src/winapp-CLI/WinApp.Cli/Commands/WinAppRootCommand.cs |
Reorders help and relocates --on. |
src/winapp-CLI/WinApp.Cli/Commands/UnregisterCommand.cs |
Normalizes short description. |
src/winapp-CLI/WinApp.Cli/Commands/RunCommand.cs |
Normalizes short description. |
src/winapp-CLI/WinApp.Cli/Commands/ExecutionTargetSelection.cs |
Splits visible and hidden selector options. |
src/winapp-CLI/WinApp.Cli.Tests/TargetSelectionParserTests.cs |
Tests selector placement. |
src/winapp-CLI/WinApp.Cli.Tests/ExecutionTargetSelectionTests.cs |
Tests selector visibility. |
src/winapp-CLI/WinApp.Cli.Tests/CustomHelpTests.cs |
Updates category-name assertion. |
docs/npm-usage.md |
Regenerates npm API documentation. |
docs/cli-schema.json |
Regenerates CLI schema. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Options.Add(ExecutionTargetSelection.UnsupportedOnOption); | ||
|
|
||
| foreach (var targetAwareCommand in Subcommands.OfType<ITargetAwareCommand>().Cast<Command>()) | ||
| { | ||
| targetAwareCommand.Options.Add(ExecutionTargetSelection.OnOption); |
| ("Get Started", [typeof(NewCommand), typeof(InitCommand), typeof(RestoreCommand), typeof(UpdateCommand)]), | ||
| ("Run & Debug", [typeof(RunCommand), typeof(CreateDebugIdentityCommand), typeof(UnregisterCommand), typeof(TargetCommand)]), | ||
| ("Discovery", [typeof(FindUiCommand), typeof(FindApiCommand)]), | ||
| ("UI Automation", [typeof(UiCommand)]), | ||
| ("Package, Sign & Publish", [typeof(PackageCommand), typeof(ManifestCommand), typeof(CertCommand), typeof(SignCommand), typeof(AzSignCommand), typeof(MSStoreCommand)]), | ||
| ("Advanced", [typeof(EmbedIdentityCommand), typeof(CreateExternalCatalogCommand), typeof(ToolCommand), typeof(GetWinappPathCommand)]) |


Description
Reorders the
winapp --helpscreen to follow the app development workflow (create, run, debug, discover, test, then package) and updates the root description to match.Before this change, "Packaging & Signing" was the second group, directly under Setup.
runwas in the middle of "Development Tools", and low-level identity tools were mixed in with everyday commands.New groups, in order
new,init,restore,updaterun,create-debug-identity,unregister,targetfind-ui,find-apiuipackage,manifest,cert,sign,az-sign,storeembed-identity,create-external-catalog,tool,get-winapp-pathRoot description
ShortDescriptionis updated to match.Other changes
runandunregistershort descriptions, so all help rows are consistent.docs/cli-schema.jsonwithbuild-cli.ps1 -OnlyDocs.Usage Example
Related Issue
Related to #986 (docs and README refocus on WinUI developers)
Type of Change
Checklist
dotnet test --project src/winapp-CLI/WinApp.Cli.Tests/WinApp.Cli.Tests.csproj --filter "FullyQualifiedName~CustomHelpTests|FullyQualifiedName~CliSchemaTests|FullyQualifiedName~CompleteCommandTests|FullyQualifiedName~WinAppParserConfigurationTests"passed (42 tests).scripts/build-cli.ps1 -OnlyDocspassed.Screenshots / Demo
Additional Notes
The category order only affects the root help screen. Subcommand help still uses the default renderer.