From d20034ef20dda276b62f5ce49d0a4434c94c3b8f Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 3 Feb 2026 07:17:28 +0000 Subject: [PATCH 1/6] fix: do not hit session endpoint in ssr --- app/composables/useAtproto.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/composables/useAtproto.ts b/app/composables/useAtproto.ts index 4ee3ad210..91c35a136 100644 --- a/app/composables/useAtproto.ts +++ b/app/composables/useAtproto.ts @@ -1,6 +1,14 @@ import type { UserSession } from '#shared/schemas/userSession' export function useAtproto() { + if (import.meta.server) { + return { + user: ref(null), + pending: ref(false), + logout: async () => {}, + } + } + const { data: user, pending, clear } = useFetch('/api/auth/session') async function logout() { From 6bc7c57b0ef74b84286572636c9f2aa966ca56e2 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 3 Feb 2026 07:30:49 +0000 Subject: [PATCH 2/6] fix: just set `server: false` --- app/composables/useAtproto.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/composables/useAtproto.ts b/app/composables/useAtproto.ts index 91c35a136..dfad2884e 100644 --- a/app/composables/useAtproto.ts +++ b/app/composables/useAtproto.ts @@ -1,15 +1,13 @@ import type { UserSession } from '#shared/schemas/userSession' export function useAtproto() { - if (import.meta.server) { - return { - user: ref(null), - pending: ref(false), - logout: async () => {}, - } - } - - const { data: user, pending, clear } = useFetch('/api/auth/session') + const { + data: user, + pending, + clear, + } = useFetch('/api/auth/session', { + server: false, + }) async function logout() { await $fetch('/api/auth/session', { From 240eccb4458d3b4924347d3ae16032c130c5f536 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 3 Feb 2026 07:46:14 +0000 Subject: [PATCH 3/6] chore: refresh session after mounting components --- app/composables/useAtproto.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/composables/useAtproto.ts b/app/composables/useAtproto.ts index dfad2884e..e104deb45 100644 --- a/app/composables/useAtproto.ts +++ b/app/composables/useAtproto.ts @@ -4,11 +4,15 @@ export function useAtproto() { const { data: user, pending, + refresh, clear, } = useFetch('/api/auth/session', { server: false, + immediate: false, }) + onNuxtReady(() => refresh()) + async function logout() { await $fetch('/api/auth/session', { method: 'delete', From cf8f8046b3758fad88c01efe5615af324418ef99 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 3 Feb 2026 08:33:36 +0000 Subject: [PATCH 4/6] refactor: make mobile menu client-only --- .../Header/{MobileMenu.vue => MobileMenu.client.vue} | 0 app/composables/useAtproto.ts | 4 ---- 2 files changed, 4 deletions(-) rename app/components/Header/{MobileMenu.vue => MobileMenu.client.vue} (100%) diff --git a/app/components/Header/MobileMenu.vue b/app/components/Header/MobileMenu.client.vue similarity index 100% rename from app/components/Header/MobileMenu.vue rename to app/components/Header/MobileMenu.client.vue diff --git a/app/composables/useAtproto.ts b/app/composables/useAtproto.ts index e104deb45..dfad2884e 100644 --- a/app/composables/useAtproto.ts +++ b/app/composables/useAtproto.ts @@ -4,15 +4,11 @@ export function useAtproto() { const { data: user, pending, - refresh, clear, } = useFetch('/api/auth/session', { server: false, - immediate: false, }) - onNuxtReady(() => refresh()) - async function logout() { await $fetch('/api/auth/session', { method: 'delete', From 842f52e9f6a48b3d823c3d15a571a71211109f9c Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 3 Feb 2026 08:39:14 +0000 Subject: [PATCH 5/6] fix: do not hit oauth session endpoint when testing --- app/composables/useAtproto.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/composables/useAtproto.ts b/app/composables/useAtproto.ts index dfad2884e..9c38ae776 100644 --- a/app/composables/useAtproto.ts +++ b/app/composables/useAtproto.ts @@ -7,6 +7,7 @@ export function useAtproto() { clear, } = useFetch('/api/auth/session', { server: false, + immediate: !import.meta.test, }) async function logout() { From 461459c202d5237e4a72954a90f02af739802d3a Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 3 Feb 2026 09:28:34 +0000 Subject: [PATCH 6/6] test: update --- test/unit/a11y-component-coverage.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/a11y-component-coverage.spec.ts b/test/unit/a11y-component-coverage.spec.ts index 129ff5650..42502bc41 100644 --- a/test/unit/a11y-component-coverage.spec.ts +++ b/test/unit/a11y-component-coverage.spec.ts @@ -32,7 +32,7 @@ const SKIPPED_COMPONENTS: Record = { // Complex components requiring full app context or specific runtime conditions 'Header/OrgsDropdown.vue': 'Requires connector context and API calls', 'Header/PackagesDropdown.vue': 'Requires connector context and API calls', - 'Header/MobileMenu.vue': 'Requires Teleport and full navigation context', + 'Header/MobileMenu.client.vue': 'Requires Teleport and full navigation context', 'Modal.client.vue': 'Base modal component - tested via specific modals like ChartModal, ConnectorModal', 'Package/SkillsModal.vue': 'Complex modal with tabs - requires modal context and state',