Skip to content

feat(cli): categorize /help into General/Model/Session/Git groups - #44

Merged
shauryagangrade merged 1 commit into
shauryagangrade:mainfrom
aryansk:feat/cli/categorized-help
Aug 14, 2026
Merged

feat(cli): categorize /help into General/Model/Session/Git groups#44
shauryagangrade merged 1 commit into
shauryagangrade:mainfrom
aryansk:feat/cli/categorized-help

Conversation

@aryansk

@aryansk aryansk commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #31 — groups the /help slash-command listing into General, Model, Session, and Git categories so the growing command set stays scannable.

Changes

  • gcode/cli.py_print_help now emits categorized group headers with Rich markup (rendered by the existing RichUI.infoconsole.print path); no command was dropped or reworded.
  • tests/test_cli.py — regression test asserting all four category headers plus a representative command per group appear in the help text.

Why

The flat command list has grown past a dozen entries; grouping by usage area makes discovery faster without changing any command behavior.

Validation

  • pytest: 26/26 pass
  • ruff check + ruff format --check: clean
  • mypy + bandit: clean

Group the slash-command help listing by category (General, Model,
Session, Git) so long command lists stay scannable, and keep the
Rich markup rendering via the existing console.print path.

Closes shauryagangrade#31

@shauryagangrade shauryagangrade left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Review

Nice, tight change — all 12 commands preserved, Rich markup renders correctly (verified via a real console.print), 26/26 tests pass, ruff/mypy/bandit clean. The new test covers all four group headers plus a representative command each.

Two docs items to close before merge:

  1. Demo snapshot (stale): demo/make_demo.py:229-237 hardcodes the old flat /help output — the recorded demo will disagree with real output after this lands. Repo convention keeps it in sync (e.g. commit 9e39fbe). Please update it, and check demo/demo.tape regenerates cleanly.
  2. CHANGELOG (missing): this is a user-visible feature — add an entry under CHANGELOG.md Unreleased > Added.

Minor nit: /setup under "Session" is defensible but could equally be "Model"; fine either way.

@shauryagangrade
shauryagangrade marked this pull request as ready for review August 14, 2026 10:06
@shauryagangrade
shauryagangrade merged commit 4803c6b into shauryagangrade:main Aug 14, 2026
6 checks passed
@shauryagangrade

Copy link
Copy Markdown
Owner

@aryansk

aryansk commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review and for merging this. Both docs items are noted and remain outstanding on the merged tree: the demo/make_demo.py snapshot still hardcodes the old flat /help output, and CHANGELOG.md Unreleased has no entry for the categorized help (nor one for the non-interactive execute_bash fix in #43). I'll submit a small follow-up PR that adds both CHANGELOG entries and refreshes the demo snapshot so the recorded output matches the current command output.

shauryagangrade added a commit that referenced this pull request Aug 14, 2026
docs: add CHANGELOG entries for #43/#44 and sync demo /help snapshot
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.

[Improvement]: Improve /help with categorized command groups

2 participants