Skip to content

Add launch_app section to complete onboarding wizard#75

Merged
alexkroman merged 3 commits into
mainfrom
claude/trusting-euler-f6u0zj
Jun 11, 2026
Merged

Add launch_app section to complete onboarding wizard#75
alexkroman merged 3 commits into
mainfrom
claude/trusting-euler-f6u0zj

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Summary

Extends the onboarding wizard to launch the scaffolded app as its final step, allowing users to start developing immediately after setup completes. The dev server blocks until Ctrl-C, so this must run last to avoid blocking earlier wizard sections.

Key Changes

  • New launch_app() section in aai_cli/onboard/sections.py: Starts the dev server for apps scaffolded by build_path, with graceful handling for non-interactive mode and user declination
  • Track scaffolded app path via WizardContext.scaffolded: build_path now stores the target directory returned by run_init, enabling launch_app to know what to start
  • Promote _launch() to public launch_app() in aai_cli/commands/init.py: Renamed from private to public since the wizard now calls it directly as its final step (previously only called internally by run_init)
  • Update run_init launch flow: Changed to always set launch=False and let the wizard handle launching via launch_app instead, preventing the dev server from blocking mid-wizard
  • Add --allow-existing flag to uv venv in aai_cli/init/runner.py: Makes environment setup idempotent so assembly dev can safely re-run setup in an existing project without failing
  • Comprehensive test coverage: Added 5 new tests covering all launch_app paths (skipped when nothing scaffolded, non-interactive hints, user declination, successful launch with/without uv, and failure handling)
  • Update wizard orchestration in aai_cli/onboard/wizard.py: Calls launch_app as the final section after all other setup completes
  • Update wizard test in tests/test_onboard_wizard.py: Verifies launch_app runs last in the section sequence

Implementation Details

  • launch_app respects the interactive property of the prompter: non-interactive runs print a hint command instead of blocking on the dev server
  • Handles both CLIError and typer.Exit exceptions from the launcher, returning FAILED with a helpful fallback command
  • The _ScriptedPrompter test helper now tracks notes to verify hint messages are shown in appropriate scenarios
  • Maintains the wizard's existing error handling and output patterns

https://claude.ai/code/session_01WGxwhWEjerUKMUKXXXatES

…sting .venv

Two bugs hit when scaffolding a voice agent through `assembly onboard`:

1. The wizard scaffolded with launch=False (so the blocking dev server
   wouldn't cut off the remaining sections) but then never launched the
   app at all. build_path now records the scaffolded directory on the
   WizardContext, and a new launch_app section — ordered last because
   the server blocks until Ctrl-C — offers to start the dev server and
   open the browser, with a `cd <app> && assembly dev` hint when
   declined or non-interactive. init's `_launch` is made public as
   `launch_app` so the wizard reuses the same launch path.

2. `assembly dev` inside a scaffolded project failed with "A virtual
   environment already exists at `.venv`. Use `--clear` to replace it":
   init had already created .venv, and current uv refuses to re-create
   it. The uv setup path now runs `uv venv --allow-existing` so
   re-running setup reuses the venv (the stdlib `python -m venv` path
   already did).

https://claude.ai/code/session_01WGxwhWEjerUKMUKXXXatES
@alexkroman alexkroman enabled auto-merge (squash) June 11, 2026 22:30
@alexkroman alexkroman merged commit 5b404bc into main Jun 11, 2026
8 checks passed
@alexkroman alexkroman deleted the claude/trusting-euler-f6u0zj branch June 11, 2026 22:38
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.

2 participants