diff --git a/src/app_controller.py b/src/app_controller.py index b3c12f92..2505b27c 100644 --- a/src/app_controller.py +++ b/src/app_controller.py @@ -3524,7 +3524,7 @@ class AppController: `self._last_request_errors` for sub-track 4 GUI display.""" try: symbols = parse_symbols(user_msg) - file_paths = [f.path for f in file_items] + file_paths = [f["path"] if isinstance(f, dict) else f.path for f in file_items] for symbol in symbols: res = get_symbol_definition(symbol, file_paths) if res: diff --git a/tests/test_arch_boundary_phase2.py b/tests/test_arch_boundary_phase2.py index e04e4c2f..8a3726be 100644 --- a/tests/test_arch_boundary_phase2.py +++ b/tests/test_arch_boundary_phase2.py @@ -85,7 +85,9 @@ class TestArchBoundaryPhase2(unittest.TestCase): with patch("src.shell_runner.run_powershell") as mock_run: controller.test_hooks_enabled = False # Force manual approval (dialog) res = controller._confirm_and_run("script", ".") - self.assertIsNone(res) + # Empty-string sentinel signals "no dispatch happened" without + # using Optional[str] in the production signature. + self.assertEqual(res, "") self.assertFalse(mock_run.called) def test_non_mutating_tool_skips_callback(self) -> None: diff --git a/tests/test_hot_reload_integration.py b/tests/test_hot_reload_integration.py index 035bbe19..ce69c41c 100644 --- a/tests/test_hot_reload_integration.py +++ b/tests/test_hot_reload_integration.py @@ -136,13 +136,14 @@ class TestHotReloadTriggerIntegration: mock_app.ui_crt_filter = False mock_app.show_windows = {} with patch('src.gui_2.imgui', mock_imgui), \ - patch('src.gui_2.theme') as mock_theme, \ - patch('src.gui_2.bg_shader') as mock_bg, \ - patch('src.gui_2.render_custom_title_bar'), \ - patch('src.gui_2.render_shader_live_editor'), \ - patch('src.gui_2.render_history_window'), \ - patch('src.gui_2.render_main_interface'): - mock_bg.get_bg.return_value.enabled = False + patch('src.gui_2.theme') as mock_theme, \ + patch('src.gui_2.get_bg') as mock_get_bg, \ + patch('src.gui_2.render_custom_title_bar'), \ + patch('src.gui_2.render_shader_live_editor'), \ + patch('src.gui_2.render_history_window'), \ + patch('src.gui_2.render_main_interface'): + mock_bg = mock_get_bg.return_value + mock_bg.enabled = False mock_theme.is_nerv_active.return_value = False App._gui_func(mock_app) mock_app._trigger_hot_reload.assert_called_once()