From 7f42d6cbe229a270644a3a0fb97f21f0fb7a29fc Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Wed, 15 Apr 2026 17:23:00 -0700 Subject: [PATCH] feat: add view dropdown trigger and menu to app header (task-4) - Add #view-dropdown-trigger button between wordmark and header-actions - Add #view-dropdown-menu container with role='menu' and hidden class - Add #view-dropdown-label with default text 'All Sessions' - Add caret span with aria-hidden='true' - Trigger has aria-haspopup='true', aria-expanded='false', aria-controls attributes - All wrapped in .view-dropdown div with id='view-dropdown' Tests added: - test_view_dropdown_trigger_exists - test_view_dropdown_container_exists - test_view_dropdown_trigger_has_aria - test_view_dropdown_menu_has_role_menu All 93 tests pass (4 new + 89 existing). --- muxplex/frontend/index.html | 7 +++++ muxplex/tests/test_frontend_html.py | 45 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/muxplex/frontend/index.html b/muxplex/frontend/index.html index 3e1ea4a..a1817e9 100644 --- a/muxplex/frontend/index.html +++ b/muxplex/frontend/index.html @@ -19,6 +19,13 @@

muxplex

+
+ + +
diff --git a/muxplex/tests/test_frontend_html.py b/muxplex/tests/test_frontend_html.py index 9ae2f4a..ea106d4 100644 --- a/muxplex/tests/test_frontend_html.py +++ b/muxplex/tests/test_frontend_html.py @@ -1419,3 +1419,48 @@ def test_html_has_search_bar() -> None: html = read_html() assert "terminal-search-bar" in html, "Must have #terminal-search-bar element" assert "terminal-search-input" in html, "Must have #terminal-search-input element" + + +# ============================================================ +# Header Dropdown (task-4) +# ============================================================ + + +def test_view_dropdown_trigger_exists() -> None: + """#view-dropdown-trigger element must exist in the header.""" + soup = _SOUP + trigger = soup.find(id="view-dropdown-trigger") + assert trigger is not None, "Missing #view-dropdown-trigger" + assert trigger.name == "button", ( + f"#view-dropdown-trigger must be a