Skip to content

[KISS/SPoA] Decompose Win32MenuWindowTracker into hook, enumeration and policy components #57

Description

@github-actions

Audit finding

Win32MenuWindowTracker.cs contains the event args, public tracker interface, association policy, timer coordinator, WinEvent hook management, message-only window, menu-window enumeration, deduplication and native declarations.

As a result, a single class/file owns notification transport, candidate discovery, association policy and publication state.

Target state

Keep a small Win32MenuWindowTracker coordinator and extract focused collaborators:

  • menu event hook/refresh signal source;
  • menu-window enumerator;
  • candidate/association policy;
  • changed-window-set publisher or snapshot comparer.

Native declarations should move to the consolidated interop boundary tracked separately.

Acceptance criteria

  • The tracker coordinates injected hook and enumeration ports.
  • Candidate validation is pure and unit-testable without native windows.
  • WinEvent/message-window behavior is isolated and disposable independently.
  • Enumeration failure and hook failure policies remain explicit.
  • Window-set deduplication has focused tests.
  • The public tracker behavior and 75-ms fallback verification remain unchanged until the timing-policy issue is completed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions