Audit finding
RuntimeCoordinator currently owns or coordinates all of the following:
- local overlay toggle;
- persistent assignment toggle;
- automatic-mode mutation;
- foreground-window handling;
- settings-change handling;
- automatic activation evaluation;
- manual refresh;
- emergency shutdown;
- overlay fault translation;
- notification text;
- commit reentrancy suppression.
The class has many collaborators, including several raw delegates, and changes to unrelated runtime behavior converge on one file. This weakens KISS, clean-code cohesion and Single Point of Authority boundaries.
Target state
Keep ApplicationStateController as the runtime-state authority, but split runtime behavior into focused use cases/ports. A small façade may remain for the composition root.
Suggested responsibilities:
- session commands: local toggle, emergency, exit;
- assignment commands: add/enable/disable and automatic-mode changes;
- automatic activation evaluator;
- settings/foreground event coordinator;
- fault and notification mapping.
Avoid introducing an event bus or dependency-injection container.
Acceptance criteria
Audit finding
RuntimeCoordinatorcurrently owns or coordinates all of the following:The class has many collaborators, including several raw delegates, and changes to unrelated runtime behavior converge on one file. This weakens KISS, clean-code cohesion and Single Point of Authority boundaries.
Target state
Keep
ApplicationStateControlleras the runtime-state authority, but split runtime behavior into focused use cases/ports. A small façade may remain for the composition root.Suggested responsibilities:
Avoid introducing an event bus or dependency-injection container.
Acceptance criteria
ApplicationStateControllerremains the sole runtime state-transition authority.