Repository navigation
Closed
Labels
Description
Problem
The onboarding wizard's PATH step (app-lib/src/commands/onboarding.rs, src/lib/components/onboarding/onboarding-wizard.svelte) makes assumptions about how and where NodeSpace is installed:
- A silent no-op reported as success.
configure_pathappends the export to~/.zshrcand~/.bash_profileonly when the file already exists (append_path_to_filereturnsOk(false)for a missing file), ignores that result, and setspath_configured = true. On a Mac with neither file the wizard shows success andnodespacestays off PATH. - It does not check reality. "Already configured" is a text search of those two files (
file_contains_nodespace_path), not whethernodespaceresolves. With the Homebrew cask,nodespaceis already linked into/opt/homebrew/binand the step is still offered.skill_setup::check_cli_on_pathexists and answers the real question, but the step never uses it. The step is unconditional (steps.push('path')). - Two files only. The installer script also writes
.bashrcand.profile; detection and writing both ignore them, so a user of the installer script can get a second, duplicate export. Other shells are not covered. - No restart notice. A new PATH reaches new shells only. An already-running terminal or agent session still cannot find
nodespace, and the wizard does not say so.
Expected
- The step reports what it actually wrote: which file changed, or that nothing could be written and why.
- When no rc file exists for the user's login shell, it creates the right one for that shell (
SHELL), rather than reporting success. - The step is offered only when
nodespacedoes not resolve on the user's login-shell PATH; when it already does (Homebrew, the installer script), it says so and moves on. - Detection and writing cover the same set of files, so a second run never duplicates the line.
- On success it says that open terminals and agent sessions need restarting.
Scope
configure_path,append_path_to_file,file_contains_nodespace_path,check_onboarding_status: derive state from the real PATH and report written / unchanged / failed per file- wizard PATH step: skip or confirm-only when the CLI already resolves; show the written files and the restart note
- remove the PATH export on uninstall for every file it may have been written to (
remove_path_from_filealready exists for two) - tests: missing rc file, rc file present, line already present, CLI already on PATH, shell is not zsh/bash
Verify
On a user account with no ~/.zshrc: the wizard creates it, reports it, and a new terminal resolves nodespace. With the cask installed, the step does not ask to change anything. Running the step twice leaves one export line.
Activity
Keep the daemon running after the window closes; make the PATH step r…