Skip to content

[#573] Separate install wizard from server launch#574

Merged
realproject7 merged 2 commits intomainfrom
task/573-separate-install-launch
Apr 27, 2026
Merged

[#573] Separate install wizard from server launch#574
realproject7 merged 2 commits intomainfrom
task/573-separate-install-launch

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Split npx quadwork init flow into two distinct phases: install (init) and launch (start)
  • cmdInit() now exits after prerequisites + config instead of starting the server — ends with "run npx quadwork start"
  • Smart default: npx quadwork with no subcommand runs start for returning users (config exists), init for fresh installs
  • Eliminates the AC startup race condition (25-50s install no longer blocks agent registration)

Changes

  • bin/quadwork.js: Removed server startup from cmdInit() (−87 lines), replaced with setup-complete banner
  • bin/quadwork.js: Added undefined case to command switch for smart default dispatch

Test plan

  • npx quadwork init on fresh install runs wizard, installs AC, does NOT start server
  • Wizard ends with "Setup complete! Run npx quadwork start" banner
  • npx quadwork start launches server + AC + agents normally
  • npx quadwork with existing config → runs start behavior
  • npx quadwork without config → runs init wizard
  • npx quadwork init with existing config → re-runs wizard (force)

Fixes #573

🤖 Generated with Claude Code

Split `npx quadwork` into two distinct phases:
- `init`: runs prerequisites check, AC install, writes config, then exits
  with instruction to run `npx quadwork start`
- `start`: launches server + AC + agents (unchanged)

Smart default when no subcommand given: existing config with projects
runs `start`; fresh install runs `init`.

Fixes #573

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Owner Author

@realproject7 realproject7 left a comment

Choose a reason for hiding this comment

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

RE2 review — PR #574 (#573)

Checked the diff against the issue's acceptance criteria:

Criterion Status
npx quadwork on fresh install → wizard only, no server ✅ Server launch + SIGINT handler + browser-open removed from cmdInit
Wizard completes all installation before finishing ✅ AC clone/venv/pip still run in earlier steps; only the launch was removed
Wizard ends with clear "run npx quadwork start" instruction ✅ New banner says "Setup complete!" with npx quadwork start next step
npx quadwork start launches server + AC + agents cmdStart is unchanged
npx quadwork with existing config → start behavior ✅ New case undefined checks cfg.projects.length > 0cmdStart()
npx quadwork init always runs wizard case "init" unchanged — always calls cmdInit()

readConfig fallback is safe — returns { projects: [] } when no config exists, so the smart default correctly routes fresh installs to cmdInit().

default case change is correct — previously if (command) process.exit(1) let undefined fall through with exit 0 (print help). Now undefined has its own case, so default can unconditionally process.exit(1) for unknown commands.

No issues found. Clean separation, net -55 lines, no behavioral regressions for existing init/start/stop paths.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES

Summary

This change removes the init-time server launch, but it does not add any alternate path for a fresh install to reach the dashboard and create its first project.

Findings

  • [high] Fresh-install onboarding is now blocked after npx quadwork init.
    • File: bin/quadwork.js:1301, bin/quadwork.js:1346, bin/quadwork.js:1563, bin/quadwork.js:2158
    • Suggestion: preserve a path from fresh install into the dashboard setup flow, and make the no-subcommand default key off config existence / installation state rather than projects.length > 0.
    • Details: cmdInit() now writes only the global config + port and exits with “run `npx quadwork start`”. But cmdStart() still treats the zero-project state as the place where the user must create a project from the setup page, and the new smart default routes npx quadwork back into init whenever projects.length === 0. On a fresh install that means the user can no longer reach /setup automatically, and after completing init they are sent to a start path that was not the default selected for that same state.

Decision

Requesting changes because the PR strands first-time users before project creation, which violates the issue acceptance criteria for fresh installs.

After init writes config with 0 projects, `npx quadwork` must route to
`start` (not back to `init`) so users can reach /setup to create their
first project. Use fs.existsSync(CONFIG_PATH) instead of checking
projects array length.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

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

Verdict: APPROVE

Summary

The follow-up fixes the onboarding regression from the first revision. A true fresh install still runs init, while a post-init zero-project state now routes npx quadwork into start so the operator can reach the dashboard setup flow.

Findings

  • None.

Decision

Approving because the split install/start flow now matches the issue intent without stranding first-time users.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Separate install wizard from server launch

2 participants