Fix 'Spinner is already running' error when creating sites via CLI#3093
Merged
Conversation
The dependency-update spinner in runCommand() was started but never stopped on the success path. Under ora, a second start() was a no-op; under picospinner (STU-1473), it throws. Report success after updateServerFiles() and ensure the catch path also clears the spinner.
Collaborator
📊 Performance Test ResultsComparing 4eb2ba3 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
bcotrim
approved these changes
Apr 14, 2026
bcotrim
left a comment
Contributor
There was a problem hiding this comment.
Thanks for catching the error!
LGTM 👍
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.
Related issues
How AI was used in this PR
AI assisted with tracing the bug to its two contributing commits (
27a1545bintroduced the unbalancedreportStart;e3c99cf8made it observable by swapping ora for picospinner) and drafting the fix.Proposed Changes
apps/cli/commands/site/create.ts, therunCommand()dependency-check block calledlogger.reportStart(CHECKING_DEPENDENCY_UPDATES, …)but never called a matchingreportSuccesson the happy path. Under ora, a secondstart()was a no-op; under picospinner, it throwsSpinner is already running., failingsite createwith a confusing error.logger.reportSuccess(__('Dependencies up to date'))afterupdateServerFiles()resolves.logger.reportError(error, false)in development (non-fatal, stops spinner) and a silentlogger.reportSuccess(…, true)in production so the spinner is always cleared before the nextreportStart.Testing Instructions
npm run cli:buildnode apps/cli/dist/cli/main.mjs site create --path ~/Studio/test-site-new✔ Dependencies up to datefollowed by✔ Site configuration validated— noSpinner is already running.error.npm test -- apps/cli/commands/site/tests/create.test.ts --run— 46/46 pass.Pre-merge Checklist