refactor(gui): Migrate background threads and logic methods to AppController
This commit is contained in:
File diff suppressed because it is too large
Load Diff
1393
src/gui_2.py
1393
src/gui_2.py
File diff suppressed because it is too large
Load Diff
26
test_migration_sanity.py
Normal file
26
test_migration_sanity.py
Normal 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()
|
||||
Reference in New Issue
Block a user