Skip to content

Conversation

@sejas
Copy link
Member

@sejas sejas commented Jul 21, 2025

Related issues

Proposed Changes

  • Studio changes to pull dialog to render the remote file tree using the latest backup.
  • The pull will generate a new fresh backup anyway.
  • Jetpack Imports now use merge strategy.

Testing Instructions

Test the new flow pulling the latest rewind_id

  • Apply the PR 188955-ghe-Automattic/wpcom if not deployed yet in your sandbox.
  • Make sure you have some files in mu-plugins and/or fonts in your remote site.
  • Run npm start.
  • Connect to your remote site.
  • Click "Pull".
  • Select "Specific files and folders" dropdown
  • Observe the tree can be inspected deeply and async
  • Confirm the pull.
  • Wait until the pull finishes.
  • Open Finder.
  • Observe that the selected files and folders are restored correctly.

Try pulling a site without backups

  • You can use backend production , so the rewind_id fails
  • Click pull
  • Observe the checkboxes are disabled
Screenshot 2025-07-30 at 16 07 17

Test Studio other backups

  • Try importing other backup formats, like Playground, Local, or wpress
  • Confirm they work as expected
2025-partial-pull.mp4

Pre-merge Checklist

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

@sejas sejas self-assigned this Jul 21, 2025
@sejas sejas changed the title Add back the contents option, mu-plugins and fonts to the Pull dialog Read backup contents from backend Jul 23, 2025
@sejas sejas changed the title Read backup contents from backend Read backup contents from the backend for pull sync Jul 23, 2025
@sejas sejas changed the title Read backup contents from the backend for pull sync Implement selective syncing in the pull dialog Jul 24, 2025
@sejas sejas marked this pull request as ready for review July 30, 2025 16:21
@sejas sejas requested a review from a team July 30, 2025 16:21
Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

Thanks for addressing feedback 👍
It works perfectly, I tested that rewind_id is used correctly with manually adding file to fonts folder, pushign it then opening Pull dialog and checking that I don't see it, but after updating backup it appeared. Also tested pulling separately plugins, fonts, and all files, and every time it worked as expected. Also tested importing backups: locals, wpress, playground and jetpack - everything works well 👍
Screenshot 2025-08-12 at 18 46 16
Screenshot 2025-08-12 at 18 49 06

Regarding code I have some feedback and things to discuss.

@@ -0,0 +1,131 @@
import { createSlice } from '@reduxjs/toolkit';
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't finished figuring out all the code around sync store, but I am thinking - would it be less code and woudl it be more clear and simple code if we use react-query here? I have feeling that redux here is redundant.
WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

I addressed all the feedback above, thanks for the great suggestions.

About react-query vs redux, I think we shouldn't introduce a new library in this PR, and we should discuss it as a team.
I like TansStack Query, but since we decided to use RTK Queries I think we should keep using them.
p1736435348402909/1736434430.061079-slack-C04GESRBWKW

Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

Thanks for addressing all the feedback, the changes LGTM and I tested one more time all scenarious and everything works well 👍

@sejas sejas merged commit dcf099c into trunk Aug 13, 2025
13 checks passed
@sejas sejas deleted the update/stu-620-studio-sync-pulling-only-contents-returns-an-empty-backup branch August 13, 2025 13:19
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.

3 participants