Replace the taskbar observer UI Automation subscription with Win32 shell signals - #106
Merged
Merged
Conversation
…ell signals The observer registered UI Automation structure and property event handlers rooted at the taskbar. UI Automation wires event subscriptions desktop-wide, so browsers such as Chrome treated QuickPods.TaskbarObserver.exe as an assistive-technology client, enabled accessibility mode, and consumed CPU. The observer now drives invalidation from a shell hook window, a WinEvent hook scoped to the Explorer process and the taskbar HWND tree, registry change notifications for taskbar settings, shell broadcast messages, the existing identity poll, and a settle timer. Title redraw notifications are ignored while taskbar labels are hidden and throttled otherwise. The wire contract, host lifecycle, and one-shot host scans are unchanged, and the observer no longer needs the Windows Desktop framework. Add TaskbarSignalPolicy unit tests, update the self-contained payload check, document the change in ADR-0002, and add a troubleshooting entry for Chrome.
The .NET SDK patch now rolled forward by global.json resolves the implicit Microsoft.DotNet.ILCompiler reference to 10.0.11, so locked-mode restore fails on CI and locally until the lock file is regenerated.
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.
Summary
QuickPods.TaskbarObserver.exeno longer registers a UI Automation event subscription. It drives invalidation from a hidden shell hook window (RegisterShellHookWindow), aSetWinEventHookregistration scoped to the Explorer process and the taskbar HWND tree, registry change notifications for the taskbar settings keys, shell broadcast messages, the existing 250 ms Explorer identity poll, and a 400 ms settle timer. Title redraw notifications are ignored while taskbar labels are hidden (the default) and throttled to once per second otherwise. The observer dropsUseWPF; the wire contract (v7), host lifecycle handling, job-object containment, and the host's one-shot UI Automation scans are unchanged. The classification logic lives in a pureTaskbarSignalPolicywith unit tests.quickpods.taskbarobserver.exeunderchrome://accessibility, and burned CPU. Raw diagnostics on a live machine also showed some applications emitHSHELL_REDRAWseveral times per second, which motivated gating redraws on the label setting.Related issue
Closes #
Validation
./build/Test-RepositoryPublicReadiness.ps1dotnet format QuickPods.sln --verify-no-changes --no-restore --severity warndotnet build QuickPods.sln -c Release --no-restoredotnet test QuickPods.sln -c Release --no-build --no-restore -- RunConfiguration.TreatNoTestsAsError=true(Foundation: 189 passed, including 40 newTaskbarSignalPolicyTests)Local validation on Windows 11:
UIAutomation*orPresentation*modules (the previous build loaded ten), stays alive across a 30-second idle run with noObserverFaultedlog entries, and keeps a stable handle count.TaskbarSignalSubscriptionreported zero signals at steady state and delivered window-created signals plus one settle signal when a console window opened; raw diagnostics confirmedHSHELL_WINDOWCREATEDandHSHELL_WINDOWDESTROYEDboth arrive.chrome://accessibilitycheck after a browser restart andbuild/Test-ExplorerRecovery.ps1 -ConfirmExplorerRestart; both are listed in ADR-0002 Verification.Documentation and privacy
Remaining risk
SHAppBarMessageposition notifications if a placement change ever goes unnoticed within the watchdog interval.