Skip to content

fix(cli): hide NIM status line for cloud-only providers#2622

Merged
cv merged 1 commit into
mainfrom
fix/2605-status-hide-nim-cloud
Apr 28, 2026
Merged

fix(cli): hide NIM status line for cloud-only providers#2622
cv merged 1 commit into
mainfrom
fix/2605-status-hide-nim-cloud

Conversation

@laitingsheng

@laitingsheng laitingsheng commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

nemoclaw <name> status and the post-onboard dashboard printed NIM: not running even when the sandbox was provisioned against a Cloud API provider (e.g. nvidia-prod), where no local NIM container is ever expected. The line implied a fault when none existed and confused users on otherwise healthy cloud-API setups.

The output now suppresses the NIM line when the sandbox has no nimContainer registered and no orphan NIM container is running. A still-running container with no registered binding is surfaced intentionally so an unexpectedly alive NIM is not silently hidden.

Related Issue

Closes #2605

Changes

  • src/lib/nim.ts: add shouldShowNimLine(nimContainer, nimRunning) predicate alongside the other NIM helpers; returns true iff the sandbox is bound to a NIM container or one is unexpectedly alive.
  • src/nemoclaw.ts: gate the status-block NIM print on the new helper. The nimStatus lookup itself is preserved so orphan detection still fires.
  • src/lib/onboard.ts: gate the post-onboard dashboard NIM print on the same helper, so the same UX problem doesn't reappear right after nemoclaw onboard.
  • src/lib/nim.test.ts: truth-table coverage for the helper — cloud-only (null / undefined / ""), bound, and orphan-running cases.

Verification before/after on a Cloud API sandbox:

  • Before: Provider: nvidia-prod ... NIM: not running (misleading)
  • After: NIM line absent; OpenClaw / Sandbox status unchanged

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes (3 new tests in nim.test.ts)
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

AI Disclosure

  • AI-assisted — tools: Claude Code, Codex

Signed-off-by: Tinson Lai tinsonl@nvidia.com

Summary by CodeRabbit

  • New Features

    • NIM status information now displays conditionally in dashboard output. The status line appears only when a NIM container is present or when an unexpected running container is detected, reducing unnecessary clutter.
  • Tests

    • Added comprehensive test coverage for the new conditional display behavior across multiple deployment scenarios.

## Summary

`nemoclaw <name> status` and the post-onboard dashboard printed
"NIM: not running" even when the sandbox was provisioned against a
Cloud API provider (e.g. nvidia-prod), where no local NIM container
is ever expected. The line implied a fault when none existed and
confused users on otherwise healthy cloud-API setups.

The output now suppresses the NIM line when the sandbox has no
nimContainer registered and no orphan NIM container is running.
A still-running container with no registered binding is surfaced
intentionally so an unexpectedly alive NIM is not silently hidden.

## Related issues

Closes #2605

## Changes

- src/lib/nim.ts: add `shouldShowNimLine(nimContainer, nimRunning)`
  predicate alongside the other NIM helpers; returns true iff the
  sandbox is bound to a NIM container or one is unexpectedly alive.
- src/nemoclaw.ts: gate the status-block NIM print on the new helper.
- src/lib/onboard.ts: gate the post-onboard dashboard NIM print on
  the same helper for consistent UX across both surfaces.
- src/lib/nim.test.ts: truth-table coverage for the helper —
  cloud-only (null/undefined/empty), bound, and orphan cases.

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2d54deda-40a0-407b-bde1-2a4418ee62a6

📥 Commits

Reviewing files that changed from the base of the PR and between 8b216ea and bce9fcd.

📒 Files selected for processing (4)
  • src/lib/nim.test.ts
  • src/lib/nim.ts
  • src/lib/onboard.ts
  • src/nemoclaw.ts

📝 Walkthrough

Walkthrough

A new exported helper function shouldShowNimLine is introduced to determine whether the NIM status line should be displayed based on container presence and running state. This function is then applied conditionally in two dashboard output locations to suppress misleading NIM status messages when NIM is not applicable.

Changes

Cohort / File(s) Summary
Helper Function & Tests
src/lib/nim.ts, src/lib/nim.test.ts
Introduces shouldShowNimLine function that returns true if a NIM container exists or NIM is running. Includes test coverage for three scenarios: absent container with false flag, explicit container binding, and orphaned running containers.
Dashboard Output
src/lib/onboard.ts, src/nemoclaw.ts
Conditionally displays NIM status line/section using the new shouldShowNimLine predicate instead of always printing, suppressing output when NIM is not configured and not running.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A little helper hops along,
Deciding what should sing and what should shrug,
No NIM? No worry! The dashboard's song
Now knows when silence fits the cloud-bound rug! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately summarizes the main change: introducing a predicate to hide the misleading NIM status line for cloud-only providers, which is the primary objective.
Linked Issues check ✅ Passed PR fully implements the fix for issue #2605: suppresses the NIM line when no container is registered and none is running, while preserving visibility of orphan containers as required.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue: new helper function, test coverage, and conditional display logic in status outputs. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/2605-status-hide-nim-cloud

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

@cv cv merged commit a5352aa into main Apr 28, 2026
18 checks passed
@wscurran wscurran added bug Something fails against expected or documented behavior NemoClaw CLI labels Apr 28, 2026
@miyoungc miyoungc mentioned this pull request Apr 29, 2026
13 tasks
miyoungc added a commit that referenced this pull request Apr 29, 2026
## Summary
Refreshes the 0.0.29 documentation for user-facing changes merged in the
past 24 hours. Version metadata stays on `0.0.29`.

## Changes
- `docs/get-started/quickstart.md`, `docs/reference/commands.md`, and
`docs/reference/troubleshooting.md`: Document dashboard port
auto-allocation, `--control-ui-port`, and `nemoclaw list` dashboard URL
output from [#2411](#2411).
- `docs/inference/inference-options.md` and
`docs/inference/switch-inference-providers.md`: Document local Ollama
and local vLLM credential isolation from `OPENAI_API_KEY` from
[#2580](#2580).
- `docs/inference/inference-options.md`: Document Local NVIDIA NIM
validation behavior from
[#2505](#2505).
- `docs/reference/commands.md`: Document the cloud-only NIM status
display behavior from
[#2622](#2622).
- `docs/deployment/deploy-to-remote-gpu.md`: Clarify runtime propagation
for `NEMOCLAW_PROXY_HOST` and `NEMOCLAW_PROXY_PORT` from
[#2581](#2581).
- `docs/workspace/backup-restore.md`: Document snapshot restore symlink
handling for sandbox data paths from
[#2488](#2488).
- `docs/reference/commands.md`: Document `skill install --help` and
OpenClaw plugin-shaped directory guidance from
[#2585](#2585).

## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
- [x] `npx prek run --all-files` passes
- [ ] `npm test` passes
- [ ] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [x] Docs updated for user-facing behavior changes
- [x] `make docs` builds without warnings (doc changes only)
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

## AI Disclosure
- [x] AI-assisted — tool: Codex

---
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
  * Added `--control-ui-port` flag for explicit dashboard port control
* Implemented automatic port selection (18789–18799) when the default
port is occupied
* Clarified that local inference routes (Ollama, local vLLM) don't
require `OPENAI_API_KEY`
  * Improved dashboard URL display in list and status commands
  * Enhanced symlink handling in workspace backup restoration
  * Updated multi-sandbox quickstart and troubleshooting guidance

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
DemianHeyGen pushed a commit to DemianHeyGen/NemoClaw that referenced this pull request Apr 30, 2026
## Summary

`nemoclaw <name> status` and the post-onboard dashboard printed `NIM:
not running` even when the sandbox was provisioned against a Cloud API
provider (e.g. `nvidia-prod`), where no local NIM container is ever
expected. The line implied a fault when none existed and confused users
on otherwise healthy cloud-API setups.

The output now suppresses the NIM line when the sandbox has no
`nimContainer` registered and no orphan NIM container is running. A
still-running container with no registered binding is surfaced
intentionally so an unexpectedly alive NIM is not silently hidden.

## Related Issue

Closes NVIDIA#2605

## Changes

- `src/lib/nim.ts`: add `shouldShowNimLine(nimContainer, nimRunning)`
predicate alongside the other NIM helpers; returns true iff the sandbox
is bound to a NIM container or one is unexpectedly alive.
- `src/nemoclaw.ts`: gate the status-block NIM print on the new helper.
The `nimStatus` lookup itself is preserved so orphan detection still
fires.
- `src/lib/onboard.ts`: gate the post-onboard dashboard NIM print on the
same helper, so the same UX problem doesn't reappear right after
`nemoclaw onboard`.
- `src/lib/nim.test.ts`: truth-table coverage for the helper —
cloud-only (`null` / `undefined` / `""`), bound, and orphan-running
cases.

Verification before/after on a Cloud API sandbox:
- Before: `Provider: nvidia-prod ... NIM: not running` (misleading)
- After: NIM line absent; OpenClaw / Sandbox status unchanged

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification

- [x] `npx prek run --all-files` passes
- [x] `npm test` passes (3 new tests in `nim.test.ts`)
- [x] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the style guide (doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

## AI Disclosure

- [x] AI-assisted — tools: Claude Code, Codex

---
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* NIM status information now displays conditionally in dashboard output.
The status line appears only when a NIM container is present or when an
unexpected running container is detected, reducing unnecessary clutter.

* **Tests**
* Added comprehensive test coverage for the new conditional display
behavior across multiple deployment scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
DemianHeyGen pushed a commit to DemianHeyGen/NemoClaw that referenced this pull request Apr 30, 2026
## Summary
Refreshes the 0.0.29 documentation for user-facing changes merged in the
past 24 hours. Version metadata stays on `0.0.29`.

## Changes
- `docs/get-started/quickstart.md`, `docs/reference/commands.md`, and
`docs/reference/troubleshooting.md`: Document dashboard port
auto-allocation, `--control-ui-port`, and `nemoclaw list` dashboard URL
output from [NVIDIA#2411](NVIDIA#2411).
- `docs/inference/inference-options.md` and
`docs/inference/switch-inference-providers.md`: Document local Ollama
and local vLLM credential isolation from `OPENAI_API_KEY` from
[NVIDIA#2580](NVIDIA#2580).
- `docs/inference/inference-options.md`: Document Local NVIDIA NIM
validation behavior from
[NVIDIA#2505](NVIDIA#2505).
- `docs/reference/commands.md`: Document the cloud-only NIM status
display behavior from
[NVIDIA#2622](NVIDIA#2622).
- `docs/deployment/deploy-to-remote-gpu.md`: Clarify runtime propagation
for `NEMOCLAW_PROXY_HOST` and `NEMOCLAW_PROXY_PORT` from
[NVIDIA#2581](NVIDIA#2581).
- `docs/workspace/backup-restore.md`: Document snapshot restore symlink
handling for sandbox data paths from
[NVIDIA#2488](NVIDIA#2488).
- `docs/reference/commands.md`: Document `skill install --help` and
OpenClaw plugin-shaped directory guidance from
[NVIDIA#2585](NVIDIA#2585).

## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
- [x] `npx prek run --all-files` passes
- [ ] `npm test` passes
- [ ] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [x] Docs updated for user-facing behavior changes
- [x] `make docs` builds without warnings (doc changes only)
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

## AI Disclosure
- [x] AI-assisted — tool: Codex

---
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
  * Added `--control-ui-port` flag for explicit dashboard port control
* Implemented automatic port selection (18789–18799) when the default
port is occupied
* Clarified that local inference routes (Ollama, local vLLM) don't
require `OPENAI_API_KEY`
  * Improved dashboard URL display in list and status commands
  * Enhanced symlink handling in workspace backup restoration
  * Updated multi-sandbox quickstart and troubleshooting guidance

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@wscurran wscurran added the VDR Linked to VDR finding label May 11, 2026
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: ui Web UI, terminal display, visual layout, or UX behavior bug-fix PR fixes a bug or regression feature PR adds or expands user-visible functionality and removed NemoClaw CLI bug Something fails against expected or documented behavior feature PR adds or expands user-visible functionality labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: ui Web UI, terminal display, visual layout, or UX behavior bug-fix PR fixes a bug or regression VDR Linked to VDR finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS][CLI&UX] nemoclaw status shows misleading "NIM: not running" when using Cloud API inference

3 participants