Skip to content

fix: resolve 8 CLI quality issues found during audit#8

Merged
MiniMax-AI-Dev merged 1 commit intomainfrom
fix/cli-bugs-polish
Mar 31, 2026
Merged

fix: resolve 8 CLI quality issues found during audit#8
MiniMax-AI-Dev merged 1 commit intomainfrom
fix/cli-bugs-polish

Conversation

@ryanlee666
Copy link
Copy Markdown
Collaborator

Summary

  • Quota HUD box misalignment — no-color mode rendered [███....] brackets (2 extra cols) not accounted for in the box width formula; fix moves barVisLen before W so the box is sized to the actual content
  • Quota HUD suppressed by global configquota show now reads flags.output (explicit --output flag only) instead of config.output, so the rich HUD shows in TTY even when the user has output: json in config.yaml
  • User-Agent hardcoded to 0.1.0 — now reads CLI_VERSION env var with correct fallback (0.3.1)
  • Status bar printed on every request — added statusBarPrinted module-level flag; the brand bar now prints once per process
  • handleError JSON detection inconsistent — replaced ad-hoc !isTTY check with detectOutputFormat(), consistent with the rest of the CLI
  • Wrong API name in descriptiontext chat said "Anthropic Messages API"; corrected to "MiniMax Messages API"
  • Group help misalignmentprintChildren now collects all leaf paths first and aligns the description column to the longest full path (fixes video task get indented further than siblings)
  • Dev-journal comments in production code — removed // --- Phase 4 --- markers and ❄️ 暂时雪藏 emoji from registry/login

Test plan

  • minimax quota show --output text --no-color — all rows flush with the box borders
  • minimax quota show with output: json in config.yaml — rich HUD still shows in TTY
  • minimax quota show --output json — JSON output still works
  • minimax video --helpvideo generate, video task get, video download descriptions are left-aligned
  • minimax text chat --help — description reads "MiniMax Messages API"
  • Multiple-request command (e.g. video generate with polling) — brand status bar appears only once
  • minimax unknowncmd in a TTY — human-readable error; with MINIMAX_OUTPUT=json — JSON error

🤖 Generated with Claude Code

- quota show: fix box misalignment in no-color mode ([] brackets
  were 2 cols wider than the W formula assumed; move barVisLen calc
  before W so the box is sized to fit the actual content)
- quota show: ignore config-file output setting so the rich HUD is
  shown in TTY even when the user has `output: json` globally
- http: fix User-Agent version hardcoded to 0.1.0; now reads
  CLI_VERSION env var with correct fallback
- http: print the brand status bar only once per process instead of
  on every request
- errors/handler: replace ad-hoc JSON detection with detectOutputFormat
  so error format is consistent with the rest of the CLI
- text/chat: fix description — "Anthropic Messages API" → "MiniMax"
- registry: fix group help alignment — printChildren now collects all
  leaf paths first and aligns description column to the longest path
  (fixes `video task get` being indented further than siblings)
- auth/login, registry: remove dev-journal comments from production code
- package.json, main.ts: sync version fallback to 0.3.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@MiniMax-AI-Dev MiniMax-AI-Dev merged commit 59b5fa9 into main Mar 31, 2026
2 checks passed
@MiniMax-AI-Dev MiniMax-AI-Dev deleted the fix/cli-bugs-polish branch April 2, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants