Audit finding
OverlaySession now provides a coherent aggregate boundary, but the class still owns several independently changing responsibilities:
- primary overlay creation, retargeting and shutdown;
- native-menu tracker lifecycle;
- transient popup overlay creation and disposal;
- bidirectional target/overlay maps;
- cross-overlay exclusion-list calculation and application;
- popup synchronization ordering;
- recovery and cleanup after subordinate failures.
The aggregate is behaviorally sound, but its internal state space is growing and menu-specific changes can affect primary-overlay lifecycle code.
Target state
Keep OverlaySession as the public aggregate/facade and extract small internal collaborators, for example:
- a primary-overlay slot/lifecycle owner;
- a transient menu-overlay collection;
- an exclusion-list calculator/applier.
Prefer simple composition. Do not introduce a dependency-injection container, event bus or repository layer.
Acceptance criteria
Audit finding
OverlaySessionnow provides a coherent aggregate boundary, but the class still owns several independently changing responsibilities:The aggregate is behaviorally sound, but its internal state space is growing and menu-specific changes can affect primary-overlay lifecycle code.
Target state
Keep
OverlaySessionas the public aggregate/facade and extract small internal collaborators, for example:Prefer simple composition. Do not introduce a dependency-injection container, event bus or repository layer.
Acceptance criteria
OverlaySessionremains the single public owner of one active overlay session.IRuntimeOverlayandOverlayActivationRequestcontracts do not grow additional overloads.