Compare commits
2 Commits
f796292fb5
...
0152f05cca
| Author | SHA1 | Date | |
|---|---|---|---|
| 0152f05cca | |||
| 9260c7dee5 |
@@ -7,16 +7,8 @@
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 1: State Migration' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Logic & Background Thread Migration
|
||||
- [ ] Task: Extract Background Threads & Event Queue
|
||||
- [ ] WHERE: `gui_2.py` (e.g., `_init_ai_and_hooks`, `_process_event_queue`)
|
||||
- [ ] WHAT: Move the `AsyncEventQueue`, asyncio worker thread, and HookServer initialization to the controller.
|
||||
- [ ] HOW: The GUI should just call `self.controller.start_services()` and read the `_pending_gui_tasks` queue.
|
||||
- [ ] SAFETY: Thread lifecycle management is critical. Ensure shutdown hooks are migrated.
|
||||
- [ ] Task: Extract I/O and AI Methods
|
||||
- [ ] WHERE: `gui_2.py` (`_cb_plan_epic`, `_flush_to_project`, `_cb_create_track`)
|
||||
- [ ] WHAT: Move business logic methods to the controller.
|
||||
- [ ] HOW: GUI callbacks simply become `lambda: self.controller.plan_epic(input)`.
|
||||
- [ ] SAFETY: Verify Hook API endpoints still work.
|
||||
- [x] Task: Extract Background Threads & Event Queue [9260c7d]
|
||||
- [x] Task: Extract I/O and AI Methods [9260c7d]
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Logic Migration' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Test Suite Refactoring
|
||||
|
||||
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