Repository navigation
fix(cli): align call and resource help descriptions in one column - #523
KrasimirKralev wants to merge 1 commit into
Conversation
Size the call and resource help columns from their longest flag with a two-space gap, as the global help does, so --args/--params, --output and resource --no-oauth stop drifting off the column.
|
🦞👀 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 Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR aligns call and resource help descriptions using the longest flag and a two-space separator. Example: Run mcporter call --help.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: current main still has uneven help columns, and the focused patch fixes them without changing command behavior; no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe CLI routes help requests to command-specific printers, which turn flag labels and descriptions into terminal output before command execution. flowchart LR
A[CLI arguments] --> B[Help routing]
B --> C[Call help rows]
B --> D[Resource help rows]
C --> E[Shared column formatter]
D --> E
E --> F[Terminal output]
Technical reviewBest possible solution: Land the focused shared formatter and command-level regression coverage through ordinary repository review. Do we have a high-confidence way to reproduce the issue? Current-main strings establish the uneven columns, and the contributor supplies before-and-after output from both built CLI help commands; no target code was executed during this read-only review. Is this the best way to solve the issue? Longest-flag sizing fixes the formatting cause, preserves existing help content, and follows the merged global-help approach with a small helper shared by two command printers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against aa8d0c5ac6cd. 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 22, 2026, 2:29 AM ET / 07:29 UTC. |
What Problem This Solves
Fixes: in
mcporter call --helpandmcporter resource --help, some flag descriptions start outside the column the other rows use, so the reader has to work out where a flag ends and its description begins.call --help,--args, --params <json>starts its description 2 columns right of the rest of the Arguments block, and--output text|markdown|json|rawruns 10 columns past the Runtime flags block. Inresource --help, the four flags start at three different columns (38, 39, 40).listandauthkeep their own ad-hoc help widths.User Impact
User impact: every row in
call --helpandresource --helpnow starts its description in one column, two spaces after the longest flag, the rule the top-level help has used since #404. The only layout change is that the sharedcall --helpcolumn moves from 25 to 35 so that--output text|markdown|json|rawfits.Why This Change Was Made
formatHelpRows/helpFlagWidthhelper (src/cli/help-rows.ts) pads each flag to the longest flag in the help and adds a two-space gap.printCallHelppasses one width across Selectors, Arguments, Runtime flags and Ad-hoc servers, andprintResourceHelpuses the helper for its Flags block. The call-help rows are now[flag, description]tuples incall-help.ts.it.eachcase intests/cli-call-help.test.tsrunscall --helpandresource --helpthroughrunCliand requires every row before Examples to share one description column after a gap of at least two spaces. With the upstream help sources it fails for both commands (expected 3 to be 1); on this branch it passes (run 3 times).--helpof the root command andlist auth generate-cli inspect-cli emit-ts config daemon serve record replay resource callfound misaligned rows only incallandresource.pnpm checkpasses.pnpm test: 2,464 pass, and 8 fail intests/cli-generate-cli.integration.test.tsandtests/generate-cli.test.ts. Those 8 are Bun-compile cases that need Bun ≥ 1.4.4, and this machine has Bun 1.4.0; none of them touches help output.Evidence
call --helpandresource --help.pnpm buildof upstreamaa8d0c5and of this branch.node dist/cli.js call --helpandnode dist/cli.js resource --help, once on the upstream build and once on the branch build (Arguments, Runtime flags and resource Flags blocks shown).node dist/cli.jsoutput, every description in each block starts in the same column. Before the change, the description columns in the upstream build were 25/27 (Arguments), 25/35 (Runtime flags) and 38/39/40 (resource Flags).