Repository navigation
fix(cli): show the command list in clickclack help, -h and --help - #319
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 maintainer review before merge. What this changesAdds a command list to Example: A user runs
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current CLI discoverability gap with a focused change; no actionable correctness or security findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Go binary dispatches server commands directly and sends client commands and root help flags through the client flag parser, which produces terminal help. flowchart TD
A[CLI arguments] --> B[Root dispatcher]
B --> C[Server commands]
B --> D[Client flag parser]
D --> E[Shared usage printer]
D --> F[Client commands]
E --> G[Terminal stderr]
Technical reviewBest possible solution: Land the shared usage printer and help dispatch with the accompanying regression test and documentation. Do we have a high-confidence way to reproduce the issue? Current-main dispatch and flag setup establish both reported paths, corroborated by the contributor's before-and-after binary transcript; no target code was run during this review. Is this the best way to solve the issue? The existing flag parser owns the fix, and one usage printer handles both flag help and the help command without adding another dispatch layer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f7e3ad188c81. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 10:29 AM ET / 15:29 UTC. |
2308e64 to
11403ed
Compare
steipete
left a comment
There was a problem hiding this comment.
Reviewed the help dispatch, regression test, and documentation; exact-head CI is green.
What Problem This Solves
Fixes:
clickclack --help(and-h) prints only the client flag set, with no list of commands, andclickclack helpfails withunknown command "help".serve,migrate,admin,login,messages listand the rest from the binary itself; the command list only exists indocs/cli.md.serve --help,admin bootstrap --help) and the bad-flag path are untouched;--bogusstill exits 2 as before.User Impact
User impact:
clickclack help,clickclack -handclickclack --helpnow print the same command listdocs/cli.mddocuments, followed by the client flags, and exit 0.docs/agent-friendly-cli.mdalready promises that "-hand--helpalways show help".Why This Change Was Made
The root client flag set had no
Usagefunction, so Go's default printedUsage of clickclack:plus the flags, and the client dispatcher had nohelpcase. The fix sets oneprintUsageon that flag set (command block +PrintDefaults) and routeshelpto it. Help goes to stderr, like every other-hin this binary (Go'sflagdefault).docs/cli.mdgains the two commands its block was missing (version,help) and one sentence naming the help entry points; the CHANGELOG has one line under## Unreleased. A regression test inapps/api/cmd/clickclack/client_config_test.godrivesrunArgswithhelp(fails onmainwithunknown command "help", passes here).Evidence
clickclackhelp shows no commands;clickclack helpis rejected.upstream/mainf7e3ad1 and from this branch withgo build -o <scratch>/clickclack ./cmd/clickclack, isolatedXDG_CONFIG_HOME../clickclack help,./clickclack --help,./clickclack -h,./clickclack --bogus, each on themainbuild and on the branch build.clickclackbinary,help,-hand--helpprint the command list and the client flags and exit 0; onmainhelpexits withunknown command "help". An unknown flag still exits 2 on both builds. Inapps/api,gofmt -landgo vet ./cmd/clickclack/are clean andgo test ./... -count=1passes.--bogus.