UI: auth banner — add re-auth hint for multi-user context

Banner now shows a second line explaining how to fix it: SSH to the
Cortex host, run `claude`, follow the login prompt, restart Cortex.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-17 23:09:11 -04:00
parent 48a6734ec3
commit 2ca02006dd
3 changed files with 18 additions and 4 deletions

View File

@@ -919,8 +919,8 @@
if (!d.warning) return;
const msg = d.expired
? '✕ Claude CLI token has expired — run `claude` in a terminal to re-authenticate'
: `⚠ Claude CLI token expires in ${d.hours_remaining}h — run \`claude\` in a terminal to re-authenticate`;
? '✕ Claude CLI token has expired'
: `⚠ Claude CLI token expires in ${d.hours_remaining}h`;
authBannerMsg.textContent = msg;
authBanner.classList.toggle('expired', !!d.expired);
authBanner.classList.add('show');

View File

@@ -110,7 +110,10 @@
<!-- Auth warning banner — shown when Claude CLI token is near expiry -->
<div id="auth-banner">
<span id="auth-banner-msg"></span>
<div id="auth-banner-text">
<span id="auth-banner-msg"></span>
<span id="auth-banner-hint">To fix: SSH into the Cortex host and run <code>claude</code> — follow the login prompt, then restart Cortex.</span>
</div>
<button id="auth-banner-close" title="Dismiss"></button>
</div>

View File

@@ -917,7 +917,18 @@
color: var(--error-text);
}
#auth-banner-msg { flex: 1; }
#auth-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
#auth-banner-msg { font-weight: 500; }
#auth-banner-hint {
font-size: 0.76rem;
opacity: 0.8;
}
#auth-banner-hint code {
font-family: 'Courier New', monospace;
background: rgba(0,0,0,0.2);
border-radius: 3px;
padding: 0 4px;
}
#auth-banner-close {
background: none;