From 958a5cd0a4a081375fb3344a5ec98b003c7a9a1d Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Fri, 19 Jun 2026 13:36:00 -0700 Subject: [PATCH] fix: video sidebar highlight needed two clicks (music chrome wiped it) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setActivePageChrome cleared .active from EVERY .nav-button — including the video sidebar's — but only re-highlighted music buttons ([data-page]). On the first video nav it ran (via navigateToPage) and wiped the video selection right after the video side set it; the second click hit navigateToPage's same-page early-return so it didn't run, which is why the highlight only 'stuck' on the second click. Scope the clear to .nav-button[data-page] (music nav only). The video side owns its own .nav-button[data-video-page] highlight via setActiveNav. Zero music-side impact (all music nav buttons carry data-page). --- webui/static/shell-bridge.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webui/static/shell-bridge.js b/webui/static/shell-bridge.js index 1f93f2c3..0e70fbae 100644 --- a/webui/static/shell-bridge.js +++ b/webui/static/shell-bridge.js @@ -20,7 +20,11 @@ function showLegacyPage(pageId) { } function setActivePageChrome(pageId) { - document.querySelectorAll('.nav-button').forEach(btn => { + // Only manage MUSIC nav buttons (they carry data-page). The video sidebar owns + // its own highlight via .nav-button[data-video-page]; clearing those here wiped + // the video selection on the first nav — it only re-stuck on a second click, + // which hits navigateToPage's same-page early-return so this never ran. (#sidebar) + document.querySelectorAll('.nav-button[data-page]').forEach(btn => { btn.classList.remove('active'); btn.removeAttribute('aria-current'); });