From 7c04d44e2e0fb91c16c10d6a75f57f73cd70f011 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 24 Feb 2026 13:13:30 +0100 Subject: [PATCH] fix: wait for router before dismissing loading screen The loading screen was dismissed as soon as auth check completed, but before Vue Router's initial navigation finished. This caused route.name to be undefined momentarily, making showAuthLayout evaluate to false and briefly flashing the NoAuthWrapper (login shell) before the authenticated layout appeared. Wait for router.isReady() before setting ready = true so the loading screen stays visible until the route is fully resolved. --- frontend/src/stores/base.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/stores/base.ts b/frontend/src/stores/base.ts index 38510a7d7..d90ec8449 100644 --- a/frontend/src/stores/base.ts +++ b/frontend/src/stores/base.ts @@ -11,6 +11,7 @@ import {checkAndSetApiUrl, ERROR_NO_API_URL, InvalidApiUrlProvidedError, NoApiUr import {useMenuActive} from '@/composables/useMenuActive' import {useAuthStore} from '@/stores/auth' +import router from '@/router' import type {IProject} from '@/modelTypes/IProject' import type {Permission} from '@/constants/permissions' import type {IProjectView} from '@/modelTypes/IProjectView' @@ -147,6 +148,7 @@ export const useBaseStore = defineStore('base', () => { try { await checkAndSetApiUrl(window.API_URL) await authStore.checkAuth() + await router.isReady() ready.value = true } catch (e: unknown) { if (e instanceof NoApiUrlProvidedError) {