feat(mosaic): unified first-run UX wizard -> gateway install -> verify #418
Reference in New Issue
Block a user
Delete Branch "feat/mosaic-first-run-ux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements M7 (CU-07-01 through CU-07-04) of the CLI unification mission.
CU-07-01 install.sh handoff
Adds --yes and --no-auto-launch flags to tools/install.sh. On first install with an interactive TTY, automatically launches mosaic wizard followed by mosaic gateway install before the summary. Non-interactive or --no-auto-launch prints guidance text only. MOSAIC_ASSUME_YES=1 env var equivalent to --yes.
CU-07-02 wizard / gateway install coordination
Wizard writes a transient session state file to $XDG_RUNTIME_DIR/mosaic-install-state.json (0600 perms) at completion, containing wizardCompletedAt and mosaicHome. Gateway install reads this on startup; if fresh (under 10 min), announces the resumed session and applies mosaicHome for custom-home installs. State is cleared on successful gateway install. The transient file is the only bridge -- no permanent coupling.
CU-07-03 post-install verification
New packages/mosaic/src/commands/gateway/verify.ts exports runPostInstallVerification(host, port) which runs three checks: gateway /health endpoint (3 retries with 1s backoff, retries non-OK responses to handle startup races), admin token on file (reads meta.json), and /api/bootstrap/status reachability. Prints a checkmark summary with recovery hints on failure. Called at the tail of runInstall. Also registered as mosaic gateway verify standalone subcommand.
CU-07-04 e2e test harness
New tools/e2e-install-test.sh runs the full install flow in a clean node:22-alpine Docker container. Skips gracefully if Docker is unavailable. The gateway verify step self-reports as EXPECTED-SKIP when the installed CLI version pre-dates the verify command (expected until next publish).
Quality gates