remove debug logging and setting

This commit is contained in:
bymyself
2025-09-04 18:54:23 -07:00
parent 1e307564f0
commit e8dae57a6a
9 changed files with 5 additions and 155 deletions

View File

@@ -105,62 +105,6 @@ describe('TransformPane', () => {
})
})
describe('debug overlay', () => {
it('should not show debug overlay by default', () => {
wrapper = mount(TransformPane, {
props: {
canvas: mockCanvas
}
})
expect(wrapper.find('.viewport-debug-overlay').exists()).toBe(false)
})
it('should show debug overlay when enabled', () => {
wrapper = mount(TransformPane, {
props: {
canvas: mockCanvas,
viewport: { width: 1920, height: 1080 },
showDebugOverlay: true
}
})
expect(wrapper.find('.viewport-debug-overlay').exists()).toBe(true)
})
it('should display viewport dimensions in debug overlay', () => {
wrapper = mount(TransformPane, {
props: {
canvas: mockCanvas,
viewport: { width: 1280, height: 720 },
showDebugOverlay: true
}
})
const debugOverlay = wrapper.find('.viewport-debug-overlay')
expect(debugOverlay.text()).toContain('Viewport: 1280x720')
})
it('should include device pixel ratio in debug overlay', () => {
// Mock device pixel ratio
Object.defineProperty(window, 'devicePixelRatio', {
writable: true,
value: 2
})
wrapper = mount(TransformPane, {
props: {
canvas: mockCanvas,
viewport: { width: 1920, height: 1080 },
showDebugOverlay: true
}
})
const debugOverlay = wrapper.find('.viewport-debug-overlay')
expect(debugOverlay.text()).toContain('DPR: 2')
})
})
describe('RAF synchronization', () => {
it('should start RAF sync on mount', async () => {
wrapper = mount(TransformPane, {
@@ -405,26 +349,15 @@ describe('TransformPane', () => {
})
describe('viewport prop handling', () => {
it('should handle missing viewport prop', () => {
it('should handle missing viewport prop', async () => {
wrapper = mount(TransformPane, {
props: {
canvas: mockCanvas,
showDebugOverlay: true
canvas: mockCanvas
}
})
// Should not crash when viewport is undefined
expect(wrapper.exists()).toBe(true)
})
it('should update debug overlay when viewport changes', async () => {
wrapper = mount(TransformPane, {
props: {
canvas: mockCanvas,
viewport: { width: 800, height: 600 },
showDebugOverlay: true
}
})
expect(wrapper.text()).toContain('800x600')

View File

@@ -11,7 +11,6 @@ export interface SpatialIndexOptions {
worldBounds?: Bounds
maxDepth?: number
maxItemsPerNode?: number
enableDebugVisualization?: boolean
updateDebounceMs?: number
}
@@ -44,9 +43,6 @@ export const useSpatialIndex = (options: SpatialIndexOptions = {}) => {
rebuildCount: 0
})
// Debug visualization data (unused for now but may be used in future)
// const debugBounds = ref<Bounds[]>([])
// Initialize QuadTree
const initialize = (bounds: Bounds = defaultBounds) => {
quadTree.value = new QuadTree<string>(bounds, {
@@ -173,13 +169,6 @@ export const useSpatialIndex = (options: SpatialIndexOptions = {}) => {
batchUpdate(updates)
}
// Get debug visualization data
const getDebugVisualization = () => {
if (!quadTree.value || !options.enableDebugVisualization) return null
return quadTree.value.getDebugInfo()
}
// Debounced update for performance
const debouncedUpdateNode = useDebounceFn(
updateNode,
@@ -203,9 +192,6 @@ export const useSpatialIndex = (options: SpatialIndexOptions = {}) => {
// Metrics
metrics: computed(() => metrics),
// Debug
getDebugVisualization,
// Direct access to QuadTree (for advanced usage)
quadTree: computed(() => quadTree.value)
}

View File

@@ -294,21 +294,6 @@ export function useCoreCommands(): ComfyCommand[] {
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

@@ -11,7 +11,6 @@ import { LiteGraph } from '../lib/litegraph/src/litegraph'
export const useVueFeatureFlags = () => {
const settingStore = useSettingStore()
// Enable Vue-based node rendering (off by default unless explicitly enabled)
const isVueNodesEnabled = computed(() => {
try {
return settingStore.get('Comfy.VueNodes.Enabled') ?? false
@@ -20,27 +19,12 @@ export const useVueFeatureFlags = () => {
}
})
// Development mode features (debug panel, etc.)
const isDevModeEnabled = computed(() => {
try {
return (
(settingStore.get('Comfy.DevMode' as any) as boolean | undefined) ??
process.env.NODE_ENV === 'development'
)
} catch {
return process.env.NODE_ENV === 'development'
}
})
// Whether Vue nodes should render
const shouldRenderVueNodes = computed(
() => isVueNodesEnabled.value && true // hook for additional safety checks
)
const shouldRenderVueNodes = computed(() => isVueNodesEnabled.value)
// Sync the Vue nodes flag with LiteGraph global settings
const syncVueNodesFlag = () => {
LiteGraph.vueNodesMode = isVueNodesEnabled.value
console.log('Vue nodes mode:', LiteGraph.vueNodesMode)
}
// Watch for changes and update LiteGraph immediately
@@ -48,7 +32,6 @@ export const useVueFeatureFlags = () => {
return {
isVueNodesEnabled,
isDevModeEnabled,
shouldRenderVueNodes,
syncVueNodesFlag
}

View File

@@ -964,13 +964,7 @@ export const CORE_SETTINGS: SettingParams[] = [
tooltip:
'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
experimental: true,
versionAdded: '1.27.1'
}
]

View File

@@ -8248,12 +8248,8 @@ export class LGraphCanvas
let reroute: Reroute | undefined
if (rerouteLayout) {
console.debug('✅ Using LayoutStore for reroute query', {
rerouteLayout
})
reroute = this.graph.getReroute(rerouteLayout.id)
} else {
console.debug('⚠️ Falling back to old reroute query method')
reroute = this.graph.getRerouteOnPos(
event.canvasX,
event.canvasY,

View File

@@ -479,7 +479,6 @@ const zSettings = z.object({
'Comfy.Minimap.RenderErrorState': 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(),

View File

@@ -28,14 +28,6 @@ export const useManagerStateStore = defineStore('managerState', () => {
'extension.manager.supports_v4'
)
console.log('[Manager State Debug]', {
systemStats: systemStats?.system?.argv,
clientSupportsV4,
serverSupportsV4,
hasLegacyManager,
extensions: extensionStore.extensions.map((e) => e.name)
})
// Check command line args first
if (systemStats?.system?.argv?.includes('--disable-manager')) {
return ManagerUIState.DISABLED // comfyui_manager package not installed

View File

@@ -427,24 +427,6 @@ describe('useSpatialIndex', () => {
})
})
describe('getDebugVisualization', () => {
it('should return null when debug is disabled', () => {
const { getDebugVisualization } = spatialIndex
expect(getDebugVisualization()).toBeNull()
})
it('should return debug info when enabled', () => {
const debugIndex = useSpatialIndex({ enableDebugVisualization: true })
debugIndex.initialize()
const debug = debugIndex.getDebugVisualization()
expect(debug).not.toBeNull()
expect(debug).toHaveProperty('size')
expect(debug).toHaveProperty('tree')
})
})
describe('metrics', () => {
it('should track performance metrics', () => {
const { metrics, updateNode, queryViewport } = spatialIndex