Skip to content

Add selective sync menu and CLI flags to pull-reprint (captured, not yet applied)#3976

Open
epeicher wants to merge 1 commit into
trunkfrom
stu-1816-bring-selective-sync-and-interactive-file-selection-to-pull
Open

Add selective sync menu and CLI flags to pull-reprint (captured, not yet applied)#3976
epeicher wants to merge 1 commit into
trunkfrom
stu-1816-bring-selective-sync-and-interactive-file-selection-to-pull

Conversation

@epeicher

@epeicher epeicher commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI (Claude Code) implemented the interactive selector, the CLI flags, the metadata capture, and the unit tests. The execution path was intentionally left inert in this PR — reviewers should confirm the menu/flags are shown and persisted, but the pull still fetches everything.

Proposed Changes

Adds the selective-sync menu to the experimental pull-reprint command so users can choose what to sync. The selector always shows the full picture — pull-reprint runs against a site that already exists locally, so there's a single mode:

  • Interactive: the full wp-content folder tree plus a "Database" toggle — pick which folders (and whether the database) to pull.
  • Non-interactive: --only, --skip-database, and --skip-uploads flags (work with --yes).

The choice is recorded into the pull's metadata but not applied yet — the pull still does a full sync — so this lands the UX for iterative review while the Reprint-side commands that act on the selection are built in the follow-up. Runs on the stock reprint.phar (no Reprint changes). Reprint command invocations are also logged to ~/.studio/pulls/<key>/reprint-commands.log for debugging.

Testing Instructions

  1. npm run cli:build
  2. STUDIO_ENABLE_PULL_REPRINT=1 node apps/cli/dist/cli/main.mjs pull-reprint --url <site> --verbose
    • The wp-content folder tree + Database toggle is shown.
    • The pull completes as a full working site regardless of the selection.
    • ~/.studio/pulls/<key>/pull.json records skipDatabase/skipUploads/fileOnlyPaths.
  3. npm test -- apps/cli/lib/pull apps/cli/commands/tests/pull-reprint.test.ts

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@epeicher epeicher force-pushed the stu-1816-bring-selective-sync-and-interactive-file-selection-to-pull branch from 293ee71 to 3a17099 Compare June 26, 2026 16:47
@epeicher epeicher force-pushed the stu-1816-bring-selective-sync-and-interactive-file-selection-to-pull branch from 3a17099 to 49be035 Compare June 26, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant