feat(ui): Add blinking indicators and increase diagnostic density

This commit is contained in:
2026-02-23 18:47:14 -05:00
parent 975fcde9bd
commit c5d54cfae2
2 changed files with 95 additions and 21 deletions

View File

@@ -42,14 +42,10 @@ def test_new_hubs_defined_in_window_info():
assert l == label or label in l, f"Label mismatch for {tag}: expected {label}, found {l}"
assert found, f"Expected window label {label} not found in window_info"
def test_old_windows_removed_from_window_info():
def test_old_windows_removed_from_window_info(app_instance_simple):
"""
Verifies that the old fragmented windows are removed from window_info.
"""
from unittest.mock import patch
with patch('gui.load_config', return_value={}):
app = App()
old_tags = [
"win_projects", "win_files", "win_screenshots",
"win_provider", "win_system_prompts",
@@ -58,4 +54,49 @@ def test_old_windows_removed_from_window_info():
]
for tag in old_tags:
assert tag not in app.window_info.values(), f"Old window tag {tag} should have been removed from window_info"
assert tag not in app_instance_simple.window_info.values(), f"Old window tag {tag} should have been removed from window_info"
@pytest.fixture
def app_instance_simple():
from unittest.mock import patch
from gui import App
with patch('gui.load_config', return_value={}):
app = App()
return app
def test_hub_windows_have_correct_flags(app_instance_simple):
"""
Verifies that the new Hub windows have appropriate flags for a professional workspace.
(e.g., no_collapse should be True for main hubs).
"""
import dearpygui.dearpygui as dpg
dpg.create_context()
# We need to actually call the build methods to check the configuration
app_instance_simple._build_context_hub()
app_instance_simple._build_ai_settings_hub()
app_instance_simple._build_discussion_hub()
app_instance_simple._build_operations_hub()
hubs = ["win_context_hub", "win_ai_settings_hub", "win_discussion_hub", "win_operations_hub"]
for hub in hubs:
assert dpg.does_item_exist(hub)
# We can't easily check 'no_collapse' after creation without internal DPG calls
# but we can check if it's been configured if we mock dpg.window or check it manually
dpg.destroy_context()
def test_indicators_exist(app_instance_simple):
"""
Verifies that the new thinking and live indicators exist in the UI.
"""
import dearpygui.dearpygui as dpg
dpg.create_context()
app_instance_simple._build_discussion_hub()
app_instance_simple._build_operations_hub()
assert dpg.does_item_exist("thinking_indicator")
assert dpg.does_item_exist("operations_live_indicator")
dpg.destroy_context()