From 72add79ec3c0d5fba7d9f8d6b2e45db610cba138 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Thu, 29 Jan 2026 11:43:30 +0900 Subject: [PATCH] =?UTF-8?q?[backport=20cloud/1.37]=20fix:=20move=20Workspa?= =?UTF-8?q?ceAuthGate=20to=20LayoutDefault=20for=20proper=20re-login=20han?= =?UTF-8?q?d=E2=80=A6=20(#8388)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #8381 to `cloud/1.37` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8388-backport-cloud-1-37-fix-move-WorkspaceAuthGate-to-LayoutDefault-for-proper-re-login-ha-2f76d73d3650813ea84ed3fdf537986a) by [Unito](https://www.unito.io) Co-authored-by: Simula_r <18093452+simula-r@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 --- src/App.vue | 17 +++++++---------- src/components/auth/WorkspaceAuthGate.vue | 11 +++++++---- src/extensions/core/cloudRemoteConfig.ts | 7 ++++--- src/views/layouts/LayoutDefault.vue | 10 +++++++--- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/App.vue b/src/App.vue index f36f74720..6b7c56be0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,11 @@ diff --git a/src/extensions/core/cloudRemoteConfig.ts b/src/extensions/core/cloudRemoteConfig.ts index d3c1dc7ac..8db19df9c 100644 --- a/src/extensions/core/cloudRemoteConfig.ts +++ b/src/extensions/core/cloudRemoteConfig.ts @@ -16,15 +16,16 @@ useExtensionService().registerExtension({ const { isLoggedIn } = useCurrentUser() const { isActiveSubscription } = useSubscription() - // Refresh config when subscription status changes - // Initial auth-aware refresh happens in WorkspaceAuthGate before app renders + // Refresh config when auth or subscription status changes + // Primary auth refresh is handled by WorkspaceAuthGate on mount + // This watcher handles subscription changes and acts as a backup for auth watchDebounced( [isLoggedIn, isActiveSubscription], () => { if (!isLoggedIn.value) return void refreshRemoteConfig() }, - { debounce: 256 } + { debounce: 256, immediate: true } ) // Poll for config updates every 10 minutes (with auth) diff --git a/src/views/layouts/LayoutDefault.vue b/src/views/layouts/LayoutDefault.vue index cbe0e3408..613aa0418 100644 --- a/src/views/layouts/LayoutDefault.vue +++ b/src/views/layouts/LayoutDefault.vue @@ -1,11 +1,15 @@