ux: allow interrupting in-progress push operation in dialog - #2632
ux: allow interrupting in-progress push operation in dialog#2632sdpfigueiredo wants to merge 1 commit into
Conversation
love-linger
commented
Aug 18, 2026
Not planned yet. See #1012 |
love-linger
commented
Aug 18, 2026
Currently, we use If you are running |
love-linger
commented
Aug 18, 2026
I've pushed my implementation (only supported Windows) |
Mingun
commented
Aug 18, 2026
Sending Ctrl+C to git process will not interrupt git operation correctly? |
love-linger
commented
Aug 18, 2026
Yes. I just do this on Windows. For Linux/macOS, you can not gracefully terminate a process tree with signal SIGINT/SIGTERM (Process.Start does not spawn process in a seperate session/group) |
Mingun
commented
Aug 18, 2026
Does it matter? I was sure, that the |
love-linger
commented
Aug 18, 2026
As I said - Sending Ctrl+C works fine on Windows. On Linux/macOS, there are some issues in sending signal SIGINT/SIGTERM. See dotnet/runtime#44944 |
aikawayataro
commented
Aug 18, 2026
The way dotnet handles child processes makes it hard to reliably wait for completion. It is safe to kill |
Resolve#2603
Problem
When the remote server is unreachable (e.g. corporate VPN down), the
Push Changes to Remotedialog blocks for minutes on the hunggit pushprocess 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:
Popupbase class gainsCanCancel(defaultfalse) andCancel(), andCleanup()becomes virtual.PushoverridesCanCancel => trueandCancel()→ cancels aCancellationTokenSourcewhose token is passed to the push command via the existing.WithCancellation(token)extension.Command.ExecAsync()already kills the git process tree on cancellation, and returnstruewhen cancelled — so the dialog closes itself once the operation is interrupted.PopupRunningStatusshows a CANCEL button next to the running indicator, visible only when the popup opts in (CanCancel).LauncherPage.CancelPopup()now forwards topopup.Cancel()when a cancellable popup is in progress, so ESC and mask-click also interrupt the running push.Behavior
git pushprocess tree is killedNotes
CanCancel == true).PushTag/PushRevisionfollow the same pattern and can opt in later if desired.Tested:
dotnet buildclean (0 warnings / 0 errors). Windowswin-x64NativeAOT publish successful.Screenshot