Skip to content

Keep the tray menu responsive during HID polling - #13

Merged
vermi5 merged 1 commit into
mainfrom
agent/dock-source-sleep-state
Jul 26, 2026
Merged

Keep the tray menu responsive during HID polling#13
vermi5 merged 1 commit into
mainfrom
agent/dock-source-sleep-state

Conversation

@vermi5

@vermi5 vermi5 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What changed

  • Run controller, Dock, and automatic lighting HID refresh work off the WinForms UI thread.
  • Coalesce overlapping refresh requests and serialize HID access across refresh, diagnostics, and lighting operations.
  • Publish completed snapshots back through the UI timer.
  • Document the background refresh architecture and user-facing fix.

Why

The synchronous refresh path could wait several seconds for controller or Dock
HID reports while running on the Windows message loop. If a right-click landed
during that work, the tray context menu could not open until the timeout
completed.

Impact

The tray menu remains responsive while a controller wakes, the Dock is quiet,
or HID reads time out. The last published battery state remains visible until
the background refresh completes.

Validation

  • Compiled all application sources with the .NET Framework C# compiler using /warn:4.
  • Ran VaderLedProtocolSelfTest.exe successfully.
  • Ran git diff --check successfully.

@vermi5
vermi5 merged commit 2431f71 into main Jul 26, 2026
2 checks passed
@vermi5
vermi5 deleted the agent/dock-source-sleep-state branch July 26, 2026 17:41
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