Repository navigation
fix: Escape no longer stops an uninstall or a System Fixes repair half-way, and Uninstaller's Cancel stops a batch between apps - #2941
Merged
Conversation
…f-way, and Uninstaller's Cancel stops a batch between apps - UninstallerViewModel gives the uninstaller it runs a token of its own, which only Dispose cancels. Cancel and Escape stop a batch before its next app, after the running uninstaller has finished, and the status line says so. Both ended the running uninstaller, which can leave its program half-removed. - SystemFixesViewModel overrides no EscapeCancel: every run on the tab changes Windows, and Escape ended SFC, DISM and the scripted repairs half-way. The Cancel button still stops one. - EveryCancellableTab_LetsEscapeReachItsOwnCancelCommand lists System Fixes as declining Escape, with the reason, and fails an entry whose view has no Cancel button any more.
laurentiu021
deleted the
fix/escape-never-stops-an-uninstall-or-repair
branch
October 21, 2026 22:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 3 of #2834 for Uninstaller and System Fixes.
Confirmed in the code: Uninstaller passed the batch's own token to
UninstallAsyncandUninstallLocalAsync, so Cancel, and Escape while the batch ran, cancelled the running uninstaller, andRunProcessAsyncandRunProcessWithShellAsyncanswer a cancel by ending its process tree. System Fixes'EscapeCancelreturnedCancelCommandwheneverIsBusywas set, and every run on that tab changes Windows: SFC, DISM/RestoreHealth, the Windows Update reset and the WinGet reinstall.The issue proposed that Escape stop only a read-only scan on both tabs.
EveryCancellableTab_LetsEscapeReachItsOwnCancelCommandholds Escape and a tab's Cancel button to the same flag, so I took a different way on each:Disposecancels, so closing SysManager still ends it after asking, as before. Cancel and Escape stop the batch before its next app instead, and while the running uninstaller finishes the status line says "Stopping after X. Its uninstaller finishes first, so it is not left half-removed.". An uninstaller with a window of its own can still be cancelled in that window. Escape and the button keep followingIsBusy, and on a scan both stop the scan as before.EscapeCanceloverride, so Escape stops nothing on the tab. Its Cancel button still stops a repair, for a stop that is meant.SystemFixesViewas declining Escape, with the reason, requires its view model to override noEscapeCancelor one that returns null, and fails an entry whose view has no Cancel button any more.The README's count of tabs Escape can cancel goes from 26 to 25, and the keyboard section says what Escape does on Windows Features, Uninstaller and System Fixes.
Still open on #2834: part 1 (naming and offering the parent features
-Allturns on) and part 5 (where the admin banner sits).Docs
README: the keyboard section, Uninstaller and System Fixes. ARCHITECTURE:
UninstallerViewModelandSystemFixesViewModel.Tests
UninstallerViewModelTests: the cancel test now has three apps and cancels during the second, whose token is not cancelled; the line says it waits, the second finishes, the third never starts, and the batch reports "cancelled after 2/3 completed". New:Disposestill ends the running uninstaller. Both drain the batch infinally, so a failure cannot leave it holding the install lock for the next test.SystemFixesViewModelTests: Escape is null while SFC runs, and the Cancel button still cancels it.Disposesparing it (also caught byEveryDisposedCancellationSource_IsCancelledFirst), the waiting line, System Fixes answering Escape (also the README count), the guard without the exemption, and a stale exemption.UninstallerViewModelTests,UninstallerViewModelGateTests,SystemFixesViewModelTests,ArchitectureTests,AcceleratorRoutingTests,ActivityLogServiceTests,SelectionSurvivesRescanGroupBTests, the four other Uninstaller classes,WingetFailureTests,InclusiveTermsTestsandWindowsFeaturesTests(555), and the integrationFilteredOutListViewUiTests(8). All four projects build with 0 warnings, anddotnet format --verify-no-changesis clean.