Skip to content

Agentic UI: Port selective sync - #4377

Merged
bcotrim merged 6 commits into
trunkfrom
agenticPortSelectiveSync
Aug 11, 2026
Merged

Agentic UI: Port selective sync#4377
bcotrim merged 6 commits into
trunkfrom
agenticPortSelectiveSync

Conversation

@nightnei

@nightnei nightnei commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude Code assisted with mapping the legacy selective-sync implementation via a few iterations. All changes were reviewed and visually verified by hand in both color schemes.

Proposed Changes

As agreed in STU-1946, the Agentic UI adopts the classic UI's Selective Sync as-is for the beta, so both UIs offer the same sync capabilities.
To keep review easy, the legacy modules were intentionally copied verbatim into apps/ui/src/components/selective-sync/.
Note, there is an existing issue in trunk - UI says that the Push is finished, hovewer it isn't. This issue is not covered in this PR - DOTPROD-170.

Testing Instructions

  1. Open Agentic UI, connect a site to a local site
  2. Click on Pull and Push and assert that the dialog looks completely the same as in Classic UI and selection works well in the tree
Screenshot 2026-07-28 at 16 40 58 Screenshot 2026-07-28 at 16 42 10
Screenshot 2026-07-28 at 16 41 16 Screenshot 2026-07-28 at 16 40 32
3. Try to pull all data or select for example only `themes` folder and assert that it works well. 4. You can test the push action too; it works, but there is an existing bug which is not covered in this PR (DOTPROD-170).

@nightnei nightnei self-assigned this Jul 28, 2026
Base automatically changed from mognet/add-agentic-connect-site-flow to trunk July 28, 2026 16:30
@nightnei
nightnei force-pushed the agenticPortSelectiveSync branch 4 times, most recently from 80de4b9 to 5a2808d Compare July 31, 2026 16:26
@nightnei
nightnei marked this pull request as ready for review August 3, 2026 16:03
@shaunandrews

Copy link
Copy Markdown
Contributor

We'll iterate on the UI more once this merges, but the only thing we should consider is adding a max-width to the modal to avoid these huge line-lengths:

image

@nightnei

nightnei commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

We'll iterate on the UI more once this merges, but the only thing we should consider is adding a max-width to the modal to avoid these huge line-lengths:

image

Limited to 960px

@wpmobilebot

wpmobilebot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 5949654 vs trunk

app-size

Metric trunk 5949654 Diff Change
App Size (Mac) 1406.34 MB 1406.37 MB +0.03 MB ⚪ 0.0%

site-editor

Metric trunk 5949654 Diff Change
load 1015 ms 1069 ms +54 ms 🔴 5.3%

site-startup

Metric trunk 5949654 Diff Change
siteCreation 7525 ms 7529 ms +4 ms ⚪ 0.0%
siteStartup 2869 ms 2871 ms +2 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@katinthehatsite

Copy link
Copy Markdown
Contributor
Screenshot 2026-08-04 at 2 18 21 PM

😮

That is to say that I started the review and checking this now

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if I start the sync process in the new UI, then switch to the classic UI? So far, I am seeing no sync progress in the classic UI in that case and I can start again the sync from there? I think I expected the sync progress to be reflected even if I change between the UI mid-process. What do you think?

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice if these links had color even if they don't in the old UI:

Image Image

(the one at the end that has Create a new backup)

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another observation is that I was able to delete the local site mid-sync e.g. while pushing. Would the delete option be disabled when the push is happening to prevent sync errors?

@nightnei

nightnei commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Another observation is that I was able to delete the local site mid-sync e.g. while pushing. Would the delete option be disabled when the push is happening to prevent sync errors?

This PR just covers porting sync functionality verbatim, so I would move this to a separate PR.

@nightnei

nightnei commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

I think it would be nice if these links had color even if they don't in the old UI:

Image Image
(the one at the end that has Create a new backup)

I think it's a good point. Shoun has follow-up PRs to change the styles. This PR intentionally porting sync functionality verbatim, and it's already too big.

@nightnei

nightnei commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

What happens if I start the sync process in the new UI, then switch to the classic UI? So far, I am seeing no sync progress in the classic UI in that case and I can start again the sync from there? I think I expected the sync progress to be reflected even if I change between the UI mid-process. What do you think?

Hm, I tested it before and it was reflected in Classic UI. Thanks, I will double check it.
But I don't think it's critical, as the goal is ultimately to remove the Classic UI.

Comment thread packages/common/sites/sync.ts Outdated
'--options',
( options?.optionsToSync?.length ? options.optionsToSync : [ 'all' ] ).join( ',' ),
...( options?.includePathList?.length
? [ '--include-path-list', options.includePathList.join( ',' ) ]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backup node ids can contain commas — the rewind ls returns composite ids for themes (cjE6,ZjE6Lw==) and plugins (cjI6,ZjI6Lw==). Joining them here and splitting on , in the CLI flag corrupts the selection: pulling mu-plugins + themes + plugins sent 5 fragments instead of 3 ids to initiateBackup (verified against the real CLI argv). Classic sends this list as a JSON array directly to wpcom, so only this new desktop→CLI hop is affected.

@nightnei
nightnei force-pushed the agenticPortSelectiveSync branch from 3554906 to 152fcb9 Compare August 10, 2026 15:01

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for making the change 👍

I pushed another small fix so we can merge

@bcotrim
bcotrim merged commit 153ff3e into trunk Aug 11, 2026
13 checks passed
@bcotrim
bcotrim deleted the agenticPortSelectiveSync branch August 11, 2026 15:28
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.

5 participants