Skip to content

ux: allow interrupting in-progress push operation in dialog - #2632

Open
sdpfigueiredo wants to merge 1 commit into
sourcegit-scm:developfrom
sdpfigueiredo:feature/2603-push-dialog-cancel
Open

ux: allow interrupting in-progress push operation in dialog#2632
sdpfigueiredo wants to merge 1 commit into
sourcegit-scm:developfrom
sdpfigueiredo:feature/2603-push-dialog-cancel

Conversation

@sdpfigueiredo

@sdpfigueiredo sdpfigueiredo commented Aug 17, 2026

Copy link
Copy Markdown

Resolve #2603

Problem

When the remote server is unreachable (e.g. corporate VPN down), the Push Changes to Remote dialog blocks for minutes on the hung git push process with no way to interrupt it — the dialog is not closable while the operation is in progress.

Solution

Add an opt-in cancellation mechanism for popups and wire it up for the Push dialog:

  • Popup base class gains CanCancel (default false) and Cancel(), and Cleanup() becomes virtual.
  • Push overrides CanCancel => true and Cancel() → cancels a CancellationTokenSource whose token is passed to the push command via the existing .WithCancellation(token) extension. Command.ExecAsync() already kills the git process tree on cancellation, and returns true when cancelled — so the dialog closes itself once the operation is interrupted.
  • PopupRunningStatus shows a CANCEL button next to the running indicator, visible only when the popup opts in (CanCancel).
  • LauncherPage.CancelPopup() now forwards to popup.Cancel() when a cancellable popup is in progress, so ESC and mask-click also interrupt the running push.

Behavior

  1. Push is running (hung on unreachable remote)
  2. User clicks CANCEL (or presses ESC / clicks outside)
  3. git push process tree is killed
  4. Dialog closes immediately

Notes

  • Changes are opt-in: no other dialog is affected (button only appears for popups with CanCancel == true).
  • PushTag / PushRevision follow the same pattern and can opt in later if desired.

Tested: dotnet build clean (0 warnings / 0 errors). Windows win-x64 NativeAOT publish successful.

Screenshot

Captura de ecrã 2026-08-17 215930

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.

1 participant