[Website] Autosave after dismissing restore prompts - #4035
Merged
Conversation
This was referenced Jul 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds “dismiss = keep current Playground” behavior for the autosave restore prompt, including outside-click detection across nested (same-origin) iframes and a durable “don’t notify me” preference.
Changes:
- Add cross-iframe
pointerdownlistener utility with MutationObserver-based tracking. - Update restore prompt flow to autosave on dismissal and optionally persist an opt-out preference.
- Add Vitest coverage for the new utilities and Playwright E2E coverage for the new UX flows.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/playground/website/src/components/ensure-playground-site/listen-for-pointer-down-across-iframes.ts | New helper to listen for pointer presses across host + nested same-origin iframe documents. |
| packages/playground/website/src/components/ensure-playground-site/listen-for-pointer-down-across-iframes.spec.ts | Unit tests for nested iframe event delivery and cleanup behavior. |
| packages/playground/website/src/components/ensure-playground-site/ensure-playground-site-is-selected.tsx | Implements autosave-on-dismiss, outside-click dismissal across nested iframes, and durable opt-out UI. |
| packages/playground/website/src/components/ensure-playground-site/autosave-restore-preference.ts | Adds localStorage-backed preference helpers for disabling restore notifications. |
| packages/playground/website/src/components/ensure-playground-site/autosave-restore-preference.spec.ts | Tests for preference persistence and storage-unavailable degradation. |
| packages/playground/website/playwright/e2e/website-ui.spec.ts | E2E tests for opt-out persistence and WordPress-frame outside-click dismissal. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
website-site-settings-actions
branch
from
July 13, 2026 20:13
2ac5593 to
5b015d2
Compare
adamziel
force-pushed
the
website-autosave-dismissal
branch
from
July 14, 2026 12:31
33f1dcd to
11e73a8
Compare
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.
What this does
Treats dismissing an autosave restore prompt as a decision to keep the Playground that is already open.
A pointer press anywhere outside the prompt—including inside the nested WordPress iframe—dismisses it and autosaves the current Playground. The same path backs Keep this Playground and Stop showing autosave prompts; the latter persists the preference only after that autosave succeeds. Failed saves restore the prompt, and a synchronous guard prevents duplicate restore or dismissal actions before React can disable the controls.
Testing
npm exec nx -- run-many -t lint typecheck -p playground-website --parallel=2