Skip to content

Fix push cancellation error dialog - #2633

Merged
epeicher merged 1 commit into
trunkfrom
stu-1087-cancelling-a-push-operation-returns-an-error
Feb 23, 2026
Merged

Fix push cancellation error dialog#2633
epeicher merged 1 commit into
trunkfrom
stu-1087-cancelling-a-push-operation-returns-an-error

Conversation

@epeicher

@epeicher epeicher commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Related issues

Proposed Changes

  • Use .includes('Export aborted') instead of === 'Export aborted' when checking for push cancellation errors in the renderer process.
  • Electron IPC wraps error messages as "Error invoking remote method '...': Error: <message>", so the strict equality check never matched the wrapped message. This caused cancelling a push during the export phase to show an error dialog and report to Sentry, instead of gracefully handling the cancellation.
  • This is consistent with other IPC error checks in the codebase (e.g., use-site-details.tsx uses .includes() for the same reason).

Testing Instructions

  1. Connect a local site to a WordPress.com site
  2. Start a Push operation
  3. Immediately cancel the push while it's in the "Creating backup" (export) phase
  4. Verify that the push is cancelled gracefully with a "Push cancelled" notification — no error dialog should appear

Pre-merge Checklist

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

Electron IPC wraps error messages as "Error invoking remote method '...': Error: <message>",
so the strict equality check `=== 'Export aborted'` never matched. Use `.includes()` instead,
consistent with other IPC error checks in the codebase.
@epeicher epeicher self-assigned this Feb 20, 2026
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing a17aa0b vs trunk

site-editor

Metric trunk a17aa0b Diff Change
load 1440.00 ms 1468.00 ms +28.00 ms ⚪ 0.0%

site-startup

Metric trunk a17aa0b Diff Change
siteCreation 7122.00 ms 7094.00 ms -28.00 ms ⚪ 0.0%
siteStartup 3958.00 ms 4911.00 ms +953.00 ms 🔴 24.1%

Results are median values from multiple test runs.

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

@epeicher
epeicher requested a review from a team February 20, 2026 17:19

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works as described
LGTM 👍

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This worked as expected for me 👍

@epeicher
epeicher merged commit 82bc105 into trunk Feb 23, 2026
10 checks passed
@epeicher
epeicher deleted the stu-1087-cancelling-a-push-operation-returns-an-error branch February 23, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants