diff --git a/public/app.js b/public/app.js index ebe60bb..ef1498c 100644 --- a/public/app.js +++ b/public/app.js @@ -209,6 +209,7 @@ async function handleLogin(e) { async function handleLogout() { try { stopSSE(); + if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle = null; } await fetch('/api/auth/logout', { method: 'POST', headers: csrfToken ? { 'X-CSRF-Token': csrfToken } : {} @@ -232,6 +233,10 @@ function showDashboard() { document.getElementById('login-container').style.display = 'none'; document.getElementById('dashboard-container').style.display = 'block'; document.getElementById('currentUser').textContent = currentUser.name || '-'; + // Always start with status panel hidden (guards against stale display value on re-login) + const sp = document.getElementById('status-panel'); + sp.style.display = 'none'; + sp.innerHTML = ''; document.getElementById('admin-controls').style.display = isAdmin ? 'flex' : 'none'; }