Route the Agentic UI pull through pull-reprint behind a beta feature (STU-1815) - #4430
Draft
gcsecsey wants to merge 3 commits into
Draft
Route the Agentic UI pull through pull-reprint behind a beta feature (STU-1815)#4430gcsecsey wants to merge 3 commits into
gcsecsey wants to merge 3 commits into
Conversation
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
Claude traced both pull paths, made the changes, and ran the tests. It also drove the CLI end-to-end against a real WordPress.com staging site to confirm the renamed option and numeric-ID resolution work outside of unit tests. I reviewed the changes and made the design calls.
Proposed Changes
For the Reprint beta, Studio needs to invoke either
pullorpull-reprintfor the same user action. That's awkward today because the two commands name the same concept differently:pull(andpush) take--remote-site, whilepull-reprinttakes--url. This aligns them so the caller doesn't have to special-case the engine.The rename turned out to be the smaller half.
pull-reprintcarried its own matcher,findMatchingWpComSite, whose docblock asserted that no existing Studio helper did the job — butfindSyncSiteByIdentifieralready did, and bothpullandpushuse it. Switching over deletes the private matcher and makes the two options identical in shape rather than just in name: both now accept a site URL or a numeric WordPress.com site ID.Two user-visible consequences, both bringing
pull-reprintin line withpull:No site found matching "…"instead of reprint-specific wording.pull-reprintalso no longer hides behind theSTUDIO_ENABLE_PULL_REPRINTenvironment variable. The Studio beta feature will be the gate from here on, so the env var was redundant. Note this makes the command visible instudio --helpfor everyone, including npm installs, for the duration of the beta.--options(a Jetpack Backups abstraction that STU-1813 decided not to carry over) and--verboseremain unaligned on purpose.Testing Instructions
npm run cli:buildnpm test -- apps/cli/commands/tests/pull-reprint.test.ts— 37 pass.npm run typecheck— clean.--remote-site Remote site URL or ID [string], andpull-reprintshould be listed instudio --help.Note: the full
apps/clisuite reports failures incommands/site/tests/*.e2e.test.tsunder parallel load. Those are pre-existing — clean trunk fails the same files, and they pass when run individually.Pre-merge Checklist