Skip to content

Render correct error and enable buttons when pull failed#2964

Open
nightnei wants to merge 1 commit intotrunkfrom
printCorrectErrorAndEnableButtonsWhenPullFailed
Open

Render correct error and enable buttons when pull failed#2964
nightnei wants to merge 1 commit intotrunkfrom
printCorrectErrorAndEnableButtonsWhenPullFailed

Conversation

@nightnei
Copy link
Copy Markdown
Contributor

@nightnei nightnei commented Apr 2, 2026

Related issues

How AI was used in this PR

AI assisted me with the investigation and writing code, but the solution is mine.

Proposed Changes

This PR fixes two issues when pulling failed:

  1. Before, the buttons were always disabled. This PR fixes it to enable "Disconnect/Pull" buttons after failing.
  2. Before, we always printed error "Failed to check backup file size. Please try again." for any reason of failing the the pulling flow. We should at least print a real general error, e.g., "Pulling failed" or better - specific error, to help the user understand the issue at a glance and fix it w/o extra actions.

Testing Instructions

  1. Create a Pressable site (I used Pressable, but teh same should work with dotcom)
  2. Create a new DB table "wp_Links", so that you have both wp_links and wp_Links
  3. Open Studion -> Sync -> Pull this site to Studio
  4. Immediately cancel pulling
  5. Assert that it's canceled (However it's not expected to have regression here, but let it be 😄)
  6. Pull again
  7. Wait for "Downloading backup" status and cancel
  8. Assert that it's canceled well, w/o regression (it's important, since it's where we are testign new currentState?.status.key === 'cancelled' condition)
  9. Pull again
  10. Wait till you see an error
  11. Assert that you see real error (Previously you would see Failed to check backup file size.)
    :Screenshot 2026-04-02 at 15 13 07
  12. Click "Ok"
  13. Assert that "Disconnect" and "Pull" buttons are enabled (Previously they were still disabled)

@nightnei nightnei requested a review from a team April 2, 2026 14:33
@nightnei nightnei self-assigned this Apr 2, 2026
@wpmobilebot
Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 1343dc3 vs trunk

app-size

Metric trunk 1343dc3 Diff Change
App Size (Mac) 1271.61 MB 1271.61 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 1343dc3 Diff Change
load 1855 ms 1873 ms +18 ms ⚪ 0.0%

site-startup

Metric trunk 1343dc3 Diff Change
siteCreation 8178 ms 9177 ms +999 ms 🔴 12.2%
siteStartup 4860 ms 4947 ms +87 ms 🔴 1.8%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

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.

2 participants