From 04eff51eb9d29905f3c58e25d41ebbaf9931ee66 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 9 May 2026 08:19:01 -0400 Subject: [PATCH] feat(controller): Add private _ai_status and _mma_status attributes to AppController --- src/app_controller.py | 3 +++ tests/test_status_encapsulation.py | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/test_status_encapsulation.py diff --git a/src/app_controller.py b/src/app_controller.py index cd49205..733b466 100644 --- a/src/app_controller.py +++ b/src/app_controller.py @@ -168,6 +168,7 @@ class AppController: self._show_patch_modal: bool = False self._patch_error_message: Optional[str] = None self.mma_status: str = "idle" + self._mma_status: str = "idle" self._tool_log: List[Dict[str, Any]] = [] self._tool_stats: Dict[str, Dict[str, Any]] = {} # {tool_name: {"count": 0, "total_time_ms": 0.0, "failures": 0}} self._cached_cache_stats: Dict[str, Any] = {} # Pre-computed cache stats for GUI @@ -251,6 +252,7 @@ class AppController: self.proposed_tracks: List[Dict[str, Any]] = [] self._show_track_proposal_modal: bool = False self.ai_status: str = 'idle' + self._ai_status: str = 'idle' self.ai_response: str = '' self.last_md: str = '' self.last_aggregate_markdown: str = '' @@ -3185,3 +3187,4 @@ class AppController: else: self.active_tickets = [] + diff --git a/tests/test_status_encapsulation.py b/tests/test_status_encapsulation.py new file mode 100644 index 0000000..fef359b --- /dev/null +++ b/tests/test_status_encapsulation.py @@ -0,0 +1,8 @@ +import src.app_controller as app_controller + +def test_status_attributes_exist(): + controller = app_controller.AppController() + assert hasattr(controller, '_ai_status') + assert hasattr(controller, '_mma_status') + assert controller._ai_status == 'idle' + assert controller._mma_status == 'idle'