From 767e7fce7900434ecc14d336988bfd69e83efa7a Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 27 May 2026 21:08:53 +0000 Subject: [PATCH] feat: hide session pill when sidebar is open (redundant switcher) Hide the floating session pill when the sidebar is visible, since the sidebar already shows the complete session list. The pill reappears when the sidebar is collapsed (via toggle or click-away on mobile). Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com> --- muxplex/frontend/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) {