Skip to content

fix(onboard): display port override hint in dashboard port conflict error#2498

Open
makeittotop wants to merge 4 commits intoNVIDIA:mainfrom
makeittotop:main
Open

fix(onboard): display port override hint in dashboard port conflict error#2498
makeittotop wants to merge 4 commits intoNVIDIA:mainfrom
makeittotop:main

Conversation

@makeittotop
Copy link
Copy Markdown

@makeittotop makeittotop commented Apr 27, 2026

Summary

When preflight fails because port 18789 is already bound by an unrelated process, the error message now surfaces both env var overrides so users can pick an alternative port without having to stop the conflicting process. Previously the error only suggested killing the blocker, with no mention of the documented override mechanism.

Related Issue

Fixes #2497

Changes

  • src/lib/onboard.ts: after the port conflict detail line, print a (pick one) block with NEMOCLAW_DASHBOARD_PORT=<N> and CHAT_UI_URL=http://127.0.0.1:<N> alternatives — guarded by port === DASHBOARD_PORT so it only appears for dashboard port conflicts, not gateway port conflicts.

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
  • 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)

Notes:

AI Disclosure

  • AI-assisted — tool: Claude Code

Signed-off-by: Abhishek Pareek makeittotop@users.noreply.github.com

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced onboarding guidance for dashboard port conflicts: when the dashboard port is unavailable, onboarding now provides explicit recovery steps, including how to set an alternative dashboard port via the environment variable (e.g., NEMOCLAW_DASHBOARD_PORT=) and rerun onboarding to resolve the issue.

…rror

Signed-off-by: Abhishek Pareek <makeittotop@users.noreply.github.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 27, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

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: 2120b7a6-dc4b-45f5-ac61-37ff6a3ac81c

📥 Commits

Reviewing files that changed from the base of the PR and between 6df800a and afa0f54.

📒 Files selected for processing (1)
  • src/lib/onboard.ts

📝 Walkthrough

Walkthrough

The preflight port-conflict error now adds a dashboard-specific remediation hint when the blocked port equals DASHBOARD_PORT, instructing users to set NEMOCLAW_DASHBOARD_PORT=<N> and re-run onboarding; other port-conflict reporting remains unchanged. (≤50 words)

Changes

Cohort / File(s) Summary
Preflight port-check
src/lib/onboard.ts
When a port conflict is detected for DASHBOARD_PORT, append an additional dashboard-specific suggestion to set NEMOCLAW_DASHBOARD_PORT and retry; otherwise retain existing conflict reporting and process details.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I sniffed a port and found it blocked at last,
A tiny hint I planted, quick and fast.
"Set NEMOCLAW_DASHBOARD_PORT" I cheerfully wrote,
Restart onboarding — watch it float! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the primary change: adding a port override hint to the dashboard port conflict error message during onboarding.
Linked Issues check ✅ Passed The PR implements one of the requested mitigations from issue #2497 by surfacing environment-variable overrides (NEMOCLAW_DASHBOARD_PORT) in the preflight error for dashboard port conflicts.
Out of Scope Changes check ✅ Passed All changes are scoped to addressing the dashboard port conflict error messaging; no unrelated modifications were introduced.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/lib/onboard.ts`:
- Around line 3346-3351: The suggested message is misleading because the
port-availability check still uses DASHBOARD_PORT; either update the hint text
or make preflight honor CHAT_UI_URL. Fix by parsing CHAT_UI_URL (extract
hostname:port) and setting the port variable used in the port-availability loop
(the same variable currently compared to DASHBOARD_PORT/port) before the loop
runs, or change the console.error lines to clarify that only
NEMOCLAW_DASHBOARD_PORT controls the port used by preflight while CHAT_UI_URL
only points the UI—adjust the code that uses port/DASHBOARD_PORT and the printed
guidance accordingly (look for the port variable, DASHBOARD_PORT constant and
the port-availability loop in onboard.ts).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1cb8eaee-79f1-4f8c-a5c7-dfb2bcb6be86

📥 Commits

Reviewing files that changed from the base of the PR and between 8c20905 and 0c44e5b.

📒 Files selected for processing (1)
  • src/lib/onboard.ts

Comment thread src/lib/onboard.ts
makeittotop and others added 2 commits April 26, 2026 20:27
CHAT_UI_URL is not read until sandbox creation (step 6/8) and does not
affect the DASHBOARD_PORT constant checked during preflight. Only
NEMOCLAW_DASHBOARD_PORT overrides the preflight check. Remove the
misleading alternative to avoid blocking users who follow it.
@wscurran wscurran added bug Something isn't working NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). enhancement: ui Use this label to identify requests to improve NemoClaw web interface. labels Apr 27, 2026
@wscurran
Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this pull request that proposes a way to fix a bug and enhance the UI by displaying port override hints in the dashboard port conflict error. This identifies a bug and proposes a change to improve the user experience by providing a clearer solution to the issue.

Related open issues:


Related open issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement: ui Use this label to identify requests to improve NemoClaw web interface. NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Onboard] Preflight fails on fresh install when port 18789 is held by an unrelated process; no port override available

2 participants