Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(commands): move experimental Vue Nodes commands to core; add hi…
…dden setting for debug panel visibility; persist debug panel state; remove per-canvas registrations
  • Loading branch information
benceruleanlu committed Aug 11, 2025
commit a37281eee0dd9bd47a50aea150d861ed3a9e43d0
32 changes: 7 additions & 25 deletions src/components/graph/GraphCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,13 @@ const { shouldRenderVueNodes, isDevModeEnabled } = useFeatureFlags()

// TransformPane enabled when Vue nodes are enabled OR debug override
const debugOverrideVueNodes = ref(false)
const debugPanelVisible = ref(false)
// Persist debug panel visibility in settings so core commands can toggle it
const debugPanelVisible = computed({
get: () => settingStore.get('Comfy.VueNodes.DebugPanel.Visible') ?? false,
set: (v: boolean) => {
void settingStore.set('Comfy.VueNodes.DebugPanel.Visible', v)
}
})
const transformPaneEnabled = computed(
() => shouldRenderVueNodes.value || debugOverrideVueNodes.value
)
Expand Down Expand Up @@ -736,30 +742,6 @@ onMounted(async () => {
await workflowPersistence.restorePreviousWorkflow()
workflowPersistence.restoreWorkflowTabsState()

// Register experimental commands (unbound by default)
const commandStore = useCommandStore()
if (!commandStore.isRegistered('Experimental.ToggleVueNodes')) {
commandStore.registerCommand({
id: 'Experimental.ToggleVueNodes',
label: () =>
`Experimental: ${shouldRenderVueNodes.value ? 'Disable' : 'Enable'} Vue Nodes`,
function: async () => {
const current = settingStore.get('Comfy.VueNodes.Enabled') ?? false
await settingStore.set('Comfy.VueNodes.Enabled', !current)
}
})
}
if (!commandStore.isRegistered('Experimental.ToggleVueNodeDebugPanel')) {
commandStore.registerCommand({
id: 'Experimental.ToggleVueNodeDebugPanel',
label: () =>
`Experimental: ${debugPanelVisible.value ? 'Hide' : 'Show'} Vue Node Debug Panel`,
function: () => {
debugPanelVisible.value = !debugPanelVisible.value
}
})
}

// Initialize release store to fetch releases from comfy-api (fire-and-forget)
const { useReleaseStore } = await import('@/stores/releaseStore')
const releaseStore = useReleaseStore()
Expand Down
27 changes: 27 additions & 0 deletions src/composables/useCoreCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,33 @@ export function useCoreCommands(): ComfyCommand[] {
app.canvas.setDirty(true, true)
}
},
{
id: 'Experimental.ToggleVueNodes',
label: () =>
`Experimental: ${
useSettingStore().get('Comfy.VueNodes.Enabled') ? 'Disable' : 'Enable'
} Vue Nodes`,
function: async () => {
const settingStore = useSettingStore()
const current = settingStore.get('Comfy.VueNodes.Enabled') ?? false
await settingStore.set('Comfy.VueNodes.Enabled', !current)
}
},
{
id: 'Experimental.ToggleVueNodeDebugPanel',
label: () =>
`Experimental: ${
useSettingStore().get('Comfy.VueNodes.DebugPanel.Visible')
? 'Hide'
: 'Show'
} Vue Node Debug Panel`,
function: async () => {
const settingStore = useSettingStore()
const current =
settingStore.get('Comfy.VueNodes.DebugPanel.Visible') ?? false
await settingStore.set('Comfy.VueNodes.DebugPanel.Visible', !current)
}
},
{
id: 'Comfy.Canvas.FitView',
icon: 'pi pi-expand',
Expand Down
7 changes: 7 additions & 0 deletions src/constants/coreSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -904,5 +904,12 @@ export const CORE_SETTINGS: SettingParams[] = [
'Render nodes as Vue components instead of canvas. Hidden; toggle via Experimental keybinding.',
defaultValue: false,
experimental: true
},
{
id: 'Comfy.VueNodes.DebugPanel.Visible',
name: 'Vue Nodes Debug Panel Visible (hidden)',
type: 'hidden',
defaultValue: false,
experimental: true
}
]
1 change: 1 addition & 0 deletions src/schemas/apiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ const zSettings = z.object({
'Comfy.Minimap.Visible': z.boolean(),
'Comfy.Canvas.NavigationMode': z.string(),
'Comfy.VueNodes.Enabled': z.boolean(),
'Comfy.VueNodes.DebugPanel.Visible': z.boolean(),
'Comfy-Desktop.AutoUpdate': z.boolean(),
'Comfy-Desktop.SendStatistics': z.boolean(),
'Comfy-Desktop.WindowStyle': z.string(),
Expand Down
Loading