Bring the interactive site selector to pull-reprint#3729
Open
epeicher wants to merge 7 commits into
Open
Conversation
…interactive-site-selector-to-pull-reprint # Conflicts: # apps/cli/commands/tests/pull-reprint.test.ts
…ring-the-interactive-site-selector-to-pull-reprint
Collaborator
📊 Performance Test ResultsComparing e34606f 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) |
…interactive-site-selector-to-pull-reprint
…or-to-pull-reprint
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
Selector compared with previous one
How AI was used in this PR
Claude Code adapted the existing
pullsite selector (pickSyncSite) into a trimmedpull-reprintvariant per the issue's guidance to copy rather than abstract (sincepullis being deprecated), added unit tests for both the picker and the source-resolution flow, and verified the change —cli:build,typecheck, and the new test suites all pass. I reviewed the diff against the reference implementation and confirmed there are no behavior changes on the non-interactive paths.Proposed Changes
When you run
pull-reprintwithout--urland have more than one connected WordPress.com site, the command previously printed the list and aborted, forcing you to re-run with an explicit--url. Now, in an interactive terminal, it opens a searchable site picker (type to filter by name or hostname, arrow keys to navigate, Enter to select) — the same friendly selection experience already offered bypull. Cancelling with Esc or Ctrl-C is treated as a clean no-op: nothing is downloaded and no local state is created.Existing behavior is preserved everywhere else: a single connected site is still auto-selected, the zero-site and
--url/--secretpaths are unchanged, and non-interactive callers (CI, the Desktop app driving the CLI) keep the original print-list-and-abort behavior so scripted usage is unaffected.Testing Instructions
studio auth login).npm run cli:buildfirst)~/Studio/and no state under~/.studio/pulls/.... pull-reprint | cat) should fall back to printing the list and aborting.Pre-merge Checklist