CmdPal: Replace SupersedingAsyncGate with a coalescing runner #51381

Open
jiripolasek opened 6:35pm on October 17, 2026 wants to merge 5 commits into microsoft/powertoys main from
dev/jpolasek/f/51369-cmdpal-coalescing-runner

Pull request #51381 quality checks

Code files and functions touched by this pull request are analyzed below.

Quality targets

How does this pull request compare to chosen code quality targets? Read more about code quality targets.

Target name Target value This PR
Maximum Diff Delta per PR 500 0
Maximum comment count per PR 10 0
Pull request maximum business days between activity 3 17
Pull request maximum business days open 5 17

Coupled files

Are there any files from this commit that are always committed alongside another file? This often suggests that there exists code coupling to potentially remove. Read more about code coupling

Committed together % Code file
Coupled code file
Commits in PR with both
100 src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.UnitTests/PowerToysRootPageServiceTests.cs
src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysRootPageService.cs
1
90 src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysRootPageService.cs
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs
1
83 src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs
1
75 src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs
1
72 src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysRootPageService.cs
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs
1

Biggest files changes in pull request

Path View whole file Lines removed Lines added Final line count
src/modules/cmdpal/Tests/Microsoft.CmdPal.Common.UnitTests/Helpers/CoalescingAsyncRunnerTests.cs 0 450 450
src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/CoalescingAsyncRunner.cs 0 204 204
src/modules/cmdpal/Microsoft.CmdPal.Common/Helpers/SupersedingAsyncGate.cs 135 0 0
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Services/DefaultCommandProviderCache.cs 2 20 144
src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Bookmarks.UnitTests/BookmarkManagerPersistenceTests.cs 0 67 67
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Bookmark/BookmarksManager.cs 1 10 177
src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Bookmarks.UnitTests/MockBookmarkDataSource.cs 18 3 36
src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Bookmarks.UnitTests/BookmarkManagerTests.cs 3 2 232
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/DefaultCommandProviderCacheTests.cs 0 69 69
src/modules/cmdpal/Tests/Microsoft.CmdPal.Common.UnitTests/Helpers/CoalescingAsyncRunnerTestHelper.cs 0 17 17
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs 16 150 891
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/TopLevelCommandManagerLoadingTests.cs 0 842 842
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelCommandManager.cs 26 396 1416
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/TopLevelCommandManagerLifecycleRaceTests.cs 0 165 165
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/TopLevelCommandManagerReviewFixTests.cs 0 162 162
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/TopLevelCommandManagerEnableTimeoutStateTests.cs 0 328 328
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/TopLevelCommandManagerCommandBoundaryTests.cs 0 134 134
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.ViewModels.UnitTests/TopLevelCommandManagerTimeoutTests.cs 0 281 281
src/modules/cmdpal/Microsoft.CmdPal.UI/PowerToysRootPageService.cs 2 9 107
src/modules/cmdpal/Tests/Microsoft.CmdPal.UI.UnitTests/PowerToysRootPageServiceTests.cs 0 114 210

️ Biggest functions grown or shrunk by pull request

Which functions had their line count change as part of this pull request?

Qualified function name View whole function Lines removed Lines added Final line count
BookmarkManager_LegacyData_IdsArePersistedAcrossLoads 0 1 39
ShellViewModel::PostLoadRootPageAsync 2 9 17