Skip to content

Conversation

@akirk
Copy link
Member

@akirk akirk commented Jan 21, 2026

Based on #3155.

Motivation for the change, related issues

When a plugin breaks a Personal Playground WordPress site, users need a way to recover. This adds a Health Check recovery option that enables troubleshooting mode, disabling all plugins so users can identify the problematic one.

Screenshots

Screenshot 2026-01-22 at 04 30 53 Screenshot 2026-01-22 at 04 31 30

Implementation details

  • health-check-recovery.ts: Blueprint that installs Health Check plugin and an MU-plugin to bypass hash verification, enabling troubleshooting mode
  • getBlueprintUrl(): Encodes blueprints as base64 data URLs for easy sharing
  • Recovery section in PersistentPlaygroundOverlay with expandable "Install Health Check & Troubleshoot" button

Testing Instructions (or ideally a Blueprint)

  1. Run npm run dev and visit http://127.0.0.1:5401
  2. Open the menu (grid icon) and scroll to "Recovery" section
  3. Click "you can troubleshoot" to reveal the recovery button
  4. Click "Install Health Check & Troubleshoot"
  5. Verify it installs Health Check and lands on plugins page in troubleshooting mode

@akirk akirk force-pushed the persistent/enable-persistent-deployment branch from 2899417 to c278f6e Compare January 21, 2026 16:24
@akirk akirk force-pushed the persistent/health-check-recovery branch from fcb299c to 5dfd325 Compare January 21, 2026 16:25
@akirk akirk changed the title Add Health Check recovery for persistent sites [website] Add Health Check recovery for persistent sites Jan 21, 2026
@akirk akirk force-pushed the persistent/health-check-recovery branch from 5dfd325 to de5b08e Compare January 21, 2026 18:02
akirk added 4 commits January 21, 2026 19:10
Add infrastructure for persistent WordPress sites that survive browser
sessions:

- Add virtual:website-defaults Vite plugin for build-time configuration
  (defaultStorageType, defaultSiteSlug, defaultBlueprintUrl)
- Create PersistentBrowserChrome component with separate styling
- Create PersistentPlaygroundOverlay with "More Playgrounds" link and
  "Start over" delete functionality
- Add persistent-playground module for blueprint loading
- Track lastUrl in SiteMetadata to restore user position on return
- Auto-login for persistent sites when returning
- Persist site metadata to OPFS on creation
- Run both dev servers in parallel (port 5400 standard, 5401 persistent)
- Use "default" site slug to keep URLs clean

This is a foundational PR for persistent deployment. Multi-tab
coordination, pending URL blueprints, and other advanced features
will be added in subsequent PRs.
- Use JustViewport directly in PersistentBrowserChrome instead of
  accepting children (no keep-alive needed for OPFS-backed sites)
- Handle seamless display mode for persistent sites
- Simplify site slug/name derivation using nullish coalescing
Enable applying blueprints to existing persistent sites via URL params
like ?plugin=friends or ?blueprint-url=data:...

- Add PendingUrlBlueprint interface and state to slice-sites
- Add resolveUrlParamsForExistingSite to detect actionable URL params
- Store pending blueprint when returning to existing default site
- Merge pending blueprint steps into boot blueprint
- Clear pending blueprint and URL params after successful boot
@akirk akirk force-pushed the persistent/enable-persistent-deployment branch from 90b5665 to eeb8f50 Compare January 21, 2026 18:14
@akirk akirk force-pushed the persistent/health-check-recovery branch from de5b08e to 1baf5fd Compare January 21, 2026 18:14
akirk added 5 commits January 21, 2026 20:54
- Rename personal-* folders and components to personalwp-*
- Rename variables: defaultSiteSlug -> personalWPSiteSlug,
  isPersonalMode -> isPersonalWPMode,
  shouldUsePersonalBlueprint -> shouldUsePersonalWPBlueprint
- Rename PendingUrlBlueprint -> BlueprintResolvedFromUrl with
  siteSlug -> targetSiteSlug for clarity
- Apply lastUrl persistence to all sites (not just storage !== none)
- Restrict URL param clearing to PersonalWP only and also clear hash
This ensures the PersonalWP components are not included in the
playground.wordpress.net bundle, only loaded when needed.
Add BootSiteClientOptions interface with:
- clearUrlAfterBlueprintApplied: clears URL params and hash after boot
- autoLogin: enables auto-login when WordPress is already installed

This removes the implicit dependency on personalWPSiteSlug inside the
function and makes the behavior explicit at the call site.
- Mode: personal -> personalwp, personal-development -> personalwp-development
- Blueprint: personal-boot.json -> personalwp-boot.json
- Cache dir: packages-playground-website-personal -> packages-playground-website-personalwp
- Config: personalWebsiteDevServerPort -> personalwpWebsiteDevServerPort
@akirk akirk force-pushed the persistent/health-check-recovery branch from 1baf5fd to 9676f6f Compare January 22, 2026 03:10
@akirk akirk changed the title [website] Add Health Check recovery for persistent sites [website] Personal Playground: Add Health Check recovery Jan 22, 2026
akirk added 10 commits January 22, 2026 13:54
Keep personal-wp as a fully separate package without modifying
the original playground-website codebase.
- Remove unused opfsMountDescriptor variable in site-info-panel
- Reorder imports to top of file in vite.config.ts
When a plugin breaks the persistent WordPress site, users can now
recover by installing the Health Check plugin in troubleshooting mode.

- Add health-check-recovery.ts with blueprint that installs Health Check
  and an MU-plugin to bypass hash verification
- Add Recovery section to PersistentPlaygroundOverlay with toggle button
- getBlueprintUrl encodes blueprints as base64 data URLs for easy sharing
@akirk akirk force-pushed the persistent/health-check-recovery branch from 6192b58 to 30ade19 Compare January 22, 2026 14:41
@akirk akirk force-pushed the persistent/enable-persistent-deployment branch from 2a32bba to fd63f4c Compare January 23, 2026 03:41
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