From e82c6928e9341b5b7c566cec24d7b07be2c6b1a0 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Tue, 27 Jan 2026 09:42:29 +0900 Subject: [PATCH] =?UTF-8?q?[backport=20cloud/1.37]=20fix:=20workspace=20ic?= =?UTF-8?q?on=20flash=20and=20credits=20showing=200=20while=20workspace=20?= =?UTF-8?q?is=20in=E2=80=A6=20(#8324)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of #8323 to `cloud/1.37` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8324-backport-cloud-1-37-fix-workspace-icon-flash-and-credits-showing-0-while-workspace-is--2f56d73d365081e18764dc79feadbf3a) by [Unito](https://www.unito.io) Co-authored-by: Simula_r <18093452+simula-r@users.noreply.github.com> --- .../topbar/CurrentUserButton.test.ts | 19 ++++++++++- src/components/topbar/CurrentUserButton.vue | 32 +++++++++++++++---- .../topbar/CurrentUserPopoverWorkspace.vue | 16 +++++++--- 3 files changed, 54 insertions(+), 13 deletions(-) diff --git a/src/components/topbar/CurrentUserButton.test.ts b/src/components/topbar/CurrentUserButton.test.ts index db5349b49..c8e568291 100644 --- a/src/components/topbar/CurrentUserButton.test.ts +++ b/src/components/topbar/CurrentUserButton.test.ts @@ -25,7 +25,24 @@ vi.mock('firebase/auth', () => ({ })) // Mock pinia -vi.mock('pinia') +vi.mock('pinia', () => ({ + storeToRefs: vi.fn((store) => store) +})) + +// Mock the useFeatureFlags composable +vi.mock('@/composables/useFeatureFlags', () => ({ + useFeatureFlags: vi.fn(() => ({ + flags: { teamWorkspacesEnabled: false } + })) +})) + +// Mock the useTeamWorkspaceStore +vi.mock('@/platform/workspace/stores/teamWorkspaceStore', () => ({ + useTeamWorkspaceStore: vi.fn(() => ({ + workspaceName: { value: '' }, + initState: { value: 'idle' } + })) +})) // Mock the useCurrentUser composable vi.mock('@/composables/auth/useCurrentUser', () => ({ diff --git a/src/components/topbar/CurrentUserButton.vue b/src/components/topbar/CurrentUserButton.vue index 4f6f4b6ed..85d587e91 100644 --- a/src/components/topbar/CurrentUserButton.vue +++ b/src/components/topbar/CurrentUserButton.vue @@ -16,8 +16,14 @@ ) " > + @@ -40,13 +46,16 @@ } }" > - + - + @@ -54,6 +63,7 @@