-
Notifications
You must be signed in to change notification settings - Fork 53
Studio Sync: Implement resumable uploads for studio sync using Node process #2212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Studio Sync: Implement resumable uploads for studio sync using Node process #2212
Conversation
26ac7f4 to
3dd4a62
Compare
📊 Performance Test ResultsComparing 0f3f1be vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
fredrikekelund
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very promising! I left a couple of comments, but overall, the architecture is clear and makes sense 👍
I wasn't able to test the changes, though, because the upload keeps failing, and I get errors like this in my Studio terminal session:
Upload request error tus: unexpected response while creating upload, originated from request (method: POST, url: https://public-api.wordpress.com/rest/v1.1/studio-file-uploads/241885143, response code: 500, response text: , request id: n/a)
fredrikekelund
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and works great 👍 I left a couple of final comments that would be good to address, but nothing blocking.
7a4b9ac to
9514c63
Compare
epeicher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gavande1 for implementing this functionality! I have tested it, and it works as expected, I can see the file upload resuming after disconnecting and re-connecting the wifi. This is a great functionality for the user 🙌
I have tested also the trunk version and it works fine, while I can reproduce the previous error in trunk if there is a disconnection.
| Trunk with disconnection | Trunk successful upload |
|---|---|
![]() |
![]() |
Video with an upload and a disconnection while uploading
CleanShot.2025-12-11.at.12.29.27.mp4
One question for a possible follow-up: do you think that once these changes are merged, we could work on resuming uploads even if the user closes Studio and reopens it? That would be another step toward improving the Sync functionality.
gcsecsey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gavande1 for working on this feature, it'll be a great improvement for the upload experience!
I tested this together with the backend changes, and can confirm that the upload continues as described after disconnecting the wifi:
CleanShot.2025-12-11.at.12.20.21.mp4
One thing I noticed while testing this is that if the disconnect happens after the upload step, the renderer crashes. In a follow-up, we can ensure that we handle the offline states for the whole sync flow.
CleanShot.2025-12-11.at.12.22.15.mp4
hook.js:608 A non-serializable value was detected in the state, in the path: `wpcomSitesApi.queries.getWpComSites({"connectedSiteIds":[249663985],"userId":37463824}).error.data`. Value: Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.
|
@gcsecsey and @epeicher Thanks for the review and suggesting follow up tasks.
Yes. that's one of the suggestion I received from Wojtek as well. It would greatly improve experience for the user. I will create follow up tasks for that once this is merged. |
6977914 to
47a7170
Compare
0ff0e36 to
a9926c8
Compare
a9926c8 to
5aa55de
Compare


Related issues
Proposed Changes
Testing Instructions
Note
There are quite a number of steps to test this PR fully. I am happy to pair with you or help you out with the setup if you need.
Checkout 196922-ghe-Automattic/wpcom your sandbox.Sandbox public-api.wordpress.com and make it in FULL ACCESS mode.npm install & install startCleanShot.2025-12-09.at.11.45.16.mp4
Pre-merge Checklist