IUH-M03: Unified first-run wizard (collapse wizard + gateway install) #427
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Mission: install-ux-hardening-20260405
Milestone: IUH-M03
Branch: feat/unified-first-run
Agent tier: opus
Depends on: IUH-M02
Problem
mosaic wizardandmosaic gateway installare today two separate flows bridged by a 10-minute session file at$XDG_RUNTIME_DIR/mosaic-install-state.json(seepackages/mosaic/src/wizard.ts:17-34andpackages/mosaic/src/commands/gateway/install.ts:25-56). Works, but:tools/install.shauto-launches them sequentially, which amplifies the two-phase feelScope
Collapse both into a single cohesive first-run flow with shared in-memory state.
WizardStatethat includes gateway config + admin bootstrap; decide whether gateway install becomes a stage insiderunWizardor whether a new top-level orchestrator wraps bothrunWizardto invoke gateway install as the final stage(s); drop the session-file bridgemosaic gateway installmust still work as a standalone entry point for users who already went throughmosaic wizardtools/install.shauto-launch to invoke the single unified entry pointSuccess Criteria
tools/install.shon a fresh machine runs one cohesive wizard from welcome through admin user creationmosaic gateway installstandalone still works (idempotent resume)Files to touch
packages/mosaic/src/wizard.ts— add gateway stagespackages/mosaic/src/stages/gateway-config.ts(new) — extracted fromrunConfigWizardpackages/mosaic/src/stages/gateway-bootstrap.ts(new) — extracted frombootstrapFirstUserpackages/mosaic/src/commands/gateway/install.ts— become a thin standalone wrappertools/install.sh— single auto-launch callpackages/mosaic/src/types.ts— extendWizardState