diff --git a/coordinator/tests/test_frontend_html.py b/coordinator/tests/test_frontend_html.py index 0ee2d75..73f9739 100644 --- a/coordinator/tests/test_frontend_html.py +++ b/coordinator/tests/test_frontend_html.py @@ -247,6 +247,14 @@ def test_html_element_classes() -> None: ), ("session-pill-label", "session-pill__label", "needs max-width truncation"), ("session-pill-bell", "session-pill__bell", "needs amber var(--bell) color"), + ( + "session-sidebar", + "session-sidebar", + "flex-column layout and collapse transition", + ), + ("sidebar-toggle-btn", "sidebar-toggle-btn", "36x36 bordered button styles"), + ("sidebar-collapse-btn", "sidebar-collapse-btn", "chevron button hover styles"), + ("sidebar-list", "sidebar-list", "flex:1 overflow-y:auto scroll container"), ] for el_id, expected_class, reason in cases: el = soup.find(id=el_id) diff --git a/frontend/app.js b/frontend/app.js index 20bad99..ef7d752 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -393,7 +393,7 @@ function initSidebar() { isOpen = window.innerWidth >= SIDEBAR_NARROW_THRESHOLD; } - const sidebar = $('sidebar'); + const sidebar = $('session-sidebar'); if (sidebar) { if (isOpen) { sidebar.classList.remove('sidebar--collapsed'); @@ -432,7 +432,7 @@ function toggleSidebar() { } catch (_) { /* blocked — ok */ } // Apply class - const sidebar = $('sidebar'); + const sidebar = $('session-sidebar'); if (sidebar) { if (isOpen) { sidebar.classList.remove('sidebar--collapsed'); @@ -442,7 +442,7 @@ function toggleSidebar() { } // Update collapse button text (‹ when open, › when closed) - const collapseBtn = $('collapse-btn'); + const collapseBtn = $('sidebar-collapse-btn'); if (collapseBtn) { collapseBtn.textContent = isOpen ? '\u2039' : '\u203a'; } @@ -461,7 +461,7 @@ function bindSidebarClickAway() { if (!container) return; container.addEventListener('click', () => { if (window.innerWidth >= SIDEBAR_NARROW_THRESHOLD) return; - const sidebar = $('sidebar'); + const sidebar = $('session-sidebar'); if (!sidebar) return; if (sidebar.classList.contains('sidebar--collapsed')) return; sidebar.classList.add('sidebar--collapsed'); diff --git a/frontend/index.html b/frontend/index.html index 9c717b7..eb98212 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -30,17 +30,17 @@