Fixes nits for #5758 (#5763)

## Summary

1. Fixes nits for #5758
2. Adds some git ignores

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5763-Fixes-nits-for-5758-2796d73d36508192b3e6feecfcacf38b)
by [Unito](https://www.unito.io)

---------

Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
This commit is contained in:
Arjan Singh
2025-09-24 18:45:33 -07:00
committed by GitHub
parent bc4549244e
commit b96bf3871c
3 changed files with 26 additions and 28 deletions

2
.gitignore vendored
View File

@@ -22,6 +22,8 @@ dist-ssr
*.local
# Claude configuration
.claude/*.local.json
.claude/*.local.md
.claude/*.local.txt
CLAUDE.local.md
# Editor directories and files

View File

@@ -308,16 +308,20 @@ watch(
const nodeErrors = lastNodeErrors?.[node.id]
if (!nodeErrors) continue
let slotErrorsChanged = false
for (const error of nodeErrors.errors) {
if (!error.extra_info?.input_name) continue
const inputIndex = node.findInputSlot(error.extra_info.input_name)
if (inputIndex === -1) continue
node.inputs[inputIndex].hasErrors = true
slotErrorsChanged = true
}
const validErrors = nodeErrors.errors.filter(
(error) => error.extra_info?.input_name !== undefined
)
const slotErrorsChanged =
validErrors.length > 0 &&
validErrors.some((error) => {
const inputName = error.extra_info!.input_name!
const inputIndex = node.findInputSlot(inputName)
if (inputIndex !== -1) {
node.inputs[inputIndex].hasErrors = true
return true
}
return false
})
// Trigger Vue node data update if slot errors changed
if (slotErrorsChanged && comfyApp.graph.onTrigger) {

View File

@@ -136,11 +136,7 @@ import { computed, inject, onErrorCaptured, onMounted, provide, ref } from 'vue'
import type { VueNodeData } from '@/composables/graph/useGraphNodeManager'
import { useErrorHandling } from '@/composables/useErrorHandling'
import {
type INodeInputSlot,
type INodeOutputSlot,
LiteGraph
} from '@/lib/litegraph/src/litegraph'
import { LiteGraph } from '@/lib/litegraph/src/litegraph'
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
import { useCanvasInteractions } from '@/renderer/core/canvas/useCanvasInteractions'
import { TransformStateKey } from '@/renderer/core/layout/injectionKeys'
@@ -205,18 +201,14 @@ const hasExecutionError = computed(
// Computed error states for styling
const hasAnyError = computed((): boolean => {
return (
!!hasExecutionError.value ||
!!nodeData.hasErrors ||
!!error ||
return !!(
hasExecutionError.value ||
nodeData.hasErrors ||
error ||
// Type assertions needed because VueNodeData.inputs/outputs are typed as unknown[]
// but at runtime they contain INodeInputSlot/INodeOutputSlot objects
!!nodeData.inputs?.some(
(slot) => (slot as INodeInputSlot)?.hasErrors ?? false
) ||
!!nodeData.outputs?.some(
(slot) => (slot as INodeOutputSlot)?.hasErrors ?? false
)
nodeData.inputs?.some((slot) => slot?.hasErrors) ||
nodeData.outputs?.some((slot) => slot?.hasErrors)
)
})
@@ -279,7 +271,7 @@ const { latestPreviewUrl, shouldShowPreviewImg } = useNodePreviewState(
const borderClass = computed(() => {
if (hasAnyError.value) {
return 'border-red-500 dark-theme:border-red-500'
return 'border-error dark-theme:border-error'
}
if (executing.value) {
return 'border-blue-500'
@@ -292,10 +284,10 @@ const outlineClass = computed(() => {
return undefined
}
if (hasAnyError.value) {
return 'outline-red-500'
return 'outline-error dark-theme:outline-error'
}
if (executing.value) {
return 'outline-blue-500'
return 'outline-blue-500 dark-theme:outline-blue-500'
}
return 'outline-black dark-theme:outline-white'
})