Add Reprint pulls as agentic UI beta feature - #4704
Draft
fredrikekelund wants to merge 3 commits into
Draft
Conversation
Ports the `Reprint pull engine` beta feature onto the current pull-reprint command. `pullSite` now takes its trailing arguments as an options object carrying the engine, while keeping the cancellation plumbing and the progress `action` passthrough that landed on trunk in the meantime. The pull also reports overall progress as a percentage, exits non-zero when it fails, reinstalls the SQLite integration so phpMyAdmin keeps working, announces a reused content selection when it resumes, and defers marking a site `pulling` until the first step that actually rewrites the site directory. Both front ends read the same beta feature: the `studio ui` server resolves it from app.json through a shared helper rather than staying on Jetpack silently. This is a re-application of #4430 onto #4582; the original branch could not be rebased, so its commits do not appear here. Co-authored-by: Gergely Csécsey <gcsecsey@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A Reprint pull used to ignore what the user picked and fetch the whole site. The selection was only ever reduced to Jetpack backup node ids, which Reprint has no use for, but the tree it came from also carries the wp-content path Reprint does select by. The dialog now reduces the tree a second way, to wp-content-relative paths and a database flag, and both forms travel together so the engine can be resolved where the pull runs. Picking a single plugin now pulls only that plugin. The new reduction mirrors the CLI picker's, and both are tested against the same cases so they cannot drift apart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A Jetpack pull can warn before downloading, because it sizes up the one backup archive it is about to fetch. Reprint streams the site in pieces, so there is no total to read up front and the question can only be answered afterwards. Studio now measures wp-content once the pull finishes and says so if the site is over the limit. The tally is of uncompressed files while the limit applies to a gzipped upload, so it over-reports and the wording says the push "may" fail. That bias is deliberate: a false alarm is cheap, and staying quiet would let the user hit the ceiling at push time instead. Both front ends answer the question the same way, through one function that is meant to be deleted once push moves to Reprint and the ceiling goes away. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Related issues
How AI was used in this PR
I used Claude for both planning and implementation.
Proposed Changes
This PR includes all changes from #4430, with resolved merge conflicts, plus logic to display a "Your site's backup exceeds 5 GB" warning after the pull, if applicable.
That warning is needed because even when Reprint pulls are launched, pushes will still be powered by Jetpack Backups for a while longer, and there's a 5 GB upload limit for those that continues to apply.
Testing Instructions
TBD
Pre-merge Checklist