Skip to content

Simplify the quit-with-running-sites dialog and add a settings home for it#4125

Closed
shaunandrews wants to merge 2 commits into
trunkfrom
simplify-quit-sites-dialog
Closed

Simplify the quit-with-running-sites dialog and add a settings home for it#4125
shaunandrews wants to merge 2 commits into
trunkfrom
simplify-quit-sites-dialog

Conversation

@shaunandrews

@shaunandrews shaunandrews commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Designed collaboratively in a Claude Code session (dialog copy and interaction explored against several alternatives), then implemented and ported to trunk by Claude. All changes reviewed by @shaunandrews.

Proposed Changes

The first time a new user quits Studio with a running site, they hit a native dialog that asks them to configure a three-way policy ("Keep running" / "Auto-start" / "Stop") explained by a bullet-list legend in the body text — a heavy, confusing decision at the exact moment they've decided to leave. And its "Don't ask again" checkbox wrote a preference that no UI exposed, so one click made the choice permanent.

This PR reframes the dialog as a single question the buttons can answer directly:

"Keep your sites running?"Keep running (default) or Stop sites, with the running sites' names in the message so the stakes are concrete (falling back to a count when names are long or there are more than two).

  • Stopping now means auto-start later. The dialog's "Stop sites" maps to stop-and-restart-on-next-launch, which is what most people quitting an app expect. The hard "stop and stay stopped" option lives in Settings for those who want it.
  • "Don't ask again" became "Remember my choice", and the preference now has a home: a "When quitting with running sites" setting (Ask every time / Keep sites running / Stop, restart on next launch / Stop sites) in both the legacy renderer's Preferences tab and the agentic UI's Settings. Choosing "Ask every time" brings the dialog back — the checkbox is no longer a one-way door.
  • A dev-only menu item (Studio menu → "Show Quit Dialog (dev only)") previews the dialog without quitting or persisting anything, using real running-site names or sample names when nothing is running.

No migration needed: the stored preference and its semantics are unchanged; existing saved choices (including auto-start) are honored as before.

image image image

Testing Instructions

  1. Run a dev build, open the Studio app menu → Show Quit Dialog (dev only) to preview the dialog (works with or without running sites; choice is logged, not applied).
  2. With a site running and no saved preference, quit Studio — the new dialog appears. Keep running leaves the site served after quit; Stop sites stops it and the site starts again on next launch.
  3. Check Remember my choice with either button, relaunch, and confirm Settings shows the saved value — legacy UI: Settings → Preferences; agentic UI (ENABLE_AGENTIC_UI=true): Settings.
  4. Set the setting back to Ask every time and confirm the dialog returns on quit.
  5. Set it to Stop sites and confirm quitting stops sites without a dialog and they stay stopped on relaunch.

⚠️ Visual change: needs human review in light + dark mode (settings selects in both UIs).

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

🤖 Generated with Claude Code

shaunandrews and others added 2 commits July 8, 2026 12:54
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fredrikekelund

Copy link
Copy Markdown
Contributor

@shaunandrews, I didn't realize you had a PR for this (I didn't see anything in STU-1908). I put out #4140 this morning. Given that this PR is still in draft, I will go ahead and close it in favor of the other PR. Let me know if I'm missing anything

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