From 01b3aeae68093ce6e63d31b362aeea076cb0a90d Mon Sep 17 00:00:00 2001
From: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com>
Date: Thu, 2 Oct 2025 02:34:58 +0100
Subject: [PATCH] Prune console.log() (#5867)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Introduce a no-console rule in ESLint configuration and remove existing
console log statements throughout the codebase, replacing some with
warnings or comments.
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5867-Prune-console-log-27e6d73d365081bcbad8c36cfb5b258c)
by [Unito](https://www.unito.io)
---
eslint.config.ts | 7 +++
src/App.vue | 1 -
src/components/widget/SampleModelSelector.vue | 10 +----
.../widget/layout/BaseModalLayout.stories.ts | 2 +-
src/composables/node/useNodePricing.ts | 9 ----
src/lib/litegraph/src/LGraph.ts | 17 ++-----
src/lib/litegraph/src/LGraphCanvas.ts | 2 +-
src/lib/litegraph/src/LGraphNode.ts | 45 +++++++++----------
src/lib/litegraph/src/LiteGraphGlobal.ts | 15 +++----
src/lib/litegraph/src/canvas/LinkConnector.ts | 2 -
.../src/subgraph/ExecutableNodeDTO.ts | 4 +-
.../litegraph/src/subgraph/SubgraphInput.ts | 2 -
.../src/subgraph/SubgraphInputNode.ts | 4 +-
.../litegraph/src/subgraph/SubgraphNode.ts | 9 ++--
.../litegraph/src/subgraph/subgraphUtils.ts | 2 +-
.../test/subgraph/ExecutableNodeDTO.test.ts | 6 ---
.../components/AssetBrowserModal.stories.ts | 20 ++++-----
.../assets/composables/useAssetBrowser.ts | 4 --
.../useAssetBrowserDialog.stories.ts | 1 -
.../management/stores/workflowStore.ts | 4 --
.../WidgetInputNumberSlider.test.ts | 1 -
src/services/gateway/registrySearchGateway.ts | 3 --
src/stores/executionStore.ts | 4 --
src/stores/extensionStore.ts | 2 +-
src/stores/maintenanceTaskStore.ts | 1 -
src/views/InstallView.stories.ts | 12 ++---
.../manager/button/PackUpdateButton.vue | 3 --
.../composables/useConflictDetection.ts | 9 ----
28 files changed, 61 insertions(+), 140 deletions(-)
diff --git a/eslint.config.ts b/eslint.config.ts
index 899852248..359102bbc 100644
--- a/eslint.config.ts
+++ b/eslint.config.ts
@@ -90,6 +90,7 @@ export default defineConfig([
}
],
'unused-imports/no-unused-imports': 'error',
+ 'no-console': ['error', { allow: ['warn', 'error'] }],
'vue/no-v-html': 'off',
// Enforce dark-theme: instead of dark: prefix
'vue/no-restricted-class': ['error', '/^dark:/'],
@@ -207,5 +208,11 @@ export default defineConfig([
}
]
}
+ },
+ {
+ files: ['**/*.{test,spec,stories}.ts', '**/*.stories.vue'],
+ rules: {
+ 'no-console': 'off'
+ }
}
])
diff --git a/src/App.vue b/src/App.vue
index 0a8ec51c3..6f6f10a1e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -44,7 +44,6 @@ const showContextMenu = (event: MouseEvent) => {
onMounted(() => {
// @ts-expect-error fixme ts strict error
window['__COMFYUI_FRONTEND_VERSION__'] = config.app_version
- console.log('ComfyUI Front-end version:', config.app_version)
if (isElectron()) {
document.addEventListener('contextmenu', showContextMenu)
diff --git a/src/components/widget/SampleModelSelector.vue b/src/components/widget/SampleModelSelector.vue
index e33f87ace..a9d9f35bb 100644
--- a/src/components/widget/SampleModelSelector.vue
+++ b/src/components/widget/SampleModelSelector.vue
@@ -127,7 +127,7 @@
diff --git a/src/components/widget/layout/BaseModalLayout.stories.ts b/src/components/widget/layout/BaseModalLayout.stories.ts
index 5b012326d..26479aaba 100644
--- a/src/components/widget/layout/BaseModalLayout.stories.ts
+++ b/src/components/widget/layout/BaseModalLayout.stories.ts
@@ -86,7 +86,7 @@ const createStoryTemplate = (args: StoryArgs) => ({
const t = (k: string) => k
const onClose = () => {
- console.log('OnClose invoked')
+ // OnClose handler for story
}
provide(OnCloseKey, onClose)
diff --git a/src/composables/node/useNodePricing.ts b/src/composables/node/useNodePricing.ts
index 28cfeec78..82a66abc7 100644
--- a/src/composables/node/useNodePricing.ts
+++ b/src/composables/node/useNodePricing.ts
@@ -300,9 +300,6 @@ const apiNodeCosts: Record =
const modeValue = String(modeWidget.value)
const durationValue = String(durationWidget.value)
const modelValue = String(modelWidget.value)
- console.log('modelValue', modelValue)
- console.log('modeValue', modeValue)
- console.log('durationValue', durationValue)
// Same pricing matrix as KlingTextToVideoNode
if (modelValue.includes('v1-6') || modelValue.includes('v1-5')) {
@@ -356,9 +353,6 @@ const apiNodeCosts: Record =
const modeValue = String(modeWidget.value)
const durationValue = String(durationWidget.value)
const modelValue = String(modelWidget.value)
- console.log('modelValue', modelValue)
- console.log('modeValue', modeValue)
- console.log('durationValue', durationValue)
// Same pricing matrix as KlingTextToVideoNode
if (
@@ -564,9 +558,6 @@ const apiNodeCosts: Record =
const model = String(modelWidget.value)
const resolution = String(resolutionWidget.value).toLowerCase()
const duration = String(durationWidget.value)
- console.log('model', model)
- console.log('resolution', resolution)
- console.log('duration', duration)
if (model.includes('ray-flash-2')) {
if (duration.includes('5s')) {
diff --git a/src/lib/litegraph/src/LGraph.ts b/src/lib/litegraph/src/LGraph.ts
index 139919c60..a1e84d60f 100644
--- a/src/lib/litegraph/src/LGraph.ts
+++ b/src/lib/litegraph/src/LGraph.ts
@@ -274,8 +274,6 @@ export class LGraph
* @param o data from previous serialization [optional]
*/
constructor(o?: ISerialisedGraph | SerialisableGraph) {
- if (LiteGraph.debug) console.log('Graph created')
-
/** @see MapProxyHandler */
const links = this._links
MapProxyHandler.bindAllMethods(links)
@@ -532,7 +530,7 @@ export class LGraph
this.errors_in_execution = true
if (LiteGraph.throw_errors) throw error
- if (LiteGraph.debug) console.log('Error during execution:', error)
+ if (LiteGraph.debug) console.error('Error during execution:', error)
this.stop()
}
}
@@ -1167,7 +1165,7 @@ export class LGraph
const ctor = LiteGraph.registered_node_types[node.type]
if (node.constructor == ctor) continue
- console.log('node being replaced by newer version:', node.type)
+ console.warn('node being replaced by newer version:', node.type)
const newnode = LiteGraph.createNode(node.type)
if (!newnode) continue
_nodes[i] = newnode
@@ -1229,9 +1227,6 @@ export class LGraph
/* Called when something visually changed (not the graph!) */
change(): void {
- if (LiteGraph.debug) {
- console.log('Graph changed')
- }
this.canvasAction((c) => c.setDirty(true, true))
this.on_change?.(this)
}
@@ -1626,12 +1621,6 @@ export class LGraph
} else {
throw new TypeError('Subgraph input node is not a SubgraphInput')
}
- console.debug(
- 'Reconnect input links in parent graph',
- { ...link },
- this.links.get(link.id),
- this.links.get(link.id) === link
- )
for (const resolved of others) {
resolved.link.disconnect(this)
@@ -2233,7 +2222,7 @@ export class LGraph
let node = LiteGraph.createNode(String(n_info.type), n_info.title)
if (!node) {
if (LiteGraph.debug)
- console.log('Node not found or has errors:', n_info.type)
+ console.warn('Node not found or has errors:', n_info.type)
// in case of error we create a replacement node to avoid losing info
node = new LGraphNode('')
diff --git a/src/lib/litegraph/src/LGraphCanvas.ts b/src/lib/litegraph/src/LGraphCanvas.ts
index 22b71c66a..dab92a270 100644
--- a/src/lib/litegraph/src/LGraphCanvas.ts
+++ b/src/lib/litegraph/src/LGraphCanvas.ts
@@ -6406,7 +6406,7 @@ export class LGraphCanvas
return true
}
- console.log(`failed creating ${nodeNewType}`)
+ console.error(`failed creating ${nodeNewType}`)
}
}
return false
diff --git a/src/lib/litegraph/src/LGraphNode.ts b/src/lib/litegraph/src/LGraphNode.ts
index a1eeb8ae2..c657526a9 100644
--- a/src/lib/litegraph/src/LGraphNode.ts
+++ b/src/lib/litegraph/src/LGraphNode.ts
@@ -1950,7 +1950,7 @@ export class LGraphNode
try {
this.removeWidget(widget)
} catch (error) {
- console.debug('Failed to remove widget', error)
+ console.error('Failed to remove widget', error)
}
}
@@ -2583,12 +2583,7 @@ export class LGraphNode
if (slotIndex !== undefined)
return this.connect(slot, target_node, slotIndex, optsIn?.afterRerouteId)
- console.debug(
- '[connectByType]: no way to connect type:',
- target_slotType,
- 'to node:',
- target_node
- )
+ // No compatible slot found - connection not possible
return null
}
@@ -2621,7 +2616,7 @@ export class LGraphNode
if (slotIndex !== undefined)
return source_node.connect(slotIndex, this, slot, optsIn?.afterRerouteId)
- console.debug(
+ console.error(
'[connectByType]: no way to connect type:',
source_slotType,
'to node:',
@@ -2661,7 +2656,7 @@ export class LGraphNode
if (!graph) {
// could be connected before adding it to a graph
// due to link ids being associated with graphs
- console.log(
+ console.error(
"Connect: Error, node doesn't belong to any graph. Nodes must be added first to a graph before connecting them."
)
return null
@@ -2672,11 +2667,12 @@ export class LGraphNode
slot = this.findOutputSlot(slot)
if (slot == -1) {
if (LiteGraph.debug)
- console.log(`Connect: Error, no slot of name ${slot}`)
+ console.error(`Connect: Error, no slot of name ${slot}`)
return null
}
} else if (!outputs || slot >= outputs.length) {
- if (LiteGraph.debug) console.log('Connect: Error, slot number not found')
+ if (LiteGraph.debug)
+ console.error('Connect: Error, slot number not found')
return null
}
@@ -2696,7 +2692,7 @@ export class LGraphNode
targetIndex = target_node.findInputSlot(target_slot)
if (targetIndex == -1) {
if (LiteGraph.debug)
- console.log(`Connect: Error, no slot of name ${targetIndex}`)
+ console.error(`Connect: Error, no slot of name ${targetIndex}`)
return null
}
} else if (target_slot === LiteGraph.EVENT) {
@@ -2728,7 +2724,8 @@ export class LGraphNode
!target_node.inputs ||
targetIndex >= target_node.inputs.length
) {
- if (LiteGraph.debug) console.log('Connect: Error, slot number not found')
+ if (LiteGraph.debug)
+ console.error('Connect: Error, slot number not found')
return null
}
@@ -2955,11 +2952,12 @@ export class LGraphNode
slot = this.findOutputSlot(slot)
if (slot == -1) {
if (LiteGraph.debug)
- console.log(`Connect: Error, no slot of name ${slot}`)
+ console.error(`Connect: Error, no slot of name ${slot}`)
return false
}
} else if (!this.outputs || slot >= this.outputs.length) {
- if (LiteGraph.debug) console.log('Connect: Error, slot number not found')
+ if (LiteGraph.debug)
+ console.error('Connect: Error, slot number not found')
return false
}
@@ -3075,19 +3073,19 @@ export class LGraphNode
slot = this.findInputSlot(slot)
if (slot == -1) {
if (LiteGraph.debug)
- console.log(`Connect: Error, no slot of name ${slot}`)
+ console.error(`Connect: Error, no slot of name ${slot}`)
return false
}
} else if (!this.inputs || slot >= this.inputs.length) {
if (LiteGraph.debug) {
- console.log('Connect: Error, slot number not found')
+ console.error('Connect: Error, slot number not found')
}
return false
}
const input = this.inputs[slot]
if (!input) {
- console.debug('disconnectInput: input not found', slot, this.inputs)
+ console.error('disconnectInput: input not found', slot, this.inputs)
return false
}
@@ -3116,19 +3114,16 @@ export class LGraphNode
const target_node = graph.getNodeById(link_info.origin_id)
if (!target_node) {
- console.debug(
- 'disconnectInput: target node not found',
- link_info.origin_id
+ console.error(
+ 'disconnectInput: output not found',
+ link_info.origin_slot
)
return false
}
const output = target_node.outputs[link_info.origin_slot]
if (!output?.links?.length) {
- console.debug(
- 'disconnectInput: output not found',
- link_info.origin_slot
- )
+ // Output not found - may have been removed
return false
}
diff --git a/src/lib/litegraph/src/LiteGraphGlobal.ts b/src/lib/litegraph/src/LiteGraphGlobal.ts
index 5d762799a..31ea68ed4 100644
--- a/src/lib/litegraph/src/LiteGraphGlobal.ts
+++ b/src/lib/litegraph/src/LiteGraphGlobal.ts
@@ -398,8 +398,6 @@ export class LiteGraphGlobal {
throw 'Cannot register a simple object, it must be a class with a prototype'
base_class.type = type
- if (this.debug) console.log('Node registered:', type)
-
const classname = base_class.name
const pos = type.lastIndexOf('/')
@@ -415,7 +413,7 @@ export class LiteGraphGlobal {
const prev = this.registered_node_types[type]
if (prev && this.debug) {
- console.log('replacing node type:', type)
+ console.warn('replacing node type:', type)
}
this.registered_node_types[type] = base_class
@@ -524,7 +522,7 @@ export class LiteGraphGlobal {
): LGraphNode | null {
const base_class = this.registered_node_types[type]
if (!base_class) {
- if (this.debug) console.log(`GraphNode type "${type}" not registered.`)
+ if (this.debug) console.warn(`GraphNode type "${type}" not registered.`)
return null
}
@@ -637,7 +635,6 @@ export class LiteGraphGlobal {
continue
try {
- if (this.debug) console.log('Reloading:', src)
const dynamicScript = document.createElement('script')
dynamicScript.type = 'text/javascript'
dynamicScript.src = src
@@ -645,11 +642,9 @@ export class LiteGraphGlobal {
script_file.remove()
} catch (error) {
if (this.throw_errors) throw error
- if (this.debug) console.log('Error while reloading', src)
+ if (this.debug) console.error('Error while reloading', src)
}
}
-
- if (this.debug) console.log('Nodes reloaded')
}
// separated just to improve if it doesn't work
@@ -749,7 +744,7 @@ export class LiteGraphGlobal {
// convert pointerevents to touch event when not available
if (sMethod == 'pointer' && !window.PointerEvent) {
console.warn("sMethod=='pointer' && !window.PointerEvent")
- console.log(
+ console.warn(
`Converting pointer[${sEvent}] : down move up cancel enter TO touchstart touchmove touchend, etc ..`
)
switch (sEvent) {
@@ -774,7 +769,7 @@ export class LiteGraphGlobal {
break
}
case 'enter': {
- console.log('debug: Should I send a move event?') // ???
+ // TODO: Determine if a move event should be sent
break
}
// case "over": case "out": not used at now
diff --git a/src/lib/litegraph/src/canvas/LinkConnector.ts b/src/lib/litegraph/src/canvas/LinkConnector.ts
index a70fd8752..50bf9a34f 100644
--- a/src/lib/litegraph/src/canvas/LinkConnector.ts
+++ b/src/lib/litegraph/src/canvas/LinkConnector.ts
@@ -906,7 +906,6 @@ export class LinkConnector {
if (connectingTo === 'output') {
// Dropping new output link
const output = node.findOutputByType(firstLink.fromSlot.type)?.slot
- console.debug('out', node, output, firstLink.fromSlot)
if (output === undefined) {
console.warn(
`Could not find slot for link type: [${firstLink.fromSlot.type}].`
@@ -918,7 +917,6 @@ export class LinkConnector {
} else if (connectingTo === 'input') {
// Dropping new input link
const input = node.findInputByType(firstLink.fromSlot.type)?.slot
- console.debug('in', node, input, firstLink.fromSlot)
if (input === undefined) {
console.warn(
`Could not find slot for link type: [${firstLink.fromSlot.type}].`
diff --git a/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts b/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts
index 06da1a8d9..07f4d4cec 100644
--- a/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts
+++ b/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts
@@ -271,9 +271,9 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode {
// Bypass nodes by finding first input with matching type
const matchingIndex = this.#getBypassSlotIndex(slot, type)
- // No input types match
+ // No input types match - bypass not possible
if (matchingIndex === -1) {
- console.debug(
+ console.warn(
`[ExecutableNodeDTO.resolveOutput] No input types match type [${type}] for id [${this.id}] slot [${slot}]`,
this
)
diff --git a/src/lib/litegraph/src/subgraph/SubgraphInput.ts b/src/lib/litegraph/src/subgraph/SubgraphInput.ts
index 63465d2b5..939115513 100644
--- a/src/lib/litegraph/src/subgraph/SubgraphInput.ts
+++ b/src/lib/litegraph/src/subgraph/SubgraphInput.ts
@@ -175,8 +175,6 @@ export class SubgraphInput extends SubgraphSlot {
}
widgets.push(widget)
- } else {
- console.debug('No input found on link id', linkId, link)
}
}
return widgets
diff --git a/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts b/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts
index d46e94654..6cc465ddf 100644
--- a/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts
+++ b/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts
@@ -188,7 +188,7 @@ export class SubgraphInputNode
const subgraphInput = this.slots.at(subgraphInputIndex)
if (!subgraphInput) {
- console.debug(
+ console.warn(
'disconnectNodeInput: subgraphInput not found',
this,
subgraphInputIndex
@@ -201,7 +201,7 @@ export class SubgraphInputNode
if (index !== -1) {
subgraphInput.linkIds.splice(index, 1)
} else {
- console.debug(
+ console.warn(
'disconnectNodeInput: link ID not found in subgraphInput linkIds',
link.id
)
diff --git a/src/lib/litegraph/src/subgraph/SubgraphNode.ts b/src/lib/litegraph/src/subgraph/SubgraphNode.ts
index c10a343ad..f6d738d1e 100644
--- a/src/lib/litegraph/src/subgraph/SubgraphNode.ts
+++ b/src/lib/litegraph/src/subgraph/SubgraphNode.ts
@@ -430,7 +430,7 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
const inputSlot = this.subgraph.inputNode.slots[slot]
const innerLinks = inputSlot.getLinks()
if (innerLinks.length === 0) {
- console.debug(
+ console.warn(
`[SubgraphNode.resolveSubgraphInputLinks] No inner links found for input slot [${slot}] ${inputSlot.name}`,
this
)
@@ -447,9 +447,10 @@ export class SubgraphNode extends LGraphNode implements BaseLGraph {
resolveSubgraphOutputLink(slot: number): ResolvedConnection | undefined {
const outputSlot = this.subgraph.outputNode.slots[slot]
const innerLink = outputSlot.getLinks().at(0)
- if (innerLink) return innerLink.resolve(this.subgraph)
-
- console.debug(
+ if (innerLink) {
+ return innerLink.resolve(this.subgraph)
+ }
+ console.warn(
`[SubgraphNode.resolveSubgraphOutputLink] No inner link found for output slot [${slot}] ${outputSlot.name}`,
this
)
diff --git a/src/lib/litegraph/src/subgraph/subgraphUtils.ts b/src/lib/litegraph/src/subgraph/subgraphUtils.ts
index c225dd7b8..ad957a048 100644
--- a/src/lib/litegraph/src/subgraph/subgraphUtils.ts
+++ b/src/lib/litegraph/src/subgraph/subgraphUtils.ts
@@ -116,7 +116,7 @@ export function getBoundaryLinks(
const resolved = LLink.resolve(input.link, graph)
if (!resolved) {
- console.debug(`Failed to resolve link ID [${input.link}]`)
+ console.warn(`Failed to resolve link ID [${input.link}]`)
continue
}
diff --git a/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts b/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts
index 3f62ba991..acadc2580 100644
--- a/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts
+++ b/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts
@@ -426,7 +426,6 @@ describe('ExecutableNodeDTO Integration', () => {
describe('ExecutableNodeDTO Scale Testing', () => {
it('should create DTOs at scale', () => {
const graph = new LGraph()
- const startTime = performance.now()
const dtos: ExecutableNodeDTO[] = []
// Create DTOs to test performance
@@ -440,16 +439,11 @@ describe('ExecutableNodeDTO Scale Testing', () => {
dtos.push(dto)
}
- const endTime = performance.now()
- const duration = endTime - startTime
-
expect(dtos).toHaveLength(1000)
// Test deterministic properties instead of flaky timing
expect(dtos[0].id).toBe('parent:0')
expect(dtos[999].id).toBe('parent:999')
expect(dtos.every((dto, i) => dto.id === `parent:${i}`)).toBe(true)
-
- console.log(`Created 1000 DTOs in ${duration.toFixed(2)}ms`)
})
it('should handle complex path generation correctly', () => {
diff --git a/src/platform/assets/components/AssetBrowserModal.stories.ts b/src/platform/assets/components/AssetBrowserModal.stories.ts
index f062fe71f..cad836ae3 100644
--- a/src/platform/assets/components/AssetBrowserModal.stories.ts
+++ b/src/platform/assets/components/AssetBrowserModal.stories.ts
@@ -57,12 +57,10 @@ export const Default: Story = {
render: (args) => ({
components: { AssetBrowserModal },
setup() {
- const onAssetSelect = (asset: AssetDisplayItem) => {
- console.log('Selected asset:', asset)
- }
- const onClose = () => {
- console.log('Modal closed')
+ const onAssetSelect = (_asset: AssetDisplayItem) => {
+ // Asset selection handler for story
}
+ const onClose = () => {}
return {
...args,
@@ -97,11 +95,11 @@ export const SingleAssetType: Story = {
render: (args) => ({
components: { AssetBrowserModal },
setup() {
- const onAssetSelect = (asset: AssetDisplayItem) => {
- console.log('Selected asset:', asset)
+ const onAssetSelect = (_asset: AssetDisplayItem) => {
+ // Asset selection handler for story
}
const onClose = () => {
- console.log('Modal closed')
+ // Modal close handler for story
}
// Create assets with only one type (checkpoints)
@@ -146,11 +144,11 @@ export const NoLeftPanel: Story = {
render: (args) => ({
components: { AssetBrowserModal },
setup() {
- const onAssetSelect = (asset: AssetDisplayItem) => {
- console.log('Selected asset:', asset)
+ const onAssetSelect = (_asset: AssetDisplayItem) => {
+ // Asset selection handler for story
}
const onClose = () => {
- console.log('Modal closed')
+ // Modal close handler for story
}
return { ...args, onAssetSelect, onClose, assets: mockAssets }
diff --git a/src/platform/assets/composables/useAssetBrowser.ts b/src/platform/assets/composables/useAssetBrowser.ts
index 831b6c9ac..a567f75cb 100644
--- a/src/platform/assets/composables/useAssetBrowser.ts
+++ b/src/platform/assets/composables/useAssetBrowser.ts
@@ -198,10 +198,6 @@ export function useAssetBrowser(assets: AssetItem[] = []) {
assetId: string,
onSelect?: (filename: string) => void
): Promise {
- if (import.meta.env.DEV) {
- console.debug('Asset selected:', assetId)
- }
-
if (!onSelect) {
return
}
diff --git a/src/platform/assets/composables/useAssetBrowserDialog.stories.ts b/src/platform/assets/composables/useAssetBrowserDialog.stories.ts
index e0095b619..c72cbccc8 100644
--- a/src/platform/assets/composables/useAssetBrowserDialog.stories.ts
+++ b/src/platform/assets/composables/useAssetBrowserDialog.stories.ts
@@ -29,7 +29,6 @@ const DialogDemoComponent = {
}
const handleAssetSelected = (assetPath: string) => {
- console.log('Asset selected:', assetPath)
alert(`Selected asset: ${assetPath}`)
isDialogOpen.value = false // Auto-close like the real composable
}
diff --git a/src/platform/workflow/management/stores/workflowStore.ts b/src/platform/workflow/management/stores/workflowStore.ts
index 02b48c55b..dc9cd07c0 100644
--- a/src/platform/workflow/management/stores/workflowStore.ts
+++ b/src/platform/workflow/management/stores/workflowStore.ts
@@ -87,7 +87,6 @@ export class ComfyWorkflow extends UserFile {
}
// Note: originalContent is populated by super.load()
- console.debug('load and start tracking of workflow', this.path)
this.changeTracker = markRaw(
new ChangeTracker(
this,
@@ -98,7 +97,6 @@ export class ComfyWorkflow extends UserFile {
}
override unload(): void {
- console.debug('unload workflow', this.path)
this.changeTracker = null
super.unload()
}
@@ -302,7 +300,6 @@ export const useWorkflowStore = defineStore('workflow', () => {
const loadedWorkflow = await workflow.load()
activeWorkflow.value = loadedWorkflow
comfyApp.canvas.bg_tint = loadedWorkflow.tintCanvasBg
- console.debug('[workflowStore] open workflow', workflow.path)
return loadedWorkflow
}
@@ -379,7 +376,6 @@ export const useWorkflowStore = defineStore('workflow', () => {
} else {
workflow.unload()
}
- console.debug('[workflowStore] close workflow', workflow.path)
}
/**
diff --git a/src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberSlider.test.ts b/src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberSlider.test.ts
index 828029e89..bd9ada8af 100644
--- a/src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberSlider.test.ts
+++ b/src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberSlider.test.ts
@@ -86,7 +86,6 @@ describe('WidgetInputNumberSlider Value Binding', () => {
it('renders input field', () => {
const widget = createMockWidget(5)
const wrapper = mountComponent(widget, 5)
- console.log(wrapper.html())
expect(wrapper.find('input[inputmode="numeric"]').exists()).toBe(true)
})
diff --git a/src/services/gateway/registrySearchGateway.ts b/src/services/gateway/registrySearchGateway.ts
index 834e730a8..5714d661e 100644
--- a/src/services/gateway/registrySearchGateway.ts
+++ b/src/services/gateway/registrySearchGateway.ts
@@ -69,9 +69,6 @@ export const useRegistrySearchGateway = (): NodePackSearchProvider => {
const timeSinceLastAttempt =
Date.now() - providerState.lastAttempt.getTime()
if (timeSinceLastAttempt > CIRCUIT_BREAKER_TIMEOUT) {
- console.info(
- `Retrying ${providerState.name} provider after circuit breaker timeout`
- )
return true
}
}
diff --git a/src/stores/executionStore.ts b/src/stores/executionStore.ts
index 8791ab4e1..af482cc8a 100644
--- a/src/stores/executionStore.ts
+++ b/src/stores/executionStore.ts
@@ -404,10 +404,6 @@ export const useExecutionStore = defineStore('execution', () => {
...queuedPrompt.nodes
}
queuedPrompt.workflow = workflow
-
- console.debug(
- `queued task ${id} with ${Object.values(queuedPrompt.nodes).length} nodes`
- )
}
/**
diff --git a/src/stores/extensionStore.ts b/src/stores/extensionStore.ts
index 3c1abde8e..b09b3b72f 100644
--- a/src/stores/extensionStore.ts
+++ b/src/stores/extensionStore.ts
@@ -65,7 +65,7 @@ export const useExtensionStore = defineStore('extension', () => {
}
if (disabledExtensionNames.value.has(extension.name)) {
- console.log(`Extension ${extension.name} is disabled.`)
+ console.warn(`Extension ${extension.name} is disabled.`)
}
extensionByName.value[extension.name] = markRaw(extension)
diff --git a/src/stores/maintenanceTaskStore.ts b/src/stores/maintenanceTaskStore.ts
index b7d19f6c7..7ce4811cf 100644
--- a/src/stores/maintenanceTaskStore.ts
+++ b/src/stores/maintenanceTaskStore.ts
@@ -151,7 +151,6 @@ export const useMaintenanceTaskStore = defineStore('maintenanceTask', () => {
/** @todo Refreshes Electron tasks only. */
const refreshDesktopTasks = async () => {
isRefreshing.value = true
- console.log('Refreshing desktop tasks')
await electron.Validation.validateInstallation(processUpdate)
}
diff --git a/src/views/InstallView.stories.ts b/src/views/InstallView.stories.ts
index 9a5c65e79..d66003831 100644
--- a/src/views/InstallView.stories.ts
+++ b/src/views/InstallView.stories.ts
@@ -48,16 +48,10 @@ const meta: Meta = {
getDetectedGpu: () => Promise.resolve('mps')
},
Events: {
- trackEvent: (eventName: string, data?: any) => {
- console.log('Track event:', eventName, data)
- }
- },
- installComfyUI: (options: any) => {
- console.log('Install ComfyUI with options:', options)
- },
- changeTheme: (theme: any) => {
- console.log('Change theme:', theme)
+ trackEvent: (_eventName: string, _data?: any) => {}
},
+ installComfyUI: (_options: any) => {},
+ changeTheme: (_theme: any) => {},
getSystemPaths: () =>
Promise.resolve({
defaultInstallPath: '/Users/username/ComfyUI'
diff --git a/src/workbench/extensions/manager/components/manager/button/PackUpdateButton.vue b/src/workbench/extensions/manager/components/manager/button/PackUpdateButton.vue
index f62efd7a3..abe55e087 100644
--- a/src/workbench/extensions/manager/components/manager/button/PackUpdateButton.vue
+++ b/src/workbench/extensions/manager/components/manager/button/PackUpdateButton.vue
@@ -61,15 +61,12 @@ const updateAllPacks = async () => {
managerStore.isPackInstalled(pack.id)
)
if (!updatablePacks.length) {
- console.info('No installed packs available for update')
isUpdating.value = false
return
}
- console.info(`Starting update of ${updatablePacks.length} packs`)
try {
await Promise.all(updatablePacks.map(updatePack))
managerStore.updatePack.clear()
- console.info('All packs updated successfully')
} catch (error) {
console.error('Pack update failed:', error)
console.error(
diff --git a/src/workbench/extensions/manager/composables/useConflictDetection.ts b/src/workbench/extensions/manager/composables/useConflictDetection.ts
index af8e35e12..46eb4e7a2 100644
--- a/src/workbench/extensions/manager/composables/useConflictDetection.ts
+++ b/src/workbench/extensions/manager/composables/useConflictDetection.ts
@@ -364,10 +364,6 @@ export function useConflictDetection() {
Object.entries(bulkResult).forEach(([packageId, failInfo]) => {
if (failInfo !== null) {
importFailures[packageId] = failInfo
- console.debug(
- `[ConflictDetection] Import failure found for ${packageId}:`,
- failInfo
- )
}
})
@@ -496,11 +492,6 @@ export function useConflictDetection() {
// Merge conflicts for packages with the same name
const mergedConflicts = consolidateConflictsByPackage(conflictedResults)
- console.debug(
- '[ConflictDetection] Conflicts detected (stored for UI):',
- mergedConflicts
- )
-
// Store merged conflicts in Pinia store for UI usage
conflictStore.setConflictedPackages(mergedConflicts)