Skip to content

refactor(cli): extract list and status handlers#1545

Merged
cv merged 1 commit intocv/extract-openshell-helpersfrom
cv/extract-list-status-handlers
Apr 7, 2026
Merged

refactor(cli): extract list and status handlers#1545
cv merged 1 commit intocv/extract-openshell-helpersfrom
cv/extract-list-status-handlers

Conversation

@cv
Copy link
Copy Markdown
Contributor

@cv cv commented Apr 6, 2026

Summary

Extract the top-level list and status command handlers from bin/nemoclaw.js into a typed module under src/lib/inventory-commands.ts.

Why

This continues the #924 follow-through by shrinking the monolithic dispatcher and moving command logic into reusable typed modules.

Changes

  • add src/lib/inventory-commands.ts with:
    • listSandboxesCommand()
    • showStatusCommand()
  • add focused tests in src/lib/inventory-commands.test.ts
  • reduce bin/nemoclaw.js to thin wrappers that inject legacy dependencies

Testing

  • npm run build:cli
  • npx vitest run src/lib/inventory-commands.test.ts test/cli.test.js
  • npx vitest run --project cli

Stack

Depends on #1544 (refactor(cli): extract OpenShell command helpers). Once that merges, this PR can be retargeted to main.

Relates to #924.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 6, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f34157b3-6afc-4e81-8d47-c4fb45a19784

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cv/extract-list-status-handlers

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

@cv cv requested a review from brandonpelfrey April 6, 2026 23:59
@cv cv merged commit ad61a30 into cv/extract-openshell-helpers Apr 7, 2026
9 checks passed
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