Repository navigation
feat: render clawctl help from the live command tree - #70
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 17, 2026, 10:35 PM ET / September 18, 2026, 02:35 UTC (Revision 4). ClawSweeper reviewWhat this changesRenders clawctl help from its command definitions using the launcher's shared layout and color policy, with regression coverage for malformed color options. Merge readiness⛔ Needs changes before merge - 1 item remains The change remains useful and is absent from current main. The previous malformed-color finding is resolved, and this review found no new blocking defect. Priority: P3 Review scores
Verification
How this fits togetherclawctl manages the packaged Windows environment around OpenClaw. Its parser supplies command descriptions and options to the help renderer, which prints guidance without running installation or gateway operations. flowchart LR
A[Help request] --> B[Command parser]
B --> C[Selected command tree]
C --> D[Visible commands and inherited options]
D --> E[Shared console renderer]
F[Terminal color policy] --> E
E --> G[Help text]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep command metadata in the parser and use the shared renderer for consistent help while preserving discovery, parse-error, and color behavior. Do we have a high-confidence way to reproduce the issue? Not applicable to the presentation feature; the earlier malformed-color defect has focused regression coverage, but tests were not run in this read-only review. Is this the best way to solve the issue? Yes. Replacing the help action while deriving content from the existing parser avoids a second command catalogue and reuses the established console presentation. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against b904c90c1439. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
257ebf5 to
e2cb02d
Compare
e2cb02d to
0f31faa
Compare
Help was the one clawctl surface that still looked like a different program: the library's renderer knows nothing about the heading, the grid, or the palette every other command uses. Render it ourselves instead. - Add ClawCtlHelp, which describes the command the user asked about by walking the parser: subcommands, options, arities, and descriptions. A command added to ClawCtlCommandLine is therefore documented without a matching edit here, which is the point of describing rather than listing. - Add ClawCtlHelpAction and install it on the root help option. The built-in HelpAction is sealed and exposes only a wrap width, so replacing the action is the supported extension point. One replacement covers every command, including commands added later, because the root's help option is recursive. - Render through ClawCtlConsole, so help inherits the identity mark, the label grid, and the colour policy, including --no-color. Three behaviours the library gave us for free and we now owe explicitly: hidden commands stay hidden, inherited recursive options are reported on subcommand help because they are part of the command line a user can type, and the non-recursive --version is not. Help never takes its name from RootCommand.Name, which defaults to the entry assembly and would read "testhost" under dotnet test. This is the same trap the version action already exists to avoid, and a test now covers it. Windows-style "/h" aliases are omitted. They still parse, but listing them widened the term column on every row to document a spelling nobody opens help to discover. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f472f437-3ee7-41f3-a501-81ae01590103
0f31faa to
9daa288
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat: render clawctl help from the live command tree This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Impact
Renders
clawctlhelp from the live command tree using the same heading, layout, and color policy as other commands.Why This Change Was Made
Help remains synchronized with parser commands and options, including inherited options. Malformed
--no-colorvalues now retain ordinary parse-error or explicit-help output instead of escaping through the unexpected-failure boundary.Evidence
Validated at
9daa288:.\scripts\Test-DotNetQuality.ps1on the complete stack.\scripts\Test-NativeAotCli.Tests.ps1: 17 intended scenarios passedStack