Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
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.
Motivation for the change, related issues
Saving through Autosaved → Storage location → Save to Spacefast installs/configures Simply Static and publishes the static website, Blueprint, SQLite snapshot, and one shared copy of uploads. Generated pages link back through Edit with Playground using a normal
blueprint-urllink. New Spaces are public, including the database; write credentials stay in tab memory.Implementation details
Reopening recreates plugin/theme files, restores SQLite and uploads, migrates URLs, and logs in. WXR and theme starter-content imports are omitted. Remote JSON Blueprint dependencies keep their original URLs; local/ZIP bundle dependencies are copied to Spacefast. Static generation uses free Simply Static without WP-CLI; database URL migration uses WP-CLI. API/uploads use the CORS proxy, and Blueprint/resource loading supports proxy fallback. The local proxy defaults to 100 MiB per request; separately hosted proxies retain the 1 MiB default unless configured.
Each save replaces one snapshot, removes deleted files, retains unreferenced uploads, and records “Saved from WordPress Playground.” The current layout assumes a single WordPress site with standard uploads; plugin/theme file edits must be reproducible from the setup Blueprint. Remote dependencies must remain available at their original URLs.
Testing Instructions (or ideally a Blueprint)
npm run dev, openhttp://127.0.0.1:5400/website-server/, and click Autosaved → Storage location → Save to Spacefast. Restart an older dev server to pick up the new proxy upload limit. Override it withPLAYGROUND_CORS_PROXY_MAX_REQUEST_SIZEonly when needed.npm exec -- nx run playground-website:typechecknpm exec -- nx run playground-website:lintnpm exec -- nx test playground-website --testFile=spacefast— 36 tests, including dependency preservation across saves, original remote resource URLs, and omission of redundant content imports.npm exec -- nx test playground-website --testFile=resolve-blueprint-from-url.spec.ts— 2 tests covering startup Blueprint and bundled-resource CORS fallback.npm exec -- nx test playground-storage --testFile=filesystems.spec.ts— 53 filesystem tests.npm exec -- nx test playground-php-cors-proxy— requires PHPUnit; previously verified for the proxy changes.Browser checks used real WordPress and Simply Static 3.8.18 with mocked Spacefast responses: proxy-only uploads, retry retention, deduplicated uploads, referenced/unreferenced media, repeated saves and deletion, publish messages, destination retention, and reopening through the normal Blueprint URL into wp-admin. Later CORS and dependency fixes are covered by regression tests. Live publication was user-verified; no reference handoff was redeemed by tests.