[Website] Keep unfinished Blueprint runs out of Recent and restore suggestions - #4127
Merged
Conversation
adamziel
force-pushed
the
exclude-unfinished-blueprint-runs
branch
4 times, most recently
from
July 20, 2026 23:28
be22f0a to
d2e1746
Compare
adamziel
marked this pull request as ready for review
July 20, 2026 23:34
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR prevents unfinished stored Blueprint runs (recovery state) from appearing in Recent autosaves and from being offered as setup-URL restore suggestions until the first OPFS sync succeeds and clears the return target.
Changes:
- Introduces helpers to classify “restorable autosaves” vs. “unfinished Blueprint runs”.
- Updates Recent autosaves and matching-setup restore logic to use the new classification.
- Adds a unit test covering the new classification behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/playground/website/src/lib/state/redux/slice-sites.ts | Adds isRestorableAutosavedSite / isUnfinishedBlueprintRun helpers to hide unfinished Blueprint runs from autosave flows. |
| packages/playground/website/src/lib/state/redux/slice-sites.spec.ts | Adds a test ensuring normal autosaves are restorable while unfinished Blueprint runs are not. |
| packages/playground/website/src/components/saved-playgrounds-panel/index.tsx | Switches “Recent” filtering to the new “restorable autosave” predicate. |
| packages/playground/website/src/components/ensure-playground-site/ensure-playground-site-is-selected.tsx | Prevents matching-setup restore suggestions from using unfinished Blueprint runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
exclude-unfinished-blueprint-runs
branch
from
July 20, 2026 23:35
d2e1746 to
6827485
Compare
Blueprint runs use autosave persistence before their first OPFS copy succeeds. Classify those runs separately so Recent and setup-URL restore suggestions only surface normal autosaves.
adamziel
force-pushed
the
exclude-unfinished-blueprint-runs
branch
from
July 20, 2026 23:37
6827485 to
2c0b2bc
Compare
adamziel
added a commit
that referenced
this pull request
Jul 21, 2026
Part of #4099. Builds on #4127. A failed OPFS deletion now leaves the Playground in Redux so the deletion can be retried. ## Background A stored Playground has files in OPFS and a record in Redux. `removeSite()` used to catch an OPFS error and then remove the Redux record anyway. It also treated missing browser storage as a successful deletion. In both cases, the Playground disappeared from the UI while its deletion had not succeeded. ## This change `removeSite()` now checks that browser storage is available and removes the Redux record only after OPFS deletion succeeds. Otherwise the error reaches the caller and the record remains. Autosave pruning is allowed to skip a broken site and keep going. It catches each deletion failure in the pruning loop, logs it, and tries the next candidate. This is why the `try/catch` belongs there instead of in `removeSite()`. ## Testing There is no practical UI control for forcing these storage failures. The focused tests cover unavailable browser storage, a rejected OPFS deletion, and a prune pass where one deletion fails while the next succeeds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4099.
Builds on #4126.
An unfinished stored Blueprint run is recovery state, not a normal autosave. Keep it out of Recent and setup-URL restore suggestions until its first OPFS sync succeeds and clears the return target.
Both comparisons use the same stored Playground and the same failed run, created with unavailable WordPress version
999.9. Before this change, reloading lists the failed run under Recent autosaves. After this change, only the Playground that launched it remains visible.Desktop
Mobile
Testing
Run a stored Playground's Blueprint with an unavailable WordPress version. Reload and confirm the unfinished run is not offered in Recent or as an autosave to restore.