diff --git a/apps/mana/apps/web/src/lib/app-registry/registry.spec.ts b/apps/mana/apps/web/src/lib/app-registry/registry.spec.ts index b60f96cbe..721991011 100644 --- a/apps/mana/apps/web/src/lib/app-registry/registry.spec.ts +++ b/apps/mana/apps/web/src/lib/app-registry/registry.spec.ts @@ -48,7 +48,7 @@ const BRANDING_ONLY = new Set([ describe('app registry ↔ MANA_APPS consistency', () => { it('every workbench-registry app has a MANA_APPS entry or is in WORKBENCH_ONLY', () => { - const brandingIds = new Set(MANA_APPS.map((a) => a.id)); + const brandingIds = new Set(MANA_APPS.map((a) => a.id)); const unaccounted = getAllApps() .map((a) => a.id) .filter((id) => !brandingIds.has(id) && !WORKBENCH_ONLY.has(id)); diff --git a/apps/mana/apps/web/src/lib/components/SessionWarning.svelte b/apps/mana/apps/web/src/lib/components/SessionWarning.svelte index 9bdc3fdd5..98f842560 100644 --- a/apps/mana/apps/web/src/lib/components/SessionWarning.svelte +++ b/apps/mana/apps/web/src/lib/components/SessionWarning.svelte @@ -14,11 +14,13 @@ }; }); - function checkSession() { + async function checkSession() { if (!authStore.isAuthenticated) return; - // Try to get token expiry from JWT - const token = authStore.getAccessTokenSync?.(); + // Pull the latest access token. The wrapper doesn't expose a sync + // variant — getAccessToken() reads from the storage adapter behind + // a Promise, which is fine for a polling-style warning. + const token = await authStore.getAccessToken(); if (!token) return; try { @@ -40,7 +42,11 @@ async function handleRefresh() { try { - await authStore.refreshToken?.(); + // getValidToken() returns the current token if still valid, or + // triggers a refresh under the hood when it isn't. Same effect + // as the old `refreshToken()` call site, with the wrapper's + // existing public surface. + await authStore.getValidToken(); showWarning = false; } catch { // Refresh failed, user will be logged out diff --git a/apps/mana/apps/web/src/lib/components/dashboard/DashboardGrid.svelte b/apps/mana/apps/web/src/lib/components/dashboard/DashboardGrid.svelte index 846b67d5d..5457d684b 100644 --- a/apps/mana/apps/web/src/lib/components/dashboard/DashboardGrid.svelte +++ b/apps/mana/apps/web/src/lib/components/dashboard/DashboardGrid.svelte @@ -57,7 +57,7 @@ {widget.id} fehlgeschlagen

- {error?.message || 'Unbekannter Fehler'} + {(error as Error | undefined)?.message || 'Unbekannter Fehler'}