diff --git a/src/renderer/core/layout/slots/useDomSlotRegistration.ts b/src/renderer/core/layout/slots/useDomSlotRegistration.ts index dd4828e22..a80850c2b 100644 --- a/src/renderer/core/layout/slots/useDomSlotRegistration.ts +++ b/src/renderer/core/layout/slots/useDomSlotRegistration.ts @@ -67,19 +67,8 @@ interface SlotRegistrationOptions { export function useDomSlotRegistration(options: SlotRegistrationOptions) { const { nodeId, slotIndex, isInput, element: elRef, transform } = options - console.debug('[useDomSlotRegistration] Called with:', { - nodeId, - slotIndex, - isInput, - hasElement: !!elRef, - elementValue: elRef?.value, - hasTransform: !!transform, - hasScreenToCanvas: !!transform?.screenToCanvas - }) - // Early return if no nodeId if (!nodeId || nodeId === '') { - console.debug('[useDomSlotRegistration] Early return - no nodeId') return { remeasure: () => {} } @@ -96,32 +85,11 @@ export function useDomSlotRegistration(options: SlotRegistrationOptions) { const measureAndCacheOffset = () => { // Skip if component was unmounted if (!mountedComponents.has(componentToken)) { - console.debug( - '[useDomSlotRegistration] Skipping measure - component unmounted:', - { nodeId, slotKey } - ) return } const el = elRef.value - console.debug('[useDomSlotRegistration] measureAndCacheOffset:', { - nodeId, - slotKey, - hasElement: !!el, - element: el, - hasTransform: !!transform?.screenToCanvas - }) - if (!el || !transform?.screenToCanvas) { - console.debug( - '[useDomSlotRegistration] Cannot measure - missing element or transform:', - { - nodeId, - slotKey, - hasElement: !!el, - hasTransform: !!transform?.screenToCanvas - } - ) return } @@ -203,15 +171,6 @@ export function useDomSlotRegistration(options: SlotRegistrationOptions) { } onMounted(async () => { - console.debug('[useDomSlotRegistration] onMounted:', { - nodeId, - slotKey, - slotIndex, - isInput, - hasElement: !!elRef.value, - hasTransform: !!transform?.screenToCanvas - }) - // Mark component as mounted mountedComponents.add(componentToken) diff --git a/src/renderer/core/layout/store/layoutStore.ts b/src/renderer/core/layout/store/layoutStore.ts index 3d863ed68..eb1bf511e 100644 --- a/src/renderer/core/layout/store/layoutStore.ts +++ b/src/renderer/core/layout/store/layoutStore.ts @@ -381,90 +381,29 @@ class LayoutStoreImpl implements LayoutStore { existing.position.x === layout.position.x && existing.position.y === layout.position.y ) { - console.debug('[SlotLayout] No change detected, skipping update:', { - key, - nodeId: layout.nodeId, - type: layout.type, - index: layout.index - }) return } - } else { - console.debug('[SlotLayout] Adding new slot:', { - key, - nodeId: layout.nodeId, - type: layout.type, - index: layout.index, - bounds: layout.bounds, - position: layout.position - }) - logger.debug('Adding slot:', { - nodeId: layout.nodeId, - type: layout.type, - index: layout.index, - bounds: layout.bounds - }) } if (existing) { - console.debug('[SlotLayout] Updating existing slot:', { - key, - nodeId: layout.nodeId, - type: layout.type, - index: layout.index, - oldBounds: existing.bounds, - newBounds: layout.bounds, - oldPosition: existing.position, - newPosition: layout.position - }) // Update spatial index this.slotSpatialIndex.update(key, layout.bounds) } else { - console.debug('[SlotLayout] Inserting slot into spatial index:', { - key, - nodeId: layout.nodeId, - type: layout.type, - index: layout.index - }) // Insert into spatial index this.slotSpatialIndex.insert(key, layout.bounds) } this.slotLayouts.set(key, layout) - console.debug('[SlotLayout] Slot layout saved to map:', { - key, - totalSlots: this.slotLayouts.size - }) } /** * Delete slot layout data */ deleteSlotLayout(key: string): void { - const existing = this.slotLayouts.get(key) - console.debug('[SlotLayout] Deleting slot:', { - key, - existed: !!existing, - slotInfo: existing - ? { - nodeId: existing.nodeId, - type: existing.type, - index: existing.index - } - : null - }) - const deleted = this.slotLayouts.delete(key) if (deleted) { - console.debug('[SlotLayout] Removing slot from spatial index:', { key }) // Remove from spatial index this.slotSpatialIndex.remove(key) - console.debug('[SlotLayout] Slot deleted successfully:', { - key, - remainingSlots: this.slotLayouts.size - }) - } else { - console.debug('[SlotLayout] Slot was not in map:', { key }) } } @@ -472,28 +411,17 @@ class LayoutStoreImpl implements LayoutStore { * Delete all slot layouts for a node */ deleteNodeSlotLayouts(nodeId: NodeId): void { - console.debug('[SlotLayout] Deleting all slots for node:', { nodeId }) const keysToDelete: string[] = [] for (const [key, layout] of this.slotLayouts) { if (layout.nodeId === nodeId) { keysToDelete.push(key) } } - console.debug('[SlotLayout] Found slots to delete:', { - nodeId, - slotCount: keysToDelete.length, - keys: keysToDelete - }) for (const key of keysToDelete) { this.slotLayouts.delete(key) // Remove from spatial index this.slotSpatialIndex.remove(key) } - console.debug('[SlotLayout] Node slots deleted:', { - nodeId, - deletedCount: keysToDelete.length, - remainingSlots: this.slotLayouts.size - }) } /** @@ -501,17 +429,8 @@ class LayoutStoreImpl implements LayoutStore { * Used when switching rendering modes (Vue ↔ LiteGraph) */ clearAllSlotLayouts(): void { - const previousCount = this.slotLayouts.size - console.debug('[SlotLayout] Clearing all slot layouts:', { - previousCount, - operation: 'clearAll' - }) this.slotLayouts.clear() this.slotSpatialIndex.clear() - console.debug('[SlotLayout] All slots cleared:', { - previousCount, - currentCount: this.slotLayouts.size - }) } /** @@ -561,19 +480,7 @@ class LayoutStoreImpl implements LayoutStore { * Get slot layout data */ getSlotLayout(key: string): SlotLayout | null { - const layout = this.slotLayouts.get(key) || null - console.debug('[SlotLayout] Getting slot layout:', { - key, - found: !!layout, - slotInfo: layout - ? { - nodeId: layout.nodeId, - type: layout.type, - index: layout.index - } - : null - }) - return layout + return this.slotLayouts.get(key) || null } /** @@ -752,28 +659,13 @@ class LayoutStoreImpl implements LayoutStore { } const candidateSlotKeys = this.slotSpatialIndex.query(searchArea) - console.debug('[SlotLayout] Querying slot at point:', { - point, - searchArea, - candidateCount: candidateSlotKeys.length, - totalSlots: this.slotLayouts.size - }) - // Check precise bounds for candidates for (const key of candidateSlotKeys) { const slotLayout = this.slotLayouts.get(key) if (slotLayout && this.pointInBounds(point, slotLayout.bounds)) { - console.debug('[SlotLayout] Found slot at point:', { - key, - nodeId: slotLayout.nodeId, - type: slotLayout.type, - index: slotLayout.index, - bounds: slotLayout.bounds - }) return slotLayout } } - console.debug('[SlotLayout] No slot found at point:', { point }) return null } @@ -1362,11 +1254,6 @@ class LayoutStoreImpl implements LayoutStore { private updateNodeSlotPositions(nodeId: NodeId, _nodePosition: Point): void { // Mark all slots for this node as potentially stale // The layout sync system will recalculate positions on the next frame - console.debug('[SlotLayout] Updating node slot positions:', { - nodeId, - nodePosition: _nodePosition - }) - const slotsToRemove: string[] = [] for (const [key, slotLayout] of this.slotLayouts) { @@ -1375,23 +1262,11 @@ class LayoutStoreImpl implements LayoutStore { } } - console.debug('[SlotLayout] Marking slots for recalculation:', { - nodeId, - slotCount: slotsToRemove.length, - keys: slotsToRemove - }) - // Remove from spatial index so they'll be recalculated for (const key of slotsToRemove) { this.slotSpatialIndex.remove(key) this.slotLayouts.delete(key) } - - console.debug('[SlotLayout] Slots removed for recalculation:', { - nodeId, - removedCount: slotsToRemove.length, - remainingSlots: this.slotLayouts.size - }) } // Helper methods diff --git a/src/renderer/extensions/vueNodes/components/NodeSlots.vue b/src/renderer/extensions/vueNodes/components/NodeSlots.vue index 2e2be32c6..d19d3157f 100644 --- a/src/renderer/extensions/vueNodes/components/NodeSlots.vue +++ b/src/renderer/extensions/vueNodes/components/NodeSlots.vue @@ -50,15 +50,6 @@ const props = defineProps() const nodeInfo = computed(() => { const info = props.nodeData || props.node || null - console.debug('[NodeSlots] nodeInfo computed:', { - hasNodeData: !!props.nodeData, - hasNode: !!props.node, - nodeId: info?.id, - nodeIdType: typeof info?.id, - nodeTitle: info?.title, - inputCount: info?.inputs?.length ?? 0, - outputCount: info?.outputs?.length ?? 0 - }) return info })