diff --git a/muxplex/frontend/app.js b/muxplex/frontend/app.js index 9ba5e82..281d75a 100644 --- a/muxplex/frontend/app.js +++ b/muxplex/frontend/app.js @@ -1026,6 +1026,9 @@ function toggleSidebar() { var collapseBtn = $('sidebar-collapse-btn'); if (collapseBtn) collapseBtn.innerHTML = isOpen ? _icons.chevronLeft : _icons.chevronRight; + + // Show/hide the session pill based on sidebar state — pill is redundant when sidebar is open + updateSessionPill(_currentSessions || []); } /** @@ -1047,6 +1050,7 @@ function bindSidebarClickAway() { sidebar.classList.add('sidebar--collapsed'); if (_serverSettings) _serverSettings.sidebarOpen = false; patchServerSetting('sidebarOpen', false); + updateSessionPill(_currentSessions || []); }); } @@ -3606,7 +3610,10 @@ function updateSessionPill(sessions) { } var pillLabel = _viewingSession || ''; pill.label = pillLabel; - pill.visible = true; + // Hide the pill when the sidebar is open — it's redundant as a session switcher + var sidebar = $('session-sidebar'); + var sidebarOpen = sidebar && !sidebar.classList.contains('sidebar--collapsed'); + pill.visible = !sidebarOpen; var viewingKey = _viewingRemoteId ? (_viewingRemoteId + ':' + _viewingSession) : _viewingSession; var othersWithBell = sessions.filter(function(s) {