From 5d09f7449e89489d1324ef856b33247d55c09f17 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Mon, 6 Apr 2026 09:24:54 +0700 Subject: [PATCH] fix: revert getCurrentPathname regression and hide startup splash on web MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getCurrentPathname used window.location.pathname instead of Expo Router's pathname, which returns a file path on Electron — blocking navigation from the index route. Also gate the bootstrap progress UI to desktop-only since web has no local server to start/connect. --- packages/app/src/app/index.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/app/src/app/index.tsx b/packages/app/src/app/index.tsx index 33e18d87a..60ca668ce 100644 --- a/packages/app/src/app/index.tsx +++ b/packages/app/src/app/index.tsx @@ -11,16 +11,10 @@ import { useHosts, } from "@/runtime/host-runtime"; import { buildHostRootRoute } from "@/utils/host-routes"; +import { shouldUseDesktopDaemon } from "@/desktop/daemon/desktop-daemon"; const WELCOME_ROUTE = "/welcome"; -function getCurrentPathname(fallbackPathname: string): string { - if (typeof window === "undefined") { - return fallbackPathname; - } - return window.location.pathname || fallbackPathname; -} - function useAnyOnlineHostServerId(serverIds: string[]): string | null { const runtime = getHostRuntimeStore(); @@ -46,6 +40,8 @@ function useAnyOnlineHostServerId(serverIds: string[]): string | null { ); } +const isDesktop = shouldUseDesktopDaemon(); + export default function Index() { const router = useRouter(); const pathname = usePathname(); @@ -58,8 +54,7 @@ export default function Index() { if (!storeReady) { return; } - const currentPathname = getCurrentPathname(pathname); - if (currentPathname !== "/" && currentPathname !== "") { + if (pathname !== "/" && pathname !== "") { return; } @@ -69,5 +64,5 @@ export default function Index() { router.replace(targetRoute as any); }, [anyOnlineServerId, pathname, router, storeReady]); - return ; + return ; }