From da8a4b95c5adb72d221a870d0f5692fb71f700ff Mon Sep 17 00:00:00 2001 From: comfydesigner Date: Thu, 13 Aug 2026 15:06:36 -0700 Subject: [PATCH 1/6] feat(settings): bring the V1 Plan & Credits tabs to local --- .../dialog/content/setting/CreditsPanel.vue | 16 +++++++++-- .../settings/composables/useSettingUI.ts | 20 ++++++++++--- .../settings/PlanCreditsPanelContent.test.ts | 28 +++++++++++++++---- .../settings/PlanCreditsPanelContent.vue | 7 ++++- 4 files changed, 58 insertions(+), 13 deletions(-) diff --git a/src/components/dialog/content/setting/CreditsPanel.vue b/src/components/dialog/content/setting/CreditsPanel.vue index 36ccc1f4273..fdbcf89d165 100644 --- a/src/components/dialog/content/setting/CreditsPanel.vue +++ b/src/components/dialog/content/setting/CreditsPanel.vue @@ -1,6 +1,6 @@ @@ -25,8 +28,10 @@ import { computed, ref, useTemplateRef, watch } from 'vue' import { useI18n } from 'vue-i18n' +import CreditsPanel from '@/components/dialog/content/setting/CreditsPanel.vue' import UsageLogsTable from '@/components/dialog/content/setting/UsageLogsTable.vue' import Button from '@/components/ui/button/Button.vue' +import { isCloud } from '@/platform/distribution/types' import SubscriptionPanelContentWorkspace from '@/platform/workspace/components/SubscriptionPanelContentWorkspace.vue' type View = 'overview' | 'activity' From 3c0bd1cd6ac0f1143ee3c48289bdc77212e0cc0e Mon Sep 17 00:00:00 2001 From: comfydesigner Date: Thu, 13 Aug 2026 16:35:09 -0700 Subject: [PATCH 2/6] feat(settings): converge the local sidebar onto the Workspace/General grammar --- .../settings/composables/useSettingUI.ts | 89 ++++++++----------- 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/src/platform/settings/composables/useSettingUI.ts b/src/platform/settings/composables/useSettingUI.ts index cbc2bfd9e62..df5bec4773f 100644 --- a/src/platform/settings/composables/useSettingUI.ts +++ b/src/platform/settings/composables/useSettingUI.ts @@ -327,24 +327,9 @@ export function useSettingUI( ) }) - // Cloud workspace sidebar structure - const workspaceMenuTreeNodes = computed(() => [ - // Workspace settings - translateCategory({ - key: 'workspace', - label: 'Workspace', - children: [ - ...visibleWorkspacePanels.value.map((panel) => panel.node), - // The legacy per-account Credits panel is redundant once the workspace - // Plan & Credits panel is present, which now owns the credit balance. - ...(!billingControlsEnabled.value && - isLoggedIn.value && - !(isCloud && window.__CONFIG__?.subscription_required) - ? [creditsPanel.node] - : []) - ].map(translateCategory) - }), - // General settings - Profile + all core settings + special panels + // Shared groups — both distributions render the same grammar: + // Workspace / General / Other. Only the Workspace entries differ. + const generalMenuGroup = computed(() => translateCategory({ key: 'general', label: 'General', @@ -360,9 +345,11 @@ export function useSettingUI( translateCategory(aboutPanel.node), ...(isDesktop ? [translateCategory(serverConfigPanel.node)] : []) ] - }), - // Custom node settings (only shown if custom nodes have registered settings) - ...(customNodeSettingCategories.value.length > 0 + }) + ) + + const otherMenuGroups = computed(() => + customNodeSettingCategories.value.length > 0 ? [ translateCategory({ key: 'other', @@ -370,38 +357,40 @@ export function useSettingUI( children: customNodeSettingCategories.value.map(translateCategory) }) ] - : []) - ]) + : [] + ) - // OSS legacy sidebar structure - const legacyMenuTreeNodes = computed(() => [ - // Account settings - show different panels based on distribution and auth state - { - key: 'account', - label: 'Account', - children: [ - userPanel.node, - ...(shouldShowSecretsPanel.value ? [secretsPanel.node] : []), - ...(isLoggedIn.value ? [localPlanCreditsPanel.node] : []) - ].map(translateCategory) - }, - // Normal settings stored in the settingStore - { - key: 'settings', - label: 'Application Settings', - children: settingCategories.value.map(translateCategory) - }, - // Special settings such as about, keybinding, extension, server-config - { - key: 'specialSettings', - label: 'Special Settings', + const workspaceMenuTreeNodes = computed(() => [ + translateCategory({ + key: 'workspace', + label: 'Workspace', children: [ - keybindingPanel.node, - extensionPanel.node, - aboutPanel.node, - ...(isDesktop ? [serverConfigPanel.node] : []) + ...visibleWorkspacePanels.value.map((panel) => panel.node), + // The legacy per-account Credits panel is redundant once the workspace + // Plan & Credits panel is present, which now owns the credit balance. + ...(!billingControlsEnabled.value && + isLoggedIn.value && + !(isCloud && window.__CONFIG__?.subscription_required) + ? [creditsPanel.node] + : []) ].map(translateCategory) - } + }), + generalMenuGroup.value, + ...otherMenuGroups.value + ]) + + const legacyMenuTreeNodes = computed(() => [ + ...(isLoggedIn.value + ? [ + translateCategory({ + key: 'workspace', + label: 'Workspace', + children: [localPlanCreditsPanel.node].map(translateCategory) + }) + ] + : []), + generalMenuGroup.value, + ...otherMenuGroups.value ]) const groupedMenuTreeNodes = computed(() => From 494ff035c2c7de074cbcda66838678655d6eb624 Mon Sep 17 00:00:00 2001 From: comfydesigner Date: Thu, 13 Aug 2026 17:01:22 -0700 Subject: [PATCH 3/6] feat(settings): wrap the embedded local credits tile in the Workspace credits card --- .../dialog/content/setting/CreditsPanel.vue | 25 ++++++++++++------- src/locales/en/main.json | 1 + 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/components/dialog/content/setting/CreditsPanel.vue b/src/components/dialog/content/setting/CreditsPanel.vue index fdbcf89d165..5af14e2db91 100644 --- a/src/components/dialog/content/setting/CreditsPanel.vue +++ b/src/components/dialog/content/setting/CreditsPanel.vue @@ -7,7 +7,22 @@ - +
+
+

+ {{ $t('credits.workspaceCredits') }} +

+ +
+ +
+

{{ $t('credits.activity') }}

@@ -20,14 +35,6 @@
-