Skip to content

Conversation

@bcotrim
Copy link
Contributor

@bcotrim bcotrim commented Dec 24, 2025

Related issues

Proposed Changes

  • Add quit confirmation dialog when user quits Studio with running sites
  • Dialog offers two options: "Stop sites" or "Leave running"
  • "Remember my choice" checkbox saves preference to skip dialog on future quits
  • Store preference as stopSitesOnQuit boolean in user data (undefined = show dialog, true = stop, false = leave running)
  • Add getRunningSiteCount() helper function to track running sites
  • Conditionally stop servers on quit based on user preference

Testing Instructions

Happy Path

  • Start one or more sites, then quit Studio (Cmd+Q or close window)
  • Verify modal appears with "Stop sites" and "Leave running" buttons
  • Click "Stop sites" → verify sites stop, then app quits
  • Click "Leave running" → verify app quits but sites continue running (check with studio site list)

Remember Choice

  • Start a site, quit Studio, check "Remember my choice", click "Stop sites"
  • Start a site again, quit Studio → verify no dialog appears and sites stop
  • To reset: manually delete stopSitesOnQuit from ~/Library/Application Support/WordPress Studio/appdata-v1.json

Edge Cases

  • Quit with no running sites → no dialog should appear
  • CMD+Q keyboard shortcut respects modal behavior

Pre-merge Checklist

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

@bcotrim bcotrim self-assigned this Dec 24, 2025
@bcotrim bcotrim requested review from a team and fredrikekelund December 24, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants