refactor(gui): Migrate background threads and logic methods to AppController

This commit is contained in:
2026-03-04 11:03:24 -05:00
parent f796292fb5
commit 9260c7dee5
3 changed files with 1411 additions and 1366 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

26
test_migration_sanity.py Normal file
View File

@@ -0,0 +1,26 @@
import os
import sys
# Ensure src/ is in path
project_root = os.path.dirname(os.path.abspath(__file__))
src_path = os.path.join(project_root, "src")
sys.path.insert(0, src_path)
# Mock ImGui bundle to avoid needing a window for simple state check
from unittest.mock import MagicMock
import sys
sys.modules['imgui_bundle'] = MagicMock()
sys.modules['imgui_bundle.imgui'] = MagicMock()
sys.modules['imgui_bundle.hello_imgui'] = MagicMock()
sys.modules['imgui_bundle.immapp'] = MagicMock()
try:
from gui_2 import App
app = App()
print("App instantiated successfully!")
print(f"Controller active_project_path: {app.controller.active_project_path}")
print(f"App config: {app.config is app.controller.config}") # Should be True via __getattr__
except Exception as e:
print(f"Failed to instantiate App: {e}")
import traceback
traceback.print_exc()