feat(cli): show a concrete example in the unknown sandbox action error - #6176
Conversation
Refs #755 Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds an "Example" line to the CLI's unknown-action error output, showing the ChangesUnknown action guidance
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
E2E Target RecommendationRequired E2E targets: None Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
PR Review Advisor (Nemotron Ultra) — No blocking findingsMerge posture: No blocking advisor findings This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
prekshivyas
left a comment
There was a problem hiding this comment.
LGTM. Clean refactor — the NATIVE_OCLIF_NAMESPACES set and helper split are strictly better. Test covers the golden path. PRA-T1 is non-blocking (test already satisfies the acceptance clause).
NVIDIA#6176) ## Summary The unknown-action error for sandbox commands listed the valid actions but no concrete example. This appends an example command that uses the sandbox name the user typed, e.g. `nemoclaw <name> connect`, satisfying the last unmet acceptance criterion in NVIDIA#755 (unknown sandbox actions should list valid actions *and* a concrete example). ## Related Issue Refs NVIDIA#755 ## Changes - `src/lib/cli/public-dispatch.ts`: the `unknownPublicAction` branch now prints ` Example: <cli> <name> connect` after the valid-actions list, matching the existing `Did you mean:` / command-order hint patterns already in that file. - `test/cli/unknown-sandbox-action.test.ts`: new test asserting an unknown sandbox action reports the valid actions and the concrete example. ## Type of Change - [x] Code change (feature, bug fix, or refactor) ## Quality Gates - [x] Tests added or updated for changed behavior - [x] Docs not applicable — justification: CLI error-output only; no user-facing docs affected. ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push - [x] Targeted tests pass for changed behavior - [x] No secrets, API keys, or credentials committed Ran: `npx @biomejs/biome check` (pass), `npm run typecheck` (pass), `npm run build:cli`, and `vitest run test/cli/unknown-sandbox-action.test.ts` (pass). --- Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved CLI guidance when an unknown sandbox action is entered. * The error message now includes a clearer example command, using the sandbox name when available. * Added test coverage to confirm the CLI shows the expected error, valid actions, and example usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com> Co-authored-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
Summary
The unknown-action error for sandbox commands listed the valid actions but no concrete example. This appends an example command that uses the sandbox name the user typed, e.g.
nemoclaw <name> connect, satisfying the last unmet acceptance criterion in #755 (unknown sandbox actions should list valid actions and a concrete example).Related Issue
Refs #755
Changes
src/lib/cli/public-dispatch.ts: theunknownPublicActionbranch now printsExample: <cli> <name> connectafter the valid-actions list, matching the existingDid you mean:/ command-order hint patterns already in that file.test/cli/unknown-sandbox-action.test.ts: new test asserting an unknown sandbox action reports the valid actions and the concrete example.Type of Change
Quality Gates
Verification
Verifiedin GitHubRan:
npx @biomejs/biome check(pass),npm run typecheck(pass),npm run build:cli, andvitest run test/cli/unknown-sandbox-action.test.ts(pass).Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com
Summary by CodeRabbit