Add vue node feature flag (#4927)

This commit is contained in:
Benjamin Lu
2025-08-12 15:59:24 -04:00
committed by Benjamin Lu
parent 2b9a9e2371
commit 8df41ab040
7 changed files with 104 additions and 53 deletions

View File

@@ -276,6 +276,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',

View File

@@ -17,21 +17,10 @@ export const useFeatureFlags = () => {
*/
const isVueNodesEnabled = computed(() => {
try {
return settingStore.get('Comfy.VueNodes.Enabled' as any) ?? true // Default to true for development
// Off by default: ensure Vue nodes are disabled unless explicitly enabled
return settingStore.get('Comfy.VueNodes.Enabled') ?? false
} catch {
return true // Default to true for development
}
})
/**
* Enable Vue widget rendering within Vue nodes
* When disabled, Vue nodes render without widgets (structure only)
*/
const isVueWidgetsEnabled = computed(() => {
try {
return settingStore.get('Comfy.VueNodes.Widgets' as any) ?? true
} catch {
return true
return false
}
})
@@ -74,7 +63,6 @@ export const useFeatureFlags = () => {
return {
isVueNodesEnabled,
isVueWidgetsEnabled,
isDevModeEnabled,
shouldRenderVueNodes,
syncVueNodesFlag