From a202d827d1a74545bd87a7483fd8c3c7b7833497 Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Sun, 17 May 2026 10:26:26 -0700 Subject: [PATCH] feat(ui): dim hidden sessions in Manage View with CSS badge (Phase 5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hidden sessions in the Manage View panel now render at 55% opacity with a "(hidden)" pseudo-element badge driven by CSS. renderManageViewList uses the isHidden() Phase 1 helper for the conditional class — no inline hidden-checks remain in the rendering path. 4 new tests verify the class is applied/removed correctly across renders. --- muxplex/frontend/app.js | 12 +-- muxplex/frontend/style.css | 11 ++- muxplex/frontend/tests/test_app.mjs | 138 ++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 7 deletions(-) diff --git a/muxplex/frontend/app.js b/muxplex/frontend/app.js index 7214bfb..ca01145 100644 --- a/muxplex/frontend/app.js +++ b/muxplex/frontend/app.js @@ -2613,7 +2613,6 @@ function renderManageViewList() { if (!listEl) return; var views = (_serverSettings && _serverSettings.views) || []; - var hidden = (_serverSettings && _serverSettings.hidden_sessions) || []; // Find the active view's session list var activeViewObj = null; @@ -2665,17 +2664,18 @@ function renderManageViewList() { var s = sorted[j]; var key = s.sessionKey || s.name; var isInView = viewSessions.indexOf(key) !== -1 || viewSessions.indexOf(s.name) !== -1; - var isHidden = hidden.indexOf(key) !== -1 || hidden.indexOf(s.name) !== -1; + // Phase 5: use the isHidden() helper (Phase 1) — do not inline a hidden check here. + // The manage-view-item--hidden class triggers opacity + CSS ::after "(hidden)" badge. + var sessionIsHidden = isHidden(key, _serverSettings); var escapedName = escapeHtml(s.name || ''); var deviceName = escapeHtml(_getDeviceDisplayName(s) || ''); - html += '