From 3ce588ad4248e13b7087c7dfd4ba6a1b90ddb0c2 Mon Sep 17 00:00:00 2001 From: Kelly Yang <124ykl@gmail.com> Date: Sat, 10 Jan 2026 21:45:53 -0800 Subject: [PATCH] Update viewjobhistorycommand (#7911) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Add the key binding to the schema and mark the setting as hidden. https://github.com/Comfy-Org/ComfyUI_frontend/pull/7805#pullrequestreview-3627969654 ## Changes **What**: - Added a new `shortcuts` field to the user settings database model. - Marked the `shortcuts` field as `hidden` in the `API/Schema` to ensure it remains internal for now, as suggested by the reviewer @benceruleanlu . - Migrated shortcut storage logic from frontend-only (store) to persistent backend storage. - **Breaking**: None - **Dependencies**: None ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7911-Update-viewjobhistorycommand-2e26d73d3650813297c3f9f7deb53b14) by [Unito](https://www.unito.io) --- src/platform/settings/constants/coreSettings.ts | 7 +++++++ src/schemas/apiSchema.ts | 1 + src/stores/queueStore.ts | 8 +++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/platform/settings/constants/coreSettings.ts b/src/platform/settings/constants/coreSettings.ts index 929614811..e01141429 100644 --- a/src/platform/settings/constants/coreSettings.ts +++ b/src/platform/settings/constants/coreSettings.ts @@ -817,6 +817,13 @@ export const CORE_SETTINGS: SettingParams[] = [ defaultValue: 64, versionAdded: '1.4.12' }, + { + id: 'Comfy.Queue.History.Expanded', + name: 'Queue history expanded', + type: 'hidden', + defaultValue: false, + versionAdded: '1.37.0' + }, { id: 'Comfy.Execution.PreviewMethod', category: ['Comfy', 'Execution', 'PreviewMethod'], diff --git a/src/schemas/apiSchema.ts b/src/schemas/apiSchema.ts index 6e01d6f4e..0c029b3ae 100644 --- a/src/schemas/apiSchema.ts +++ b/src/schemas/apiSchema.ts @@ -467,6 +467,7 @@ const zSettings = z.object({ 'Comfy.Notification.ShowVersionUpdates': z.boolean(), 'Comfy.QueueButton.BatchCountLimit': z.number(), 'Comfy.Queue.MaxHistoryItems': z.number(), + 'Comfy.Queue.History.Expanded': z.boolean(), 'Comfy.Keybinding.UnsetBindings': z.array(zKeybinding), 'Comfy.Keybinding.NewBindings': z.array(zKeybinding), 'Comfy.Extension.Disabled': z.array(z.string()), diff --git a/src/stores/queueStore.ts b/src/stores/queueStore.ts index c7e17c1a0..7571ad280 100644 --- a/src/stores/queueStore.ts +++ b/src/stores/queueStore.ts @@ -4,6 +4,7 @@ import { computed, ref, shallowRef, toRaw, toValue } from 'vue' import { isCloud } from '@/platform/distribution/types' import { reconcileHistory } from '@/platform/remote/comfyui/history/reconciliation' +import { useSettingStore } from '@/platform/settings/settingStore' import { getWorkflowFromHistory } from '@/platform/workflow/cloud' import type { ComfyWorkflowJSON, @@ -620,7 +621,12 @@ export const useQueueSettingsStore = defineStore('queueSettingsStore', { }) export const useQueueUIStore = defineStore('queueUIStore', () => { - const isOverlayExpanded = ref(false) + const settingStore = useSettingStore() + + const isOverlayExpanded = computed({ + get: () => settingStore.get('Comfy.Queue.History.Expanded'), + set: (value) => settingStore.set('Comfy.Queue.History.Expanded', value) + }) function toggleOverlay() { isOverlayExpanded.value = !isOverlayExpanded.value