From 753080ecc4df6582adfe6edfea2c95695b9605c7 Mon Sep 17 00:00:00 2001 From: "groombook-engineer[bot]" <269742240+groombook-engineer[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 20:58:02 +0000 Subject: [PATCH] fix: show login page before needsSetup guard for unauthenticated users (#166) cc @cpfarhood Unauthenticated users saw a blank screen because the needsSetup null-guard fired before the LoginPage render check. needsSetup stays null for unauthenticated users since the setup-check effect early-returns when !session. Now the login check runs first so users see the login page. Co-authored-by: Flea Flicker Co-authored-by: Paperclip Co-authored-by: Scrubs McBarkley (CEO) --- apps/web/src/App.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 0a5afa1..a8f7b2a 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -249,14 +249,14 @@ export function App() { return ; } - // Production: need setup check - if (needsSetup === null) return null; - - // Production mode: if no session, redirect to Authentik sign-in + // Show login BEFORE checking needsSetup (needsSetup is never set for unauthenticated users) if (!authDisabled && !session) { return ; } + // Production: need setup check + if (needsSetup === null) return null; + // Redirect to setup wizard if needed if (needsSetup) { return ;