You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Website] Open the Reprint clone form from a site link - #4552
Make New Playground → Clone a live site available without the ?reprint flag. Use ?clone-site=<url> to open the form with an editable address. Opening the link does not contact the source.
Field Notes accepts public, read-only Reprint POST requests. Reprint v0.11.6 still expects a credential option, so Playground passes the demo's ignored public-demo placeholder instead of generating a migration key. The demo export has no admin account; Playground creates one in the local copy. Other sites keep the normal key setup.
Screenshots
Before, the demo link opened the default Playground. Now it opens the clone form with Field Notes filled in.
Viewport
Before
After
Desktop
Mobile
Test
On a build with this change, open the Field Notes clone link and choose Clone site. No account or key should be requested.
When the transfer finishes, choose Open site. The Field Notes homepage and its photo should load, and the copy should be editable.
Open the link again and change the address to another site. The form should offer Check site instead.
Summary by CodeRabbit
New Features
Added a “Clone a live site” option to the Playground creation flow, available without a special URL parameter.
Clone links can open the form with a site URL prefilled. The source site is contacted only after selecting Check site.
The public Field Notes demo can be cloned without a key. A local administrator is created if the imported site has no administrator.
Bug Fixes
Improved validation for demo URLs to reject lookalike addresses that are not the public demo.
With the prefilled form open, use the Dock’s New Playground button, then Clone a live site. The new form should start blank.
No actionable comments were generated in the recent review.
Walkthrough
The clone flow now accepts a URL from the clone-site query parameter. The transfer panel supports keyless pulls of the public Field Notes demo and can create a local administrator when needed. Documentation and tests reflect the clone flow and sandbox-origin rule.
Changes: Clone-site flow
Layer / File(s)
Summary
Clone URL startup state packages/playground/website/src/lib/state/redux/slice-ui.ts, packages/playground/website/src/components/saved-playgrounds-panel/index.tsx
Clone request state can include a URL. Outside seamless mode, clone-site opens the Dock transfer section with the URL. Initial site selection preserves the request, and the clone launcher is available without the reprint query parameter.
Public-demo transfer panel packages/playground/website/src/components/site-manager/site-transfer-panel/*
The transfer panel handles public-demo pulls and clones without a migration key. It uses a null key pair for public-demo handoffs, shows pull requirements, and retains key-based behavior for other URLs.
Public-demo pull and authentication packages/playground/website/src/lib/reprint/bridge.php, packages/playground/website/src/lib/reprint/bridge-test.php, packages/playground/website/src/lib/reprint/reprint.ts, packages/playground/website/src/lib/reprint/reprint.spec.ts
The public Field Notes demo can be pulled without a private key. The import flow can create a local administrator when the export has none. Bridge authentication uses a public-demo secret when no key is supplied. Tests cover URL validation and bridge key handling.
Clone-flow instructions and coverage packages/playground/website/src/lib/reprint/README.md, packages/playground/website/playwright/e2e/*, packages/playground/website/src/components/site-manager/site-transfer-panel/index.spec.tsx, packages/playground/website/src/lib/reprint/release.json, packages/playground/website/playwright/reprint-site/serve.sh
Instructions describe the clone-site parameter, source contact after Check site, and keyless cloning. Tests cover clone URL handling, public-demo clone handoff, updated authorization steps, and routes without the reprint parameter. Reprint release metadata and the server archive digest are updated.
Sandbox-origin documentation
Layer / File(s)
Summary
Origin rule and deployment verification AGENTS.md, packages/playground/website-deployment/wordpress-frame/README.md, packages/playground/website/README.md, packages/playground/website/bin/wordpress-frame/README.md, packages/playground/website/playwright/e2e/sites-api.spec.ts
The documentation states that WordPress frames use the configured sandbox origin without distinguishing ?reprint. Deployment verification no longer requires checking both query-parameter states. A test comment refers to startup parameters generally.
sequenceDiagram
participant Browser
participant ReduxSliceUI
participant SiteTransferPanel
participant pullSite
participant reprint_auth_options
Browser->>ReduxSliceUI: load clone-site URL
ReduxSliceUI->>SiteTransferPanel: open transfer form with URL
SiteTransferPanel->>pullSite: submit public demo URL and null key
pullSite->>reprint_auth_options: request authentication options
reprint_auth_options-->>pullSite: return public-demo secret option
Loading
Merge Risk: Minimal · up to 69124
The clone flow has no established current-head defect that should block merging.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "[Website] Open the Reprint clone form from a site link" matches the main change. The PR adds a ?clone-site=<url> link that opens the "Clone a live site" form with a prefilled, editable ad…
Docstring Coverage
Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "[Website] Open the Reprint clone form from a site link" matches the main change. The PR adds a ?clone-site=<url> link that opens the "Clone a live site" form with a prefilled, editable address, without requiring ?reprint. The changeset also covers the public demo path, the bridge auth changes, and the cloneRequested state update. The title describes the primary user-facing change and leaves out those secondary details, which is expected.
Full details: Docstring Coverage
Explanation
Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 12 files. (1 skipped: 1 unsupported.)
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
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
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.
Make New Playground → Clone a live site available without the
?reprintflag. Use?clone-site=<url>to open the form with an editable address. Opening the link does not contact the source.Field Notes accepts public, read-only Reprint POST requests. Reprint v0.11.6 still expects a credential option, so Playground passes the demo's ignored
public-demoplaceholder instead of generating a migration key. The demo export has no admin account; Playground creates one in the local copy. Other sites keep the normal key setup.Screenshots
Before, the demo link opened the default Playground. Now it opens the clone form with Field Notes filled in.
Test
Summary by CodeRabbit