Repository navigation
Description
Overview
After NodeSpace installs and nodespaced starts for the first time (#1179), show a one-time onboarding wizard that prompts the user to configure the three integration points: CLI PATH, Claude MCP, and Claude Code skill. Each step is opt-in and independent — users can skip any step and revisit later via #1181.
Problem Statement
After DMG install, three things need manual configuration for the full NodeSpace experience:
nodespaceCLI on$PATH— required for terminal use and agent access- MCP config in Claude desktop — gives Claude AI direct knowledge graph access
- Skill file for Claude Code — gives Claude Code CLI knowledge graph access during coding sessions
Without prompting, users have no idea these integrations exist or how to set them up.
Proposed Solution
A modal wizard shown once on first launch (after daemon is confirmed running). Three sequential prompt screens, each with a primary action button and a "Skip" option. Completion state stored in ~/.nodespace/config.json so the wizard never shows again.
Screen 1: PATH
"Add NodeSpace to your terminal?"
Usenodespacecommands directly from any terminal window.[Add to PATH] [Skip]
Writes export PATH="$HOME/.nodespace/bin:$PATH" to ~/.zshrc and ~/.bash_profile (whichever exist). Shows confirmation with instruction to open a new terminal.
Screen 2: MCP
"Connect NodeSpace to Claude?"
Gives Claude desktop direct access to your knowledge graph as AI tools.[Install MCP] [Skip]
Writes to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"nodespace": {
"command": "nodespace",
"args": ["mcp"]
}
}
}Only shown if Claude desktop is detected (~/Library/Application Support/Claude/ exists).
Screen 3: Skill
"Add NodeSpace to Claude Code?"
Lets Claude Code read and write your knowledge graph during coding sessions.[Add Skill] [Skip]
Writes SKILL.md to ~/.claude/skills/nodespace/SKILL.md. Only shown if ~/.claude/ exists.
Final screen
"You're all set!"
Shows summary of what was configured and what was skipped, with links to configure later via Settings → Integrations.
Acceptance Criteria
- Wizard shown exactly once on first launch after daemon is confirmed running
- Completion state persisted to
~/.nodespace/config.json— never shown again after completion or full skip - Screen 1: PATH — appends to
~/.zshrc/~/.bash_profileon confirmation; shows success confirmation - Screen 2: MCP — only shown if Claude desktop detected; writes correct
claude_desktop_config.jsonentry; handles existingmcpServersobject without overwriting other entries - Screen 3: Skill — only shown if
~/.claude/exists; writesSKILL.mdto correct path - Each screen has primary action + Skip; skipped steps recorded in config
- Summary screen shows what was set up vs skipped with link to Settings → Integrations
- All three actions idempotent — safe to run again from Settings without duplicating entries
-
bun run test:allpasses -
bun run quality:fixpasses
Technical Specifications
Reference Files
packages/desktop-app/src-tauri/src/main.rs— setup hook where wizard is triggered after daemon pingpackages/desktop-app/src/lib/components/onboarding/— new Svelte wizard componentspackages/desktop-app/src-tauri/src/commands/onboarding.rs— new Tauri commands for file writes (PATH append, MCP config write, skill write)~/.nodespace/config.json— persistsonboarding_completed: trueand per-step status
Config schema
{
"onboarding_completed": true,
"integrations": {
"path_configured": true,
"mcp_configured": false,
"skill_configured": true
}
}Detection logic (Tauri backend)
- Claude desktop: check
~/Library/Application Support/Claude/exists - Claude Code skill: check
~/.claude/exists - PATH already set: check if
~/.nodespace/binalready in$PATH
MCP config write (safe merge)
Read existing claude_desktop_config.json if present, merge nodespace into mcpServers object, write back. Never overwrite other MCP server entries.
Dependencies
- Bundle nodespaced and nodespace CLI in Tauri DMG with launchd agent registration #1179 (binaries on disk, daemon running — wizard triggered after daemon ping succeeds)
- Switch nodespaced IPC transport from TCP to Unix Domain Sockets #1176 (UDS socket — daemon must be reachable before wizard shows)
Related Issues
- Settings: Integrations panel for PATH and skill configuration #1181 (Settings → Integrations panel — persistent access to same actions post-onboarding)
Non-Goals
- Auto-detecting other agents beyond Claude desktop and Claude Code
- Homebrew / Windows installer integration
- Skill content authoring (SKILL.md content is pre-written, not user-editable here)
Activity
malibio commentedon May 19, 2026
Frontend baseline: 4 failed | 125 passed (129 files)
malibio commentedon May 19, 2026
Code Review — Issue #1180: First-Launch Onboarding Wizard
Reviewer: Principal Engineer (automated review)
Branch:
worktree-issue-1180-onboarding-wizardCommit:
4c66b1e2Files reviewed: 5 changed files, 860 lines added
Summary
This is a solid, well-scoped implementation of a first-launch onboarding wizard. The backend logic is idiomatic async Rust, the Svelte 5 component uses runes correctly, logging standards are followed throughout, and the MCP merge path correctly avoids clobbering existing server entries. All acceptance criteria are met functionally. Three issues require attention before merge — one Critical (process panic risk), one Important (missing user-facing error feedback), and several minor items.
Critical Issues
[Critical/Blocker]
configure_mcp: process panic ifclaude_desktop_config.jsonhas a non-object JSON rootpackages/desktop-app/src-tauri/src/commands/onboarding.rslines 155–171The command parses the existing Claude Desktop config with
serde_json::from_str, which succeeds for any valid JSON — including arrays ([]) or scalars. After parsing, the code attemptsroot["mcpServers"] = serde_json::json!({})usingserde_json'sIndexMuttrait. Whenrootis not aValue::Object,IndexMutwith a&strkey panics unconditionally in serde_json (it is explicitly documented to panic on non-Object values).The existing guard at line 166 (
root.get("mcpServers").map_or(false, |v| v.is_object())) protects the nested assignment but does not guard against a non-object root. If a user has ever hand-edited theirclaude_desktop_config.jsoninto an invalid-but-parseable form, invokingconfigure_mcpwill crash the Tauri process.Fix: Validate the root after parsing:
Important Issues
[Important] No user-facing error feedback when a step action fails
packages/desktop-app/src/lib/components/onboarding/onboarding-wizard.sveltelines 97–128All three
handleConfigure*functions catch errors withlog.error(...)and silently leave the UI unchanged. The user sees no indication that the action failed — the button stays enabled, the success banner never appears, and there is no error message. This violates basic UX contract: a user who clicks "Add to PATH" and gets a permissions failure has no way to know it didn't work.The fix is straightforward: add an
errorMessage = $state<string | null>(null)reactive variable, set it in the catch blocks, and render a dismissible error banner in the template alongside the success banner. TheisLoadingreset infinallyis already correct.Suggested Improvements
[Improvement] Double IPC call to
check_onboarding_statuson every launch with a brief render gappackages/desktop-app/src/lib/components/layout/app-shell.svelteline 202 andonboarding-wizard.svelteline 71app-shellinvokescheck_onboarding_statusto determine whether to show the wizard. The wizard then invokes the same command again inonMountto readshowMcp,showSkill, andpathAlreadyConfigured. This means two round-trips on every first launch. More practically, the wizard renders withshowMcp = falseandshowSkill = falseas defaults while the second async call is in-flight — causing the step-indicator dots to shift when the response arrives.The clean resolution is to pass the full status as a prop from
app-shelltoOnboardingWizardrather than re-fetching.app-shellalready has the fullOnboardingStatusobject in the.then()handler — it currently discards all fields exceptcompleted. Threading the full object as a prop eliminates the second IPC call and removes the transient render gap.[Improvement]
configure_pathsucceeds silently when neither~/.zshrcnor~/.bash_profileexistpackages/desktop-app/src-tauri/src/commands/onboarding.rslines 134–139If neither file exists, both
append_path_to_filecalls returnOk(false)(file not found, no-op). The command returnsOk(()), the frontend setspathDone = true, and the success banner tells the user "Added to~/.zshrcand/or~/.bash_profile" — which is false. On a macOS machine this is unlikely (zsh is the default shell and~/.zshrctypically exists), but the discrepancy is misleading.configure_pathalready returnsOk(())— consider returning a richer result type that indicates whether at least one file was modified, matching theappend_path_to_filereturn signature that already producesbool. The frontend can then distinguish "added" from "nothing to write to."[Improvement]
append_path_to_filereads the file twicepackages/desktop-app/src-tauri/src/commands/onboarding.rslines 87–96file_contains_nodespace_pathreads the file (line 75), and then if the guard passes,append_path_to_filereads it again at line 91. For a desktop shell config file this is functionally harmless, but it is two filesystem round-trips for content that was already in memory. Refactor to a single read: read once, check for the marker string, and conditionally append — eliminatingfile_contains_nodespace_pathas a separate function.Nitpicks
Nit:
onboarding-wizard.svelteline 384: ThestepSequencederived uses a wrapped IIFE$derived((() => { ... })()). This is technically valid —$derivedtracks reactive reads inside the synchronously-called IIFE — but$derived.by(() => { ... })is the idiomatic Svelte 5 form for a block body. Prefer$derived.byfor clarity.Nit:
onboarding-wizard.sveltelines 187, 191: ThestepSequence.indexOf(step)call inside the#eachloop is O(n) per iteration, making the total O(n²) for the step dots. With a maximum of 4 steps this is entirely inconsequential, but acurrentStepIndexderived variable would make the intent clearer.Nit:
onboarding.rsline 92: The function signature isasync fn file_contains_nodespace_path(path: &PathBuf). Prefer&Pathover&PathBufper Rust API guidelines —&PathBufcoerces to&Pathat call sites but&Pathis the more general and idiomatic borrow type.Nit:
onboarding-wizard.svelte: No tests are included for this component. The step progression logic, thestepSequencederived, and thepathWasAlreadyConfiguredbranch conditions are unit-testable withvi.mock('@tauri-apps/api/core'). Given the acceptance criteria requirebun run test:allto pass, this is not a blocker today, but the component has enough branching logic to warrant a test file before #1181 (Settings → Integrations) builds on top of it.Acceptance Criteria Verification
onboarding_completedgate incheck_onboarding_status~/.nodespace/config.jsoncomplete_onboardingcommand withserde(default)schema~/.claude/exists; writes to correct pathnodespacekey; Skill is an overwrite (safe)bun run test:allpassesbun run quality:fixpassesVerdict: Request Changes — the serde_json panic in
configure_mcpon a malformed-but-valid JSON root is a process-crash vector that must be fixed before merge. The missing error feedback in the UI is strongly recommended. All other items are improvements or nits that can be addressed now or tracked as follow-up.Add first-launch onboarding wizard for PATH, MCP, and skill setup (cl…