Clarify quit-sites dialog options and move auto-start to app.json - #3837
Conversation
📊 Performance Test ResultsComparing 9debe76 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) |
…p-sites-on-quit # Conflicts: # apps/studio/src/migrations/index.ts
nightnei
left a comment
There was a problem hiding this comment.
Tested different scenarios - it works like a charm ❤️
Briefly reviewed code, LGTM 👍 But would be good to have a review also from Fredrik, as he has better knowledge about this part of the codebase.
The copy also looks good, but I would propose a bit of an adjustment to somwthign like:
* Keep running — sites stay running after Studio closes.
* Auto-start — sites stop now and start again when you reopen Studio.
* Stop — sites stop now and stay stopped.
But up to you.
Thank Bernardo, for working and improving it ❤️
…p-sites-on-quit # Conflicts: # apps/studio/src/storage/storage-types.ts
…p-sites-on-quit # Conflicts: # apps/cli/commands/pull-reprint.ts # apps/studio/src/migrations/index.ts
…uit' into stu-1778-clarify-stop-sites-on-quit
|
@fredrikekelund please let me know if you have any feedback on this one, happy to address it in a follow-up. |
|
This is clearer for sure, but four buttons instead of three (plus the checkbox) is kind of a lot – especially considering how macOS changes the dialog appearance. I would call this dialog a bit overwhelming, tbh. I also think "Auto-start" is a bit of a misleading button label. Users need to read the description to understand what it means, or they'll mistake it for something else if they read only the button label.
I would run this by @shaunandrews for input. |
|
ooofa, yea, this isn't great. Thanks for the ping. Not only is there a lot of options (the cognitive overhead is through the roof), but the order and placement of options makes is very hard to process and choose. We need to simplify the copy and the layout. Instead of trying to explain every option in text, separate from their related button, we should present them in a better interface. A list of radio buttons is what comes to mind. I also think we'll need to make this a proper setting, so users can change it later. I created STU-1908 to track iterations one this. |
…4140) ## Related issues <!-- Link a related issue to this PR. If the PR does not immediately resolve the issue, for example, it requires a separate deployment to production, avoid using the "Fixes" keyword and use "Related to" instead. --> - Fixes STU-1908 ## How AI was used in this PR <!-- Help reviewers understand what to look for and verify that you've reviewed the code yourself. --> Codex executed the implementation based on detailed instructions from me, informed by @shaunandrews's design spec in STU-1908. ## Proposed Changes <!-- Explain the intent of this PR: - What problem does it solve, or what need does it address? - How does it affect the user (new capability, fix, performance, accessibility, etc.)? - Note any user-visible behavior changes or trade-offs. Focus on the "why" and the user impact. Avoid listing modified files or describing implementation mechanics — the diff already shows that. --> #3837 changed the dialog Studio displays when quitting with running sites to look like this: <img width="632" height="402" alt="611726748-9fe08097-aa05-4ec9-8770-04ac906d8b67" src="https://github.com/user-attachments/assets/664f3330-2d80-45b6-885c-385f1a6556bc" /> I argued in #3837 (comment) that this is too complex, and Shaun agreed. This PR changes the dialog to display a shorter text with fewer buttons again, along with a new dropdown in the Studio settings (and in the new agentic UI). | Dialog | Studio settings | Agentic UI settings | | - | - | - | | <img width="382" height="419" alt="Screenshot 2026-07-09 at 09 58 26" src="https://github.com/user-attachments/assets/cf6c7c76-c46b-4f4d-827b-cc98380b57e1" /> | <img width="1483" height="894" alt="Screenshot 2026-07-09 at 10 20 31" src="https://github.com/user-attachments/assets/8a8314be-ce73-4ffa-ac98-d3879dabfcf9" /> | <img width="1483" height="894" alt="Screenshot 2026-07-09 at 10 15 23" src="https://github.com/user-attachments/assets/5c6156dd-27a1-4cea-8b6c-e0ce7818f7d6" /> | ## Testing Instructions <!-- Add as many details as possible to help others reproduce the issue and test the fix. "Before / After" screenshots can also be very helpful when the change is visual. --> 1. Edit `~/.studio/app.json` and remove the `quitSitesBehavior` prop 2. `npm start` 3. Start at least one site 4. Quit Studio 5. Ensure that you see a dialog asking you what to do with the running sites 6. Pick one of the choices and ensure it works (sites are running or are stopped after the app closes) 7. `npm start` again 8. Open the Studio settings, ensure the new setting is there and works as expected (you can check `app.json` to verify that the setting is persisted) 9. `ENABLE_AGENTIC_UI=true npm start` 10. Click your profile name in the bottom left corner to open the settings view 11. Ensure the new setting is there and works as expected (you can check `app.json` to verify that the setting is persisted) ## Pre-merge Checklist <!-- Complete applicable items on this checklist **before** merging into trunk. Inapplicable items can be left unchecked. Both the PR author and reviewer are responsible for ensuring the checklist is completed. --> - [ ] Have you checked for TypeScript, React or other console errors? --------- Co-authored-by: Wojtek Naruniec <wojtek.naruniec@automattic.com> Co-authored-by: Wojtek Naruniec <wojtek@naruniec.me> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

Related issues
How AI was used in this PR
Used Claude Code to trace the quit / auto-start flow end to end, implement the new dialog, relocate the auto-start flag, and write the migration and tests. I reviewed the full diff, iterated on the dialog copy and button layout, and ran typecheck, lint, the unit suites, and manual verification.
Proposed Changes
When you quit Studio with running sites, the dialog used to offer a single Stop sites action — but it stopped the sites and then silently auto-restarted them on the next launch. So you'd ask to stop them, reopen Studio, and find them running again. Confusing enough that the team kept tripping over it (see the issue thread).
This replaces that one ambiguous action with three explicit choices, so what you pick is what you get:
It also moves the auto-start flag to where it conceptually belongs. Auto-start is a desktop-launch concern — only Studio's launch ever acts on it — yet it lived in CLI-owned config. It now lives in the desktop app's own storage, and the CLI no longer reads, writes, or accepts an auto-start flag. A one-time migration relocates the flag (and converts the old quit preference) for existing users, so nothing is lost on upgrade.
Known minor behavior change: starting a site from the CLI while Studio is closed no longer pre-flags it for auto-start (the site is running anyway, so nothing visible changes). Starting a site from the CLI while Studio is open is unaffected.
Testing Instructions
While Studio is closed, confirm site state with
node apps/cli/dist/cli/main.mjs site listor by visiting the site URL — not the Studio UI, which auto-starts sites on reopen.Pre-merge Checklist
npm run typecheckandeslintare clean; the CLI + Studio unit suites pass (incl. a new migration test).