Skip to content

Conversation

@gavande1
Copy link
Contributor

@gavande1 gavande1 commented Jan 12, 2026

Related issues

Proposed Changes

  • Add pause/resume buttons for TUS uploads during sync
  • Add manual pause state separate from network pause
  • Rename sync-upload-paused to sync-upload-network-paused for clarity
  • Add pause/play icon components
  • Update UI to show info icon with tooltip when manually paused

Testing Instructions

  • Checkout this branch
  • Run npm start
  • Connect a site to sync if not already connected
  • Start a sync push operation
  • Click pause button during upload phase
  • Verify upload pauses and shows resume button
  • Click resume to continue upload
  • Verify upload resumes from where it left off
CleanShot.2026-01-12.at.17.02.49.mp4

@gavande1 gavande1 changed the title Add pause/unpause functionality for sync uploads Sync: Add pause/unpause functionality for sync uploads Jan 12, 2026
@gavande1 gavande1 self-assigned this Jan 12, 2026
@gavande1 gavande1 requested a review from a team January 12, 2026 11:44
@wpmobilebot
Copy link

wpmobilebot commented Jan 12, 2026

📊 Performance Test Results

Comparing 9be6d83 vs trunk

site-editor

Metric trunk 9be6d83 Diff Change
load 7587.00 ms 5657.00 ms -1930.00 ms 🟢 -25.4%

site-startup

Metric trunk 9be6d83 Diff Change
siteCreation 9097.00 ms 16089.00 ms +6992.00 ms 🔴 76.9%
siteStartup 3960.00 ms 3952.00 ms -8.00 ms 🟢 -0.2%

Results are median values from multiple test runs.

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

Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

This a great! Thanks for adding the Pause/Play button to the sync process, Rahul.

The changes look good to me and they work as expected. 👍🏼

I left couple comments on things I noticed.


When clicking the Play/Pause button, the progress jumps a bit. Maybe we could consider adjusting the logic to prevent that behavior.

Image

@ivan-ottinger
Copy link
Contributor

ivan-ottinger commented Jan 13, 2026

Actually, I noticed one issue: Sometimes, when pausing and resuming the upload, the operation fails with the following error:

[2026-01-13T15:02:32.232Z][info][main] Database export saved to /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/studio_exportUyHKOg
[2026-01-13T15:02:38.132Z][info][main] Backup created at: /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/com.wordpress.studio/site_ff7be311-4557-4a5d-bfff-99b997aee54c.tar.gz
[2026-01-13T15:02:40.655Z][erro][main] Error occurred in handler for 'pushArchive': Error: Upload completed but required header not found
    at Object.onSuccess (/Users/ivanottinger/a8c/studio/dist/main/index.js:6468:18)
    at Upload._emitSuccess (/Users/ivanottinger/a8c/studio/node_modules/tus-js-client/lib.es5/upload.js:989:22)
    at /Users/ivanottinger/a8c/studio/node_modules/tus-js-client/lib.es5/upload.js:1158:20
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

@katinthehatsite
Copy link
Contributor

I got the same error as Ivan:

Error occurred in handler for 'pushArchive': Error: Upload completed but required header not found
at Object.onSuccess (/Users/katerynakodonenko/Documents/A8C-Projects/studio/studio/dist/main/index.js:6468:18)
at Upload._emitSuccess (/Users/katerynakodonenko/Documents/A8C-Projects/studio/studio/node_modules/tus-js-client/lib.es5/upload.js:989:22)
at /Users/katerynakodonenko/Documents/A8C-Projects/studio/studio/node_modules/tus-js-client/lib.es5/upload.js:1158:20
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Sentry Logger [log]: Captured error event Error invoking remote method 'pushArchive': Error: Upload completed but required header not found

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 adding these changes, this will be a great improvement for the users!

I found one edge case where I seem to be getting errors:

  • Start push process on a site
  • Pause an upload
  • Cancel the upload
  • Start again the push process for the same site
  • Wait until the upload can be paused
  • Pause the upload
  • Observe that this throws an error:
Image

This is the details that are captured to Sentry:

Sentry Logger [log]: Captured error event `Error invoking remote method 'pushArchive': reply was never sent`

@gavande1 gavande1 force-pushed the stu-1143-pause-unpause-sync-uploads branch from fc6c530 to 6d93fa7 Compare January 14, 2026 17:11
@gavande1
Copy link
Contributor Author

Thanks @ivan-ottinger and @katinthehatsite for noticing this error and reporting them. I have fixed the issue with the cancel push operation. It should also fix the issues you reported earlier. It would great if you could give another review. 🙂

@katinthehatsite
Copy link
Contributor

Thanks @ivan-ottinger and @katinthehatsite for noticing this error and reporting them. I have fixed the issue with the cancel push operation. It should also fix the issues you reported earlier. It would great if you could give another review. 🙂

Nice, I am not seeing these errors anymore 👍 Functionality-wise, everything looked good to me. I will review the code a bit closer tomorrow morning with fresh eyes

@ivan-ottinger
Copy link
Contributor

Thanks @ivan-ottinger and @katinthehatsite for noticing this error and reporting them. I have fixed the issue with the cancel push operation. It should also fix the issues you reported earlier. It would great if you could give another review. 🙂

Thank you for the updates, Rahul. I am still getting error when pausing and resuming, but different one this time:

Database export saved to /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/studio_exportw5IZUQ
Backup created at: /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/com.wordpress.studio/site_fdf6ffd0-6b85-4a3e-82ec-20e6d70b250e.tar.gz
Database export saved to /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/studio_export6HODEZ
Backup created at: /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/com.wordpress.studio/site_fdf6ffd0-6b85-4a3e-82ec-20e6d70b250e.tar.gz
Sentry Logger [log]: Captured error event `Object captured as exception with keys: error, success`
Sentry Logger [error]: Transport disabled

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.

It is looking good overall on my end, I left some minor comments for consideration.

@wojtekn
Copy link
Contributor

wojtekn commented Jan 15, 2026

Feature-wise looks good, but I think we should adjust the design before we merge:

  • icons style doesn't match the X icon, as they are thicker
  • bar width and text position shouldn't change when icons appear

@gavande1
Copy link
Contributor Author

gavande1 commented Jan 16, 2026

icons style doesn't match the X icon, as they are thicker
bar width and text position shouldn't change when icons appear

Thanks, Wojtek, for raising this. These were my concerns as well. I am waiting for a response from @Marinatsu on design feedback.

Edit: I have updated the pause icon to match style of X icon from WordPress icons. I added that in 9be6d83.

@gavande1
Copy link
Contributor Author

Thank you for the updates, Rahul. I am still getting error when pausing and resuming, but different one this time:

Database export saved to /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/studio_exportw5IZUQ
Backup created at: /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/com.wordpress.studio/site_fdf6ffd0-6b85-4a3e-82ec-20e6d70b250e.tar.gz
Database export saved to /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/studio_export6HODEZ
Backup created at: /var/folders/p1/f6m7sk7948g6zj6plt84p13m0000gn/T/com.wordpress.studio/site_fdf6ffd0-6b85-4a3e-82ec-20e6d70b250e.tar.gz
Sentry Logger [log]: Captured error event `Object captured as exception with keys: error, success`
Sentry Logger [error]: Transport disabled

Thanks @ivan-ottinger. I couldn't reproduce the error. But I tried to fix the issue in b6b2040. Can you give a quick test?

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.

I found one more interesting case while testing:

  • Connect two sites to a Studio site
  • Start Push process on the connected site A and pause the upload
  • Start Push process on the connected site B
  • Unpause the uploads
  • Observe the Studio site pushing the changes to two sites at once:
Image

I also noticed an error in Sentry for this case:

Backup created at: /var/folders/bj/1qgxs1qd6_z20tw9llkw842h0000gn/T/com.wordpress.studio/site_d354f946-9026-4a52-a2ff-cd3ac7c2d172.tar.gz
Backup created at: /var/folders/bj/1qgxs1qd6_z20tw9llkw842h0000gn/T/com.wordpress.studio/site_d354f946-9026-4a52-a2ff-cd3ac7c2d172.tar.gz
Sentry Logger [log]: Captured error event `ENOENT: no such file or directory, unlink '/var/folders/bj/1qgxs1qd6_z20tw9llkw842h0000gn/T/com.wordpress.studio/site_d354f946-9026-4a52-a2ff-cd3ac7c2d172.tar.gz'`

I know that we are currently blocking the UI for pushing and pulling more than to one site at a time so I am wondering if we might want to stay consistent here as well:

Image

In terms of functinality, with this edge case, the push worked for one site and for the other one, it sort of got stuck and it is still pending for me. I will update this comment if it goes through but I think it is probably related to the error I saw in Sentry.

@@ -0,0 +1,6 @@
export const PauseIcon = () => (
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that the sizing of the icons is different and I could see that difference visually, not a huge one. What do you think about making it consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 9892f91

@ivan-ottinger
Copy link
Contributor

Thanks @ivan-ottinger. I couldn't reproduce the error. But I tried to fix the issue in b6b2040. Can you give a quick test?

I have run multiple tests and spotted that the issue happens only when we pause at 100% of the upload progress. Since by then the upload is finished, I think we can hide the Pause button at that point, which should resolve the issue.

CleanShot.2026-01-16.at.11.06.54.mp4

@gavande1 gavande1 force-pushed the stu-1143-pause-unpause-sync-uploads branch from 9be6d83 to 9892f91 Compare January 20, 2026 17:54
@gavande1
Copy link
Contributor Author

@ivan-ottinger Thanks for your suggestion. I have applied your suggestion in 2ec6e22.

@ivan-ottinger ivan-ottinger self-requested a review January 21, 2026 09:07
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

@ivan-ottinger Thanks for your suggestion. I have applied your suggestion in 2ec6e22.

Thanks for the update, Rahul! The change there looks good and I can confirm it fixes the issue. I did not observe any other edge cases and pausing / resuming works great. 👍🏼

I understand there might still be a design adjustment related to the buttons coming, but I am already approving the PR in case we would like to merge it in its current state.


Btw, I have tested on a rebased branch with latest trunk locally, just did not push it remotely.

@gavande1
Copy link
Contributor Author

I understand there might still be a design adjustment related to the buttons coming, but I am already approving the PR in case we would like to merge it in its current state.

Tbh, I am not happy with the layout shift it does when the Play/Pause button appears and hides. It definitely needs some better UX in IHMO. cc @Marinatsu 🙂

@crisbusquets
Copy link

Hi!

I reviewed the last video shared.

There are two moments where we have odd layout shifts:

  1. The one @gavande1 described above.
  2. When the icons disappear to make room for the "Error pushing changes".

I see two potential solutions:

  1. Add an easy-in-out transition so everything looks smoother, and it's clear that it transitions from one state to the other
  2. We can also define a fixed width for that, so it doesn't change its size when there's the X and then ▶️, or when it gets replaced with the Clear option when there's an error.

@wojtekn
Copy link
Contributor

wojtekn commented Jan 23, 2026

Thanks for looking into this @crisbusquets

We can also define a fixed width for that, so it doesn't change its size when there's the X and then ▶️, or when it gets replaced with the Clear option when there's an error.

I think this is the simplest path forward and would result in good UX without any animated or non-animated layout shifts.

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.

7 participants