[fix](trx-frontend-http): always show auth gate when no valid session

Do not auto-connect with guest role. Always show the auth gate when
there's no valid session, allowing the user to choose between:
- Login: Enter passphrase for control access
- Continue as Guest: Proceed with read-only access (if available)

This allows users to enter their control passphrase instead of being
forced into guest mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-02-13 08:43:14 +01:00
parent 599fa42bb3
commit 9d3b690aca
@@ -1163,16 +1163,9 @@ async function initializeApp() {
connect(); connect();
resizeHeaderSignalCanvas(); resizeHeaderSignalCanvas();
startHeaderSignalSampling(); startHeaderSignalSampling();
} else if (authStatus.role) {
// No session but role granted (guest mode available)
authRole = authStatus.role;
updateAuthUI();
applyAuthRestrictions();
connect();
resizeHeaderSignalCanvas();
startHeaderSignalSampling();
} else { } else {
// Auth required - show login screen with optional guest button // No valid session - show auth gate
// Guest button is shown if guest mode is available (role granted without auth)
const allowGuest = authStatus.role === "rx"; const allowGuest = authStatus.role === "rx";
showAuthGate(allowGuest); showAuthGate(allowGuest);
} }