From 3284304c1f77a72e9aba52794017264c34ded3d9 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sat, 11 Apr 2026 08:39:14 +0200 Subject: [PATCH] fix: remove dead /server/ fallback redirect When no org is resolved, redirect to /tenant instead of the non-existent /server/ path. Fixes login redirect loop. Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/src/components/Layout.tsx | 2 +- ui/src/router.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/src/components/Layout.tsx b/ui/src/components/Layout.tsx index 04fa9f6..bf586b1 100644 --- a/ui/src/components/Layout.tsx +++ b/ui/src/components/Layout.tsx @@ -41,7 +41,7 @@ export function Layout() { // Determine current org slug for server dashboard link const currentOrg = organizations.find((o) => o.id === currentOrgId); - const serverDashboardHref = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '/server/'; + const serverDashboardHref = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '#'; // Build breadcrumbs from path const segments = location.pathname.replace(/^\//, '').split('/').filter(Boolean); diff --git a/ui/src/router.tsx b/ui/src/router.tsx index 24260dc..3c9f930 100644 --- a/ui/src/router.tsx +++ b/ui/src/router.tsx @@ -39,9 +39,12 @@ function LandingRedirect() { return ; } // Regular user (operator/viewer) → server dashboard directly - const serverUrl = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '/server/'; - window.location.href = serverUrl; - return null; + if (currentOrg?.slug) { + window.location.href = `/t/${currentOrg.slug}/`; + return null; + } + // No org resolved yet — stay on tenant portal + return ; } export function AppRouter() {