Improve clawctl output readability and color - #66
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: blocked before merge. Reviewed September 17, 2026, 8:51 PM ET / September 18, 2026, 00:51 UTC (Revision 7). ClawSweeper reviewWhat this changesThe PR centralizes clawctl rendering, adds terminal-aware color and progress output, expands status reporting, preserves reset diagnostics, and handles interrupted commands. Merge readiness⛔ Blocked before merge - 3 items remain The previous code findings are resolved, and the contribution remains distinct from main. The status exit-code compatibility choice and outdated PR description still need resolution. Priority: P2 Review scores
Verification
How this fits togetherclawctl manages the Windows package’s isolated session, bundled runtime, gateway, and sign-in recovery. Management commands produce operation results that the new renderer turns into terminal output and exit codes. flowchart TD
A[Management command] --> B[Command parsing]
B --> C[Session and gateway operations]
C --> D[Operation results]
E[Terminal capabilities and color settings] --> F[Output renderer]
D --> F
F --> G[Readable terminal output]
D --> H[Process exit code]
Decision needed
Why: Both interpretations are coherent, but the broader failure conditions change existing automation and are not explicitly resolved in the captured discussion or documentation. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the unified renderer while preserving the existing status exit contract unless maintainers explicitly adopt and document aggregate health semantics with fresh-install and upgrade coverage. Do we have a high-confidence way to reproduce the issue? Not applicable to the readability feature. The status exit-code difference is directly established by source comparison; no runtime tests were executed during this read-only review. Is this the best way to solve the issue? Yes for centralized rendering and capability-aware color; unclear for expanding status failure semantics without an explicit compatibility contract. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against ad5df933da4f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
d3819c9 to
c74c314
Compare
clawctl described the machine rather than the person using it: passive wording, package paths and sandbox identifiers in ordinary output, and inconsistent severity words. Each command also built its own presentation strings, so alignment came from per-command width constants and severity vocabulary drifted between commands. Commands now return semantic results and a single renderer owns presentation. - Add ClawCtlResults, so operations describe what happened and the renderer decides how it reads. - Compose output from Spectre.Console renderables. A Grid derives the label column from the widest label, which removes the per-command widths, and a Panel renders the note callout for an unexpected fault. - Colour is an event, not a wash: labels stay in the terminal's own foreground and only the leading state word carries a hue. This follows openclaw's styleHealthChannelLine, which colours the state word of a "label: detail" row and leaves the label alone. - Add ClawCtlColorPolicy for --no-color, NO_COLOR, FORCE_COLOR, CI, and redirected output, and enable virtual terminal processing only when the selected stream is really an interactive console, so FORCE_COLOR still produces ANSI when output is redirected. - Report gateway and sign-in recovery state in clawctl status, alongside the Node.js version recorded at setup. - Keep a successful clawctl pwsh silent so the user reaches the shell prompt. - Persist the pre-reset report and include it in collect-logs, instead of printing a log path the user has to find. Values are built with Paragraph.Append rather than interpolated into markup, because package paths and error messages contain characters Spectre would otherwise parse as markup. Verified with the managed suite, static analysis, and the NativeAOT scenario driver, which now renders through Spectre ahead of time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f472f437-3ee7-41f3-a501-81ae01590103
c74c314 to
e75e356
Compare
Summary
clawctloperations from presentation with semantic result records--no-color,NO_COLOR,FORCE_COLOR, CI, and redirected streamsReview
A committed-range code review found and fixed three user-visible issues before publication:
setup --no-isolationnow reports that Node.js was installed in the host rather than an isolated sessionRegression coverage was added for each issue.
Validation
Validated at
62779b686ca5f3f6be5253675a4c8776590e0a3c:.\scripts\Test-DotNetQuality.ps1dotnet test .\OpenClaw.Gateway.MSIX.slnx --configuration Release --no-restore— 667 passed.\scripts\Test-NativeAotCli.Tests.ps1— 14 NativeAOT scenarios passed