Skip to content

[Website] Avoid autosave prompts in embedded Playground#3707

Merged
adamziel merged 2 commits into
trunkfrom
adamziel/no-autosave-prompts
May 30, 2026
Merged

[Website] Avoid autosave prompts in embedded Playground#3707
adamziel merged 2 commits into
trunkfrom
adamziel/no-autosave-prompts

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

@adamziel adamziel commented May 29, 2026

What changed

Don't offer restoring an autosaved Playground in Playgrounds:

  • Embedded in an iframe on another sute
  • With ?mode=seamless
  • With ?can-save=no

There's no way to manage Playgrounds under those circumstances and the user expectation is just getting a fresh Playground instance.

Screenshots

Before, the browser-saving status/action is visible:

Before: save status visible

After, the save/autosave status is hidden when saving is disabled by the shell:

After: save status hidden

Testing

  • git diff --check HEAD^ HEAD
  • npm exec -- nx test playground-website -- --testFile=router.spec.ts
  • CI Playwright coverage for the new seamless and embedded-shell cases.

@adamziel adamziel force-pushed the adamziel/no-autosave-prompts branch from 56e9174 to d416d96 Compare May 29, 2026 14:38
@adamziel adamziel marked this pull request as ready for review May 30, 2026 00:20
@adamziel adamziel requested review from a team, JanJakes and Copilot May 30, 2026 00:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Hides autosave/save UI and skips autosave site creation when the Playground shell is in seamless mode or embedded in an iframe, in addition to the existing can-save=no query parameter check.

Changes:

  • Replaced isSaveDisabledByQueryParam() with a broader isSiteSavingDisabled(url, win) helper that also detects mode=seamless and iframe embedding (including cross-origin parents).
  • Updated all call sites (BrowserChrome, TemporarySiteNotice, EnsurePlaygroundSiteIsSelected) to use the new helper.
  • Added unit tests for the new helper and Playwright tests verifying the save status indicator is hidden in seamless and embedded shells.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/playground/website/src/lib/state/url/router.ts Renames/extends saving-disabled check to include seamless mode and iframe embedding.
packages/playground/website/src/lib/state/url/router.spec.ts Adds unit tests covering the new conditions.
packages/playground/website/src/components/site-manager/temporary-site-notice/index.tsx Updates import/usage to new helper.
packages/playground/website/src/components/ensure-playground-site/ensure-playground-site-is-selected.tsx Uses new helper when deciding to use a temporary site; updates comments.
packages/playground/website/src/components/browser-chrome/index.tsx Hides SaveStatusIndicator based on new helper.
packages/playground/website/playwright/e2e/website-ui.spec.ts Adds e2e tests for seamless and iframe-embedded shells.

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

Comment thread packages/playground/website/src/components/browser-chrome/index.tsx Outdated
Comment thread packages/playground/website/src/lib/state/url/router.spec.ts Outdated
Comment thread packages/playground/website/playwright/e2e/website-ui.spec.ts
@adamziel adamziel changed the title Avoid autosave prompts in embedded Playground [Website] Avoid autosave prompts in embedded Playground May 30, 2026
@adamziel adamziel merged commit aa2d00d into trunk May 30, 2026
53 checks passed
@adamziel adamziel deleted the adamziel/no-autosave-prompts branch May 30, 2026 01:00
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