Skip to content

fix(plugin): make /nemoclaw status reflect real onboard state#4053

Merged
ericksoa merged 2 commits into
NVIDIA:mainfrom
Dongni-Yang:fix/4010-slash-status-misleading
May 22, 2026
Merged

fix(plugin): make /nemoclaw status reflect real onboard state#4053
ericksoa merged 2 commits into
NVIDIA:mainfrom
Dongni-Yang:fix/4010-slash-status-misleading

Conversation

@Dongni-Yang
Copy link
Copy Markdown
Contributor

@Dongni-Yang Dongni-Yang commented May 22, 2026

Summary

  • /nemoclaw status in the OpenClaw TUI always printed "No operations performed yet. Run nemoclaw onboard to get started.", even after a successful onboard and a running sandbox. Root cause: slashStatus gated its output on state.lastAction, but nothing in production code ever calls saveState(), so that field is permanently null.
  • Derive the response from sources that are actually populated: loadOnboardConfig() (already used by /nemoclaw onboard) and the plugin config sandbox name. Keep the rebuild and migration-snapshot lines behind their state guards so a future blueprint runner that wires up saveState() picks them up automatically.

Refs #4010

Note: this PR addresses the misleading status output portion of #4010; subcommand autocomplete remains tracked on the issue.

Signed-off-by: Dongni Yang dongniy@nvidia.com

Test plan

  • npx vitest run (plugin) — 457/457 pass, including the updated status tests
  • npm run typecheck:cli and plugin tsc --noEmit
  • npx @biomejs/biome lint and format on touched files
  • Manual verification inside an onboarded sandbox: /nemoclaw status shows sandbox name, endpoint, provider, model, and onboarded timestamp instead of the misleading hint

Manual verification output

Verified on Ubuntu 20.04 / Docker 24.0.7 / OpenShell 0.0.39 against a sandbox built from this branch (6eb2d4e3f), reproducing the exact steps from #4010.

Sandbox plugin loaded the fix:

$ grep -c "No onboard configuration found" /sandbox/.openclaw/extensions/nemoclaw/dist/commands/slash.js
1
$ grep -c "No operations performed yet"     /sandbox/.openclaw/extensions/nemoclaw/dist/commands/slash.js
0

/nemoclaw status inside openclaw tui:

NemoClaw Status

Sandbox: openclaw
Endpoint: Managed Inference Route (inference.local)
Provider: NVIDIA Endpoints
Model: nvidia/nemotron-3-super-120b-a12b
Onboarded: 2026-05-22T06:48:41.153Z

Pre-fix the same command always returned "NemoClaw: No operations performed yet. Run nemoclaw onboard to get started." regardless of onboard state — confirmed gone.

Fallback path (no onboard config → "No onboard configuration found" hint) is exercised by the new unit test "reports the onboard hint when no onboard config exists" in nemoclaw/src/commands/slash.test.ts.

Security note

Endpoint is rendered via describeOnboardEndpoint, which already redacts URL userinfo and token/key/secret/auth/sig/credential/password query params. No new credential disclosure surface; the new slashStatus does not emit the credential env-var name (the existing slashOnboard already did and is unchanged).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

The PR refactors the /nemoclaw status slash command to load onboard configuration and derive sandbox details from the plugin API, returning onboarding-driven status (sandbox/endpoint/provider/model/onboarded) or a "no onboard configuration found" message, and conditionally appending rebuild/rollback metadata from state.

Changes

Status Command Onboarding-Driven Refactoring

Layer / File(s) Summary
Status handler implementation and API integration
nemoclaw/src/commands/slash.ts
handleSlashCommand now accepts api, imports include getPluginConfig, and slashStatus is refactored to load onboard config, derive sandboxName from getPluginConfig(api), render endpoint/provider/model/onboarded details, return "no onboard configuration found" when absent, and append rollback/rebuild info from loadState() when present.
Status command test suite
nemoclaw/src/commands/slash.test.ts
Adds a shared onboardConfig fixture and updates tests to cover missing onboard-config hint, detailed onboarding output with sandbox/endpoint/provider/model and onboarded timestamp, default sandbox fallback when plugin config is empty, and rebuild/rollback metadata assertions when present in loaded state.

Sequence Diagram(s)

sequenceDiagram
  participant TUI
  participant handleSlashCommand
  participant loadOnboardConfig
  participant getPluginConfig
  participant loadState
  TUI->>handleSlashCommand: /nemoclaw status
  handleSlashCommand->>loadOnboardConfig: load onboard config
  alt onboard config exists
    loadOnboardConfig-->>handleSlashCommand: onboardConfig
    handleSlashCommand->>getPluginConfig: getPluginConfig(api)
    getPluginConfig-->>handleSlashCommand: sandboxName
    handleSlashCommand->>loadState: loadState()
    loadState-->>handleSlashCommand: rebuild/rollback metadata
    handleSlashCommand-->>TUI: status with sandbox/endpoint/provider/model/onboarded (+ optional metadata)
  else onboard config missing
    loadOnboardConfig-->>handleSlashCommand: null
    handleSlashCommand-->>TUI: "no onboard configuration found"
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#3906: Changes loadOnboardConfig() semantics for empty/malformed config, which affects the "no onboard config available" path and status output.

Suggested labels

fix, NemoClaw CLI, Integration: OpenClaw

Suggested reviewers

  • ericksoa
  • cv

Poem

🐰 A status fix hops into view,
No more "run onboard"—real stats shine through!
Sandbox and model show their face,
Rebuilds and rollbacks find their place.
Hooray — the TUI hops with grace!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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
Title check ✅ Passed The title accurately describes the main change: fixing the /nemoclaw status command to reflect actual onboard state instead of showing a misleading generic message.
Linked Issues check ✅ Passed The PR directly addresses issue #4010 by fixing the status command to report actual onboard state (provider, sandbox, model, endpoint) and removing the misleading 'no operations' message, meeting the core coding requirements.
Out of Scope Changes check ✅ Passed All changes focus on fixing the status command implementation and its tests; no unrelated modifications are present outside the scope of addressing issue #4010.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

slashStatus gated all output on state.lastAction, which nothing in
production code ever writes to ~/.nemoclaw/state/nemoclaw.json. The
result was that /nemoclaw status in the OpenClaw TUI always printed
"No operations performed yet. Run nemoclaw onboard to get started."
even after a successful onboard and a running sandbox.

Derive the response from sources that are actually populated: the
onboard config (already used by /nemoclaw onboard) and the plugin
config sandbox name. Keep the rebuild and migration-snapshot lines
behind their state guards so a future blueprint runner that wires up
saveState() picks them up automatically.

Fixes NVIDIA#4010

Signed-off-by: Dongni Yang <dongniy@nvidia.com>
@Dongni-Yang Dongni-Yang force-pushed the fix/4010-slash-status-misleading branch from 267ee5f to 6eb2d4e Compare May 22, 2026 05:32
@Dongni-Yang Dongni-Yang added the v0.0.50 Release target label May 22, 2026
@Dongni-Yang
Copy link
Copy Markdown
Contributor Author

Manual verification — passed

Verified locally on Ubuntu 20.04 / Docker 24.0.7 / OpenShell 0.0.39 against a sandbox built from this branch (6eb2d4e3f).

Sandbox plugin loaded the fix

$ grep -c "No onboard configuration found" /sandbox/.openclaw/extensions/nemoclaw/dist/commands/slash.js
1
$ grep -c "No operations performed yet"     /sandbox/.openclaw/extensions/nemoclaw/dist/commands/slash.js
0

/nemoclaw status inside openclaw tui

NemoClaw Status

Sandbox: openclaw
Endpoint: Managed Inference Route (inference.local)
Provider: NVIDIA Endpoints
Model: nvidia/nemotron-3-super-120b-a12b
Onboarded: 2026-05-22T06:48:41.153Z

Pre-fix the same command always returned "NemoClaw: No operations performed yet. Run nemoclaw onboard to get started." regardless of onboard state — confirmed gone.

Endpoint string is rendered via describeOnboardEndpoint, which already redacts URL userinfo and credential-bearing query params, so no new credential disclosure risk.

@wscurran wscurran added fix NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). labels May 22, 2026
@wscurran
Copy link
Copy Markdown
Contributor

@wscurran wscurran removed the NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). label May 22, 2026
Copy link
Copy Markdown
Contributor

@ericksoa ericksoa left a comment

Choose a reason for hiding this comment

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

Approved. Independent adversarial review found the status-output code path sound; the only blocker was PR linkage auto-closing #4010 while autocomplete remains unresolved. I updated the PR body to use non-closing Refs language and will squash with a non-closing body. Checks are green on head f4ce62c.

@ericksoa ericksoa merged commit 13d8f71 into NVIDIA:main May 22, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix v0.0.50 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants