Skip to content

Conversation

@katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Nov 5, 2025

Related issues

Closes STU-759

Proposed Changes

  • Please refer to description and details in 195447-ghe-Automattic/wpcom

Testing Instructions

  • Please refer to the testing instructions in 195447-ghe-Automattic/wpcom

Pre-merge Checklist

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

@katinthehatsite katinthehatsite self-assigned this Nov 5, 2025
@katinthehatsite katinthehatsite marked this pull request as draft November 5, 2025 09:44
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

📊 Performance Test Results

Comparing 351b7d1 vs trunk

site-editor

Metric trunk 351b7d1 Diff Change
load 10080.00 ms 11264.00 ms +1184.00 ms 🔴 11.7%

site-startup

Metric trunk 351b7d1 Diff Change
siteCreation 18121.00 ms 20185.00 ms +2064.00 ms 🔴 11.4%
siteStartup 4983.00 ms 5241.00 ms +258.00 ms 🔴 5.2%

Results are median values from multiple test runs.

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

@katinthehatsite katinthehatsite requested a review from a team November 5, 2025 15:40
@katinthehatsite katinthehatsite marked this pull request as ready for review November 5, 2025 15:40
Copy link
Contributor

@gavande1 gavande1 left a comment

Choose a reason for hiding this comment

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

I have tested this. LGTM 👍

Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

@katinthehatsite , it works great! I tested it the PR with the backend PR 195447-ghe-Automattic/wpcom . However I noticed that we are sending paths option, which I believe is not necessary. In that case I also suggest renaming the include_path_list param to avoid confusion with a valid param that uses VaultPress.

Comment on lines +828 to +834
if ( specificSelectionPaths && specificSelectionPaths.length > 0 ) {
const options = optionsToSync ? [ ...optionsToSync, 'paths' ] : [ 'paths' ];
formData.push( [ 'options', options.join( ',' ) ] );

const joinedPaths = specificSelectionPaths.join( ',' );
formData.push( [ 'include_path_list', joinedPaths ] );
} else if ( optionsToSync ) {
Copy link
Member

Choose a reason for hiding this comment

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

@katinthehatsite , Is there any specific reason we are sending the option paths ?
I think that option is not necessary. For the same reason I would suggest renaming include_path_list var name. Maybe push_selection_paths? 🤔 .

Suggested change
if ( specificSelectionPaths && specificSelectionPaths.length > 0 ) {
const options = optionsToSync ? [ ...optionsToSync, 'paths' ] : [ 'paths' ];
formData.push( [ 'options', options.join( ',' ) ] );
const joinedPaths = specificSelectionPaths.join( ',' );
formData.push( [ 'include_path_list', joinedPaths ] );
} else if ( optionsToSync ) {
if ( specificSelectionPaths && specificSelectionPaths.length > 0 ) {
const joinedPaths = specificSelectionPaths.join( ',' );
formData.push( [ 'push_selection_paths', joinedPaths ] );
}
if ( optionsToSync ) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@katinthehatsite , Is there any specific reason we are sending the option paths ?

Don't we need to send SQL which does not come as a part of wp-content so that we can display information regarding the database being pushed to the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For example, this is what we get when choosing database:

optionsToSync [ 'sqls', 'plugins' ]
specificSelectionPaths [ 'plugins/akismet' ]

And this is what we get when choosing all the files:


This is what happens when we select everything:

```optionsToSync [ 'all' ]
specificSelectionPaths undefined

And this is what happens when we select just database:

optionsToSync [ 'sqls' ]
specificSelectionPaths undefined

Copy link
Member

Choose a reason for hiding this comment

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

My comment is specific about appending pahts to the options we send to the backend:
const options = optionsToSync ? [ ...optionsToSync, 'paths' ] : [ 'paths' ];

Studio was not using that option before, and AFAIK that option is not necessary.

Copy link
Member

@sejas sejas Nov 6, 2025

Choose a reason for hiding this comment

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

I was suspicious of the paths option because the official parameter include_path_list that VaultPress requires needs to be in base64. It seems to me that we are sending both the paths option and the include_path_list to the backend, and then from the backend to VaultPress. However, the include_path_list will actually be ignored because it's not in base64.

Don't we need to send SQL which does not come as a part of wp-content so that we can display information regarding the database being pushed to the user?

Yes, sqls is a valid option, that we need to send when database is checked.

For example, this is what we get when choosing database: ....

Those are correct values ! 👌

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