Add launch_app section to complete onboarding wizard#75
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
launch_app()section inaai_cli/onboard/sections.py: Starts the dev server for apps scaffolded bybuild_path, with graceful handling for non-interactive mode and user declinationWizardContext.scaffolded:build_pathnow stores the target directory returned byrun_init, enablinglaunch_appto know what to start_launch()to publiclaunch_app()inaai_cli/commands/init.py: Renamed from private to public since the wizard now calls it directly as its final step (previously only called internally byrun_init)run_initlaunch flow: Changed to always setlaunch=Falseand let the wizard handle launching vialaunch_appinstead, preventing the dev server from blocking mid-wizard--allow-existingflag touv venvinaai_cli/init/runner.py: Makes environment setup idempotent soassembly devcan safely re-run setup in an existing project without failinglaunch_apppaths (skipped when nothing scaffolded, non-interactive hints, user declination, successful launch with/without uv, and failure handling)aai_cli/onboard/wizard.py: Callslaunch_appas the final section after all other setup completestests/test_onboard_wizard.py: Verifieslaunch_appruns last in the section sequenceImplementation Details
launch_apprespects theinteractiveproperty of the prompter: non-interactive runs print a hint command instead of blocking on the dev serverCLIErrorandtyper.Exitexceptions from the launcher, returningFAILEDwith a helpful fallback command_ScriptedPromptertest helper now tracksnotesto verify hint messages are shown in appropriate scenarioshttps://claude.ai/code/session_01WGxwhWEjerUKMUKXXXatES