Skip to content

[Website] Give failed Blueprint runs an explicit recovery path - #4099

Merged
adamziel merged 1 commit into
trunkfrom
blueprint-run-failure-recovery
Jul 21, 2026
Merged

[Website] Give failed Blueprint runs an explicit recovery path#4099
adamziel merged 1 commit into
trunkfrom
blueprint-run-failure-recovery

Conversation

@adamziel

@adamziel adamziel commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Builds on #4134.

A stored Blueprint can fail before its first WordPress file copy completes. The old error dialog could be dismissed, leaving a loading screen that could never finish.

This PR makes the error dialog the recovery screen. It keeps the specific failure reason and offers two explicit actions:

  • Edit Blueprint opens the Blueprint editor so the input can be corrected.
  • Return to your last Playground discards the failed run and restores the Playground that launched it.

If that Playground no longer exists, the second action starts a new one instead. Seamless mode omits the editor and makes the return action primary.

The dialog cannot be closed with an X, Escape, or an outside click. Close does not secretly navigate. Private repository authentication may cover it temporarily; the recovery dialog returns when authentication closes.

Reloading an interrupted run also stops before booting WordPress again. It keeps the return target and does not delete the partial files behind the user's back.

Desktop before Desktop after
Before: an unavailable release dialog with no route back to the Blueprint After: an unavailable release dialog with AI troubleshooting and explicit Blueprint recovery actions
Mobile before Mobile after
Before on mobile: an unavailable release dialog with no route back to the Blueprint After on mobile: an unavailable release dialog with AI troubleshooting and explicit recovery actions

Testing

  1. From a stored Playground, run a Blueprint with preferredVersions.wp set to 999.9.
  2. Confirm the failure dialog shows the unavailable version, keeps Troubleshoot with AI, and cannot be dismissed.
  3. Open Edit Blueprint, close the editor, and confirm the failure dialog returns.
  4. Choose Return to your last Playground and confirm the original Playground opens and the failed run is absent from Recent.
  5. Repeat at a mobile viewport.
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 5a76be7 to 1db1878 Compare July 16, 2026 23:25
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from d77410e to 433a8e9 Compare July 17, 2026 01:28
@adamziel
adamziel changed the base branch from trunk to website-error-modal-quiet-paper July 17, 2026 01:28
Base automatically changed from website-error-modal-quiet-paper to trunk July 17, 2026 13:49
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch 7 times, most recently from 92a61c8 to 67161b1 Compare July 20, 2026 12:47
@adamziel
adamziel changed the base branch from trunk to unavailable-wordpress-release-errors July 20, 2026 12:48
@adamziel
adamziel force-pushed the unavailable-wordpress-release-errors branch from 23e6033 to 4ecb8ca Compare July 20, 2026 13:29
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 67161b1 to 80014bd Compare July 20, 2026 13:34
@adamziel
adamziel force-pushed the unavailable-wordpress-release-errors branch from 4ecb8ca to 78ee80a Compare July 20, 2026 13:38
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 80014bd to 003e852 Compare July 20, 2026 13:38
@adamziel
adamziel force-pushed the unavailable-wordpress-release-errors branch from 78ee80a to 9f496c4 Compare July 20, 2026 13:52
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 003e852 to 41185ad Compare July 20, 2026 13:54
@adamziel
adamziel force-pushed the unavailable-wordpress-release-errors branch from 9f496c4 to 5484a04 Compare July 20, 2026 14:00
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 41185ad to 9978266 Compare July 20, 2026 14:06
@adamziel
adamziel changed the base branch from unavailable-wordpress-release-errors to copied-blueprint-bundle-ownership July 20, 2026 14:06
@adamziel
adamziel force-pushed the copied-blueprint-bundle-ownership branch from 0ac4c66 to 6a53b15 Compare July 20, 2026 14:10
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from da65132 to 6433599 Compare July 20, 2026 19:37
@adamziel
adamziel changed the base branch from error-recovery-preserve-shell-parameters to blueprint-run-source-lifecycle July 20, 2026 19:37
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 6433599 to f475a74 Compare July 20, 2026 19:44
@adamziel
adamziel force-pushed the blueprint-run-source-lifecycle branch from 13c0f07 to 214ac91 Compare July 20, 2026 20:30
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from f475a74 to 073618e Compare July 20, 2026 20:30
@adamziel
adamziel force-pushed the blueprint-run-source-lifecycle branch from 214ac91 to 45489f0 Compare July 20, 2026 21:06
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 073618e to e60517f Compare July 20, 2026 21:09
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from e60517f to 1edd495 Compare July 20, 2026 23:03
@adamziel
adamziel changed the base branch from blueprint-run-source-lifecycle to exclude-unfinished-blueprint-runs July 20, 2026 23:03
adamziel added a commit that referenced this pull request Jul 20, 2026
…4126)

Part of #4099.

Running a stored Blueprint creates another OPFS-backed Playground before
WordPress boots. Until its first MEMFS-to-OPFS copy succeeds, a failed
run
needs to know which stored Playground it should return to.

This records that return target when the run is created, carries it
through
retries, and clears it in the same metadata write that completes the
first
OPFS copy. Failed and interrupted copies keep the target. Abandoned runs
remain eligible for normal autosave cleanup.

There is no UI change here. Follow-up work uses the return target to
keep
unfinished runs out of Recent and offer explicit recovery.

## Testing

Run a Blueprint from a stored Playground and confirm the new Playground
boots
and saves normally. Retry before its first save finishes and confirm the
same
stored Playground remains the return target.
@adamziel
adamziel force-pushed the exclude-unfinished-blueprint-runs branch from 67ef2ca to bd44df0 Compare July 20, 2026 23:17
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 1edd495 to 607ea21 Compare July 20, 2026 23:17
@adamziel
adamziel force-pushed the exclude-unfinished-blueprint-runs branch 2 times, most recently from b4337e6 to be22f0a Compare July 20, 2026 23:24
@adamziel
adamziel force-pushed the blueprint-run-failure-recovery branch from 607ea21 to fce1dbb Compare July 20, 2026 23:25
@adamziel
adamziel force-pushed the exclude-unfinished-blueprint-runs branch from be22f0a to d2e1746 Compare July 20, 2026 23:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an explicit recovery path for failed/interrupted stored Blueprint runs so reloads don’t silently retry or strand the user behind a dead loader.

Changes:

  • Adds a unit test asserting interrupted Blueprint candidates require an explicit retry.
  • Enhances the site error modal to present “Edit Blueprint” and “Return to your last Playground / Start a new Playground” actions for unfinished Blueprint runs.
  • Makes the error modal non-dismissible for unfinished Blueprint runs to prevent revealing a dead loader via close/outside/Esc.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/playground/website/src/lib/state/redux/boot-site-client.spec.ts Adds coverage for “interrupted Blueprint run requires explicit retry” behavior.
packages/playground/website/src/components/site-error-modal/site-error-modal.tsx Implements recovery UX/actions and prevents dismissing the modal for unfinished Blueprint runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

A stored Blueprint run exists before WordPress boots, but it is not yet a
Playground worth restoring. Keep unfinished runs out of Recent and restore
suggestions while retaining the Playground to return to after a failure.

The failure modal cannot close into a dead loader. It offers Edit Blueprint or
Return to your last Playground. Retrying creates the replacement before
discarding the failed run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment