fix(explain): show help when positional arg passed without qualifier flag#127
Merged
fix(explain): show help when positional arg passed without qualifier flag#127
Conversation
…flag Previously, `entire explain abc123` would silently ignore the positional argument. Now it shows a hint and help text, guiding users to use --checkpoint, --session, or --commit flags. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Entire-Checkpoint: 6de70163f7e3
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the explain command to show a helpful hint plus the help/usage text when a user provides a positional argument without specifying what kind of entity (--checkpoint, --session, or --commit) they intended to explain.
Changes:
- Detects positional args passed to
entire explainwithout qualifier flags and prints a hint + help output. - Adds a unit test asserting hint-to-stderr and help-to-stdout behavior for the positional-arg case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/entire/cli/explain.go | Adds logic to show a hint and help when positional args are provided without qualifier flags. |
| cmd/entire/cli/explain_test.go | Adds a unit test validating the new hint + help behavior. |
Address Copilot review: reject positional arguments with a custom validator that provides a helpful hint about the correct flags to use. This handles all cases including `explain abc123 --checkpoint def456`. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
gtrrz-victor
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--checkpoint,--session, or--commitflagentire explain abc123would silently do nothingTest plan
entire explain abc123now shows hint + help🤖 Generated with Claude Code
Note
Low Risk
Low risk CLI UX change:
explainnow errors on unexpected positional args and adds a guidance hint; core explain logic and data handling are unchanged.Overview
entire explainnow rejects positional arguments and returns a clearer error that includes a hint to use--checkpoint,--session, or--commitinstead of silently doing nothing.Adds a unit test (
TestExplainCmd_RejectsPositionalArgs) covering multiple arg orderings to ensure the new validation and hint remain in place.Written by Cursor Bugbot for commit 0cc044c. This will update automatically on new commits. Configure here.