Skip to content

Conversation

@sejas
Copy link
Member

@sejas sejas commented Nov 19, 2025

Related issues

Proposed Changes

  • Fix options sent to the backend when pushing a site when selecting the All files and folders option.
  • Add a specific test case to validate the conversion from tree to options.

Testing Instructions

  • Checkout this branch and apply this diff
diff --git a/src/ipc-handlers.ts b/src/ipc-handlers.ts
index 2222476e..40fcbdbf 100644
--- a/src/ipc-handlers.ts
+++ b/src/ipc-handlers.ts
@@ -826,6 +826,8 @@ export async function pushArchive(
 		formData.push( [ 'options', optionsToSync.join( ',' ) ] );
 	}
 
+	console.log( 'formData', formData );
+	return { success: true }; // don't add this line if you want to test also the email
 	try {
 		await wpcom.req.post( {
 			path: `/sites/${ remoteSiteId }/studio-app/sync/import`,
  • Run npm start
  • Go to the sync tab and click push
  • Select "All files and folders"
  • Click Push
  • Observe that it appears [ 'options', 'contents,plugins,themes,uploads' ] in the node console. Before this PR the options sent were only contents.
  • Test other cases
Screenshot 2025-11-19 at 10 54 18

Pre-merge Checklist

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

@sejas sejas self-assigned this Nov 19, 2025
@sejas sejas requested review from a team and katinthehatsite November 19, 2025 10:55
@sejas sejas changed the title Fix/stu 1003 fix options sent to backend for push Fix sync options sent to backend when pushing a site Nov 19, 2025
@sejas sejas changed the title Fix sync options sent to backend when pushing a site Fix sync options sent to the backend when pushing a site Nov 19, 2025
@github-actions
Copy link
Contributor

📊 Performance Test Results

Comparing 4b38140 vs trunk

site-editor

Metric trunk 4b38140 Diff Change
load 11553.00 ms 10735.00 ms -818.00 ms 🟢 -7.1%

site-startup

Metric trunk 4b38140 Diff Change
siteCreation 128549.00 ms 123213.00 ms -5336.00 ms 🟢 -4.2%
siteStartup 39805.00 ms 49092.00 ms +9287.00 ms 🔴 23.3%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

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.

Works as expected 👍
I was thinking that we could optimize it to use just startsWith w/o trailing slash, but proposed way looks more clear and specific 👍
Screenshot 2025-11-19 at 13 48 33

Screenshot 2025-11-19 at 14 03 06 Screenshot 2025-11-19 at 14 03 13

@sejas sejas merged commit 15d3dce into trunk Nov 19, 2025
11 checks passed
@sejas sejas deleted the fix/stu-1003-fix-options-sent-to-backend-for-push branch November 19, 2025 14:06
Copy link
Contributor

@katinthehatsite katinthehatsite 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 fixing this, works well 👍

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.

4 participants