pull-reprint: pick a WP.com site interactively when no --url is given#3239
Open
pull-reprint: pick a WP.com site interactively when no --url is given#3239
Conversation
Replaces the multi-site abort path in resolveSourceSite() with a searchable inquirer picker, and prints a one-line note after any WP.com site is chosen that pull-reprint currently requires a WP Cloud-hosted site. Addresses UX feedback on #2939.
Exports resolveSourceSite so the no-URL interactive flow can be exercised end-to-end, and adds tests that assert the picker is invoked only when we actually need the user to choose — one active WP.com site auto-picks, --url skips the picker, --url+--secret never loads the site list at all.
Collaborator
📊 Performance Test ResultsComparing 97ee9a1 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
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.
Proposed Changes
Adds an interactive site picker when pull-reprint is ran without any
--url.site-picker.mp4
studio pulllets you run the command without a remote URL: it fetches your WP.com sites and drops you into a searchable picker. This PR givesstudio pull-reprintthe same nicety.Testing Instructions
npm test -- apps/cli/commands/tests/pull-reprint.test.ts→ all tests pass, including the 5 newresolveSourceSitecases.STUDIO_ENABLE_PULL_REPRINT=1 ALL_PROXY=socks5h://127.0.0.1:8080 node apps/cli/dist/cli/main.mjs pull-reprint(no flags) → picker appears; typing filters; Esc cancels with a clean "No WordPress.com site selected" error.--url+--secret→ no picker, no WP.com API calls.Related issues
Follow-up UX polish on #2939.
How AI was used in this PR
Claude Code drafted the interactive picker port of the `resolveSourceSite` flow, ran the new tests locally, and wrote this description. A human reviewed every line.
Pre-merge Checklist