Skip to content

fix(cli): render help at a fixed width regardless of terminal size - #312

Open
Jamie-BitFlight wants to merge 3 commits into
mainfrom
claude/pr-289-rebase-conflicts-xuyr0w
Open

Jamie-BitFlight wants to merge 3 commits into
mainfrom
claude/pr-289-rebase-conflicts-xuyr0w

Conversation

@Jamie-BitFlight

@Jamie-BitFlight Jamie-BitFlight commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #300.

Summary

skilllint check --help wrapped and truncated its output in narrow terminals. At 40 columns Rich rendered --platfo… and split Platform adapter. Choices: … across lines. The skill tells agents to read accepted platform names from that line, so a wrapped or truncated line loses information.

This applies the Typer app pattern already used by the skill scripts in claude_skills:

  • .agents/skills/daily-releases/scripts/cleanup_stale_releases.py
  • .agents/skills/receiving-pr-reviews/scripts/pr_review_threads.py
  • .claude/skills/create-merge-request-changelog/scripts/format_mr_description.py

The root Typer app in packages/skilllint/plugin_validator.py now sets:

context_settings={"terminal_width": 800},
rich_markup_mode=None,
pretty_exceptions_enable=False,
  • Typer's Rich help sizes itself from TERMINAL_WIDTH/COLUMNS and ignores Click's terminal_width. rich_markup_mode=None switches help to Click's plain formatter, which honours terminal_width.
  • pretty_exceptions_enable=False keeps tracebacks plain instead of Rich panels wrapped to the terminal width.

The platform help test now invokes check --help under COLUMNS=40 and asserts the whole Platform adapter. Choices: … line, replacing the per-choice workaround.

Verification

  • check --help at COLUMNS=40 and 80 prints --platform <str> Platform adapter. Choices: claude-code, codex, cursor on one line.
  • Root, check, rule, rules, docs and every docs subcommand --help render with no raw Rich markup (grep for [bold]-style tags: 0 hits).
  • The tightened test fails against main's plugin_validator.py and passes with the change.
  • uv run prek run --all-files passes; uv run pytest: 1904 passed, 14 skipped, with and without FORCE_COLOR=1.

Behaviour change

--help output changes from Rich panels to Click's plain layout, and uncaught exceptions print plain tracebacks. Command output (rules, rule, check reports) still uses Rich.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ

`check --help` wrapped and truncated the platform choices line in a
narrow terminal (40 columns cut "--platform" and the choices list).
Follow the daily-releases scripts' Typer pattern: set
context_settings={"terminal_width": 800} and rich_markup_mode=None on
the root app so Click renders plain, unwrapped help. Rich help sizes
itself from TERMINAL_WIDTH/COLUMNS and ignores terminal_width, so both
settings are needed. Tighten the platform help test to assert the full
choices line under COLUMNS=40.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 78d82998-1dda-47a7-b894-98f37c6f0931

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📊 Test Coverage Report

Coverage: 88.74%

📥 Coverage XML available as artifact: coverage-xml

Complete the Typer app pattern used by the daily-releases,
receiving-pr-reviews and create-merge-request-changelog skill scripts
in claude_skills: pretty_exceptions_enable=False alongside the fixed
terminal_width and rich_markup_mode=None, so tracebacks are plain and
not wrapped to the terminal width either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ

Jamie-BitFlight commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

claude-review fails on this PR (both 115ad56 and 9459353). Nothing points to this diff as the cause.

  • The job's Claude Code run ends about 0.4 s after init with is_error: true, total_cost_usd: 0, and empty modelUsage. It fails before any review happens.
  • The same check has failed on every claude-code-review.yml run since at least 12:13 UTC, including all 5 runs on refactor/283-extract-frontmatter-validators (refactor(validators): extract frontmatter validation subsystem #311).
  • Cause unverified. An earlier version of this comment said the cause was the action's credentials or model access. I had not checked that, and I have not confirmed it. The log hides the full output.

Separately, verified from anthropics/claude-code plugins/code-review/commands/code-review.md: the workflow's prompt /code-review:code-review <repo>/pull/<n> omits --comment, and the command stops without posting when --comment is absent. It also stops for draft PRs. So even successful runs of this workflow post nothing.


Generated by Claude Code

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Benchmark Results

🔴 Regression detected — threshold: 30%

scan-clean

Metric Base Compare Change
files_per_second 88.6 files/s 95.2 files/s ✅ +7.4%
scan_max_ms 11816.9 ms 10558.2 ms ✅ -10.7%
scan_mean_ms 11301.3 ms 10520.0 ms ✅ -6.9%
scan_min_ms 10986.7 ms 10483.6 ms ✅ -4.6%

scan-violations

Metric Base Compare Change
files_per_second 107.8 files/s 108.7 files/s ✅ +0.8%
scan_max_ms 1910.1 ms 1870.4 ms ✅ -2.1%
scan_mean_ms 1864.1 ms 1849.7 ms ✅ -0.8%
scan_min_ms 1829.2 ms 1822.1 ms ✅ -0.4%

fix-violations

Metric Base Compare Change
fix_files_per_second 157.5 files/s 321.3 files/s ✅ +104.0%
fix_max_ms 1294.3 ms 628.7 ms ✅ -51.4%
fix_mean_ms 1276.1 ms 625.6 ms ✅ -51.0%
fix_min_ms 1254.7 ms 622.7 ms ✅ -50.4%

cpu

Metric Base Compare Change
cpu_clean_mean_ms 0.5 ms 0.5 ms ✅ -8.8%
cpu_fix_mean_ms 1.4 ms 1.4 ms ✅ -4.3%
cpu_violations_mean_ms 0.5 ms 0.5 ms ✅ -3.7%

import

Metric Base Compare Change
import_package_max_ms 156.7 ms 344.4 ms 🔴 +119.7%
import_package_mean_ms 142.5 ms 207.6 ms 🔴 +45.7%
import_package_min_ms 133.2 ms 138.4 ms ➡️ +4.0%
import_rules_max_ms 219.4 ms 402.6 ms 🔴 +83.5%
import_rules_mean_ms 218.1 ms 285.0 ms 🔴 +30.7%
import_rules_min_ms 217.3 ms 224.0 ms ➡️ +3.0%

View benchmark history

Updated 2026-09-30 14:32 UTC

@Jamie-BitFlight
Jamie-BitFlight marked this pull request as ready for review September 30, 2026 14:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T14:29:11.679278Z 78e2df2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78e2df29b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/skilllint/plugin_validator.py
State why terminal_width is fixed, how Click uses it
(typer/_click/formatting.py), and that 800 matches the Typer apps in
claude_skills, per the repository's no-invented-constraints rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ
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