Skip to content

refactor(onboard): extract dashboard access helpers#3307

Merged
cjagwani merged 11 commits into
refactor/onboard-gateway-bootstrapfrom
refactor/onboard-dashboard-access
May 13, 2026
Merged

refactor(onboard): extract dashboard access helpers#3307
cjagwani merged 11 commits into
refactor/onboard-gateway-bootstrapfrom
refactor/onboard-dashboard-access

Conversation

@cv

@cv cv commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extract dashboard access URL and guidance helpers out of the large onboarding module. This continues the onboarding cleanup stack by isolating dashboard chain resolution, URL/token handling, WSL host detection, and guidance text generation.

Changes

  • Add src/lib/onboard/dashboard-access.ts for dashboard forward target/port resolution, start command generation, authenticated URL construction, display redaction, WSL host lookup, access entries, and guidance lines.
  • Update src/lib/onboard.ts to delegate dashboard access helpers through wrappers that preserve existing defaults and exports.
  • Add unit tests covering forward target/port derivation, OpenShell command construction, token redaction, WSL host detection, WSL access entries, and WSL/empty-access guidance.

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)

Signed-off-by: Carlos Villela cvillela@nvidia.com

@cv cv self-assigned this May 9, 2026
@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

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: Enterprise

Run ID: 31cca676-aad7-49b5-9731-20201b75ce55

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 refactor/onboard-dashboard-access

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

@copy-pr-bot

copy-pr-bot Bot commented May 9, 2026

Copy link
Copy Markdown

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.

@cv cv marked this pull request as draft May 9, 2026 03:25
@cv cv added the v0.0.39 label May 9, 2026
@wscurran wscurran added refactor PR restructures code without intended behavior change and removed v0.0.39 labels May 11, 2026
@cv cv added the v0.0.39 label May 11, 2026
@cv cv added v0.0.40 and removed v0.0.39 labels May 12, 2026

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clean 1:1 extraction, behavior parity holds through the wrappers. lgtm once #3306 lands.

couple of nits, none blocking:

  • getDashboardForwardStartCommand throws if openshellShellCommand isn't passed but the type marks it optional via Parameters<...>. the onboard.ts wrapper always injects it so prod is fine, but the type lies about the runtime contract. either make the field required on the options type or import it directly in the module.
  • inside printDashboard (onboard.ts:9710) there's a local var named dashboardAccess that shadows the new module import. not a bug today but a footgun. rename the local to something like accessEntries.
  • getWslHostAddress now bails to null if runCapture isn't injected — fine in practice since the wrapper injects it, but worth a jsdoc note so external callers don't get confused.
  • test gaps: no coverage for the throw path or the fetchGatewayAuthToken injection path. easy to add later.

approving as part of the stack — feel free to address in a follow-up.

@cjagwani cjagwani marked this pull request as ready for review May 13, 2026 04:44
@cjagwani cjagwani merged commit 5f6db8a into refactor/onboard-gateway-bootstrap May 13, 2026
13 checks passed
@cjagwani cjagwani self-assigned this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants