Use search component in sync site picker and add i18n to CLI strings - #3014
Merged
bcotrim merged 2 commits intoApr 8, 2026
Merged
Conversation
bcotrim
changed the base branch from
trunk
to
add_cli_sync_and_import_operations
April 8, 2026 14:11
…ponent-in-sync-site-picker
fredrikekelund
approved these changes
Apr 8, 2026
fredrikekelund
left a comment
Contributor
There was a problem hiding this comment.
Works beautifully 👍 Nice improvement.
fredrikekelund
added a commit
that referenced
this pull request
Apr 9, 2026
* CLI: Add sync push/pull commands (#2878) * Add sync push/pull CLI commands with shared Zod schemas and event pipeline * Fix CLI build by replacing stream/promises with stream import * Fix lint errors in sync store files * Add progress tracking, --archive flag, and better error handling to sync commands * Add interactive selective sync to CLI push and pull commands * Extract shared sync logic to common and fix selective pull bugs * Fix pre-existing TS error in process.emit override * Fix lint error in process.emit override * Remove unused sync constants re-export * Remove unnecessary comment in sync-operations-slice * Add esc cancel support and unify help tip layout across prompts * Fix return types for sync selector cancel support * Use Zod schema for SyncOption validation instead of manual VALID_OPTIONS * Fix sync event lifecycle bugs and extract shared constants - Move process.emit restore into finally block in push command - Emit SYNC_EVENTS.FAILED in catch blocks for both pull and push - Extract poll constants and parseSyncOptions to shared locations * Add sync size validation to CLI push and pull commands * Simplify type annotations in sync push and pull commands * Remove unused sync CLI events * Add --site arg, stale-progress polling, and fix push archive flow * Rename --site arg to --remote-site in sync commands * Address PR feedback: move try/catch to handlers, parse options in yargs, double-cancel, reorder validation, remove re-exports * Move logger to module scope in sync pull/push commands * Remove type re-exports, import directly from common * Fix import order in sync test * Remove dead tusUpload and use raw progress for stall detection * Address PR feedback: use normalizeHostname, chalk, camelCase schema, remove type assertion * Address PR feedback: camelCase schemas, static tus import, sort by name, remove re-exports --------- Co-authored-by: Fredrik Rombach Ekelund <fredrik@f26d.dev> * Implement import/export in CLI (#2963) * Add sync push/pull CLI commands with shared Zod schemas and event pipeline * Fix CLI build by replacing stream/promises with stream import * Fix lint errors in sync store files * Add progress tracking, --archive flag, and better error handling to sync commands * Add interactive selective sync to CLI push and pull commands * Extract shared sync logic to common and fix selective pull bugs * Fix pre-existing TS error in process.emit override * Fix lint error in process.emit override * Remove unused sync constants re-export * Remove unnecessary comment in sync-operations-slice * Add esc cancel support and unify help tip layout across prompts * Fix return types for sync selector cancel support * Use Zod schema for SyncOption validation instead of manual VALID_OPTIONS * Fix sync event lifecycle bugs and extract shared constants - Move process.emit restore into finally block in push command - Emit SYNC_EVENTS.FAILED in catch blocks for both pull and push - Extract poll constants and parseSyncOptions to shared locations * Add sync size validation to CLI push and pull commands * Simplify type annotations in sync push and pull commands * Remove unused sync CLI events * Add --site arg, stale-progress polling, and fix push archive flow * Rename --site arg to --remote-site in sync commands * Address PR feedback: move try/catch to handlers, parse options in yargs, double-cancel, reorder validation, remove re-exports * Move logger to module scope in sync pull/push commands * Remove type re-exports, import directly from common * Fix import order in sync test * First iteration of the `import` CLI command * Initial version of export command * Polishing * Fix and refine * Import command: restart site on error, too * Allow .sql exports without `--only` flag * Improved error handling * More error handling * Move files * Wire up import/export logic to sync commands * Install missing dependency * Cleanup and test fixes * Windows-friendly paths in test * Fix issues identified in review * Address review comments * Stray console.log * Revert Playground downgrades and implement WP-CLI fix * Disallow database-only exports for .zip and .tar.gz files * Numerous changes - Default values for export files. - Replace `--only` with `--mode` for export command. Users can choose between "full" and "db". The `--mode` option is required and defaults to `full`. * Address review comments --------- Co-authored-by: bcotrim <bernardo.cotrim@a8c.com> Co-authored-by: Bernardo Cotrim <bmmcotrim@gmail.com> * glob dev dependency for the CLI * Fix Vite config * Move new commands to topmost scope Also, sort all CLI commands alphabetically * Use search component in sync site picker and add i18n to CLI strings (#3014) --------- Co-authored-by: Bernardo Cotrim <bmmcotrim@gmail.com> Co-authored-by: bcotrim <bernardo.cotrim@a8c.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
Related to #2878 (comment)
How AI was used in this PR
Claude Code was used to implement the changes. All changes were reviewed and validated by the author.
Proposed Changes
selectwithsearchcomponent from@inquirer/promptsin the sync site picker, allowing users to type to filter sitessync-site-picker,tree-checkbox, andai/sessions/helpers__()/sprintf()across import/export and sync CLI filesTesting Instructions
npm run cli:buildstudio sync pull(orstudio sync push) and verify:studio aiand start a new session — verify the session picker also shows separated help tip hintsstudio site export/studio site importwith invalid inputs and verify error messages are displayed correctlyPre-merge Checklist