From 2ed9867e392ad1eecd5711241cee1f8a9a22e11a Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 22 Mar 2026 12:57:49 -0400 Subject: [PATCH] feat(gui): Rename Context Hub to Project Settings - gui_2.py: Window title changed to 'Project Settings' - app_controller.py: show_windows key updated - Updated tests to reference new name --- .../plan.md | 3 ++- src/app_controller.py | 2 +- src/gui_2.py | 6 ++--- tests/test_gui2_layout.py | 2 +- tests/test_layout_reorganization.py | 4 ++-- tests/test_project_settings_rename.py | 22 +++++++++++++++++++ 6 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 tests/test_project_settings_rename.py diff --git a/conductor/tracks/discussion_hub_panel_reorganization_20260322/plan.md b/conductor/tracks/discussion_hub_panel_reorganization_20260322/plan.md index bae2b0f..683271c 100644 --- a/conductor/tracks/discussion_hub_panel_reorganization_20260322/plan.md +++ b/conductor/tracks/discussion_hub_panel_reorganization_20260322/plan.md @@ -4,7 +4,8 @@ Focus: Remove redundant ui_summary_only, rename Context Hub, establish project-level vs discussion-level separation - [x] Task: Audit current ui_summary_only usages and document behavior to deprecate [f6fe3ba] (embedded audit) -- [~] Task: Remove ui_summary_only checkbox from _render_projects_panel (gui_2.py) +- [x] Task: Remove ui_summary_only checkbox from _render_projects_panel (gui_2.py) [f5d4913] +- [~] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar - [ ] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar - [ ] Task: Remove Context Presets tab from Project Settings (Context Hub) - [ ] Task: Update references in show_windows dict and any help text diff --git a/src/app_controller.py b/src/app_controller.py index ac18d28..3846247 100644 --- a/src/app_controller.py +++ b/src/app_controller.py @@ -950,7 +950,7 @@ class AppController: bg_shader.get_bg().enabled = gui_cfg.get("bg_shader_enabled", False) _default_windows = { - "Context Hub": True, + "Project Settings": True, "Files & Media": True, "AI Settings": True, "MMA Dashboard": True, diff --git a/src/gui_2.py b/src/gui_2.py index bc2638f..9b1b1c1 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -639,9 +639,9 @@ class App: self._tool_log_cache = log_raw self._tool_log_dirty = False - if self.show_windows.get("Context Hub", False): - exp, opened = imgui.begin("Context Hub", self.show_windows["Context Hub"]) - self.show_windows["Context Hub"] = bool(opened) + if self.show_windows.get("Project Settings", False): + exp, opened = imgui.begin("Project Settings", self.show_windows["Project Settings"]) + self.show_windows["Project Settings"] = bool(opened) if exp: if imgui.begin_tab_bar('context_hub_tabs'): if imgui.begin_tab_item('Projects')[0]: diff --git a/tests/test_gui2_layout.py b/tests/test_gui2_layout.py index 0800f28..8fddfa2 100644 --- a/tests/test_gui2_layout.py +++ b/tests/test_gui2_layout.py @@ -6,7 +6,7 @@ def test_gui2_hubs_exist_in_show_windows(app_instance: App) -> None: This ensures they will be available in the 'Windows' menu. """ expected_hubs = [ - "Context Hub", + "Project Settings", "AI Settings", "Discussion Hub", "Operations Hub", diff --git a/tests/test_layout_reorganization.py b/tests/test_layout_reorganization.py index 4ee4665..9246e5e 100644 --- a/tests/test_layout_reorganization.py +++ b/tests/test_layout_reorganization.py @@ -15,7 +15,7 @@ def test_new_hubs_defined_in_show_windows(mock_app: App) -> None: This ensures they will be available in the 'Windows' menu. """ expected_hubs = [ - "Context Hub", + "Project Settings", "AI Settings", "Discussion Hub", "Operations Hub", @@ -53,7 +53,7 @@ def test_hub_windows_exist_in_gui2(app_instance_simple: Any) -> None: """ Verifies that the new Hub windows are present in the show_windows dictionary. """ - hubs = ["Context Hub", "AI Settings", "Discussion Hub", "Operations Hub"] + hubs = ["Project Settings", "AI Settings", "Discussion Hub", "Operations Hub"] for hub in hubs: assert hub in app_instance_simple.show_windows diff --git a/tests/test_project_settings_rename.py b/tests/test_project_settings_rename.py new file mode 100644 index 0000000..89689c6 --- /dev/null +++ b/tests/test_project_settings_rename.py @@ -0,0 +1,22 @@ +import pytest +import inspect + + +def test_context_hub_renamed_to_project_settings(): + import src.gui_2 as gui_2 + + source = inspect.getsource(gui_2.App._gui_func) + assert "Project Settings" in source, ( + "Context Hub should be renamed to Project Settings" + ) + assert '"Context Hub"' not in source, '"Context Hub" string should be removed' + + +def test_show_windows_key_updated(): + import src.app_controller as app_controller + + source = inspect.getsource(app_controller.AppController) + assert '"Project Settings"' in source or "'Project Settings'" in source, ( + "show_windows key should be Project Settings" + ) + assert '"Context Hub"' not in source, '"Context Hub" key should be removed'