mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-17 09:18:26 +00:00
## Summary Restores required-input validation highlighting on Vue node input slots. ## Changes - **What**: Passes validation error state from `NodeSlots` to `InputSlot` using node locator IDs, including subgraph and nested subgraph execution IDs. - **What**: Adds unit coverage for root, one-level subgraph, and nested subgraph slot error mapping. - **What**: Adds a Vue Nodes screenshot regression test that asserts the missing required input slot itself receives the error highlight. - **Dependencies**: None. ## Review Focus - Required input errors on Vue-rendered node's slots. - The new Playwright screenshot expectation will need the `New Browser Test Expectation` label for Linux baseline generation. ## Screenshots (if applicable) Before <img width="499" height="324" alt="스크린샷 2026-05-05 오후 3 00 44" src="https://github.com/user-attachments/assets/285fdf91-6d7e-480b-99b9-715705f78914" /> After <img width="482" height="356" alt="스크린샷 2026-05-05 오후 3 01 11" src="https://github.com/user-attachments/assets/51b8db49-eb9c-4155-8aa5-109c0bd7699b" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11950-fix-highlight-missing-input-slots-on-Vue-nodes-3576d73d365081bd85bfd1ea149d45c5) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
31 lines
828 B
TypeScript
31 lines
828 B
TypeScript
import type { NodeError } from '@/schemas/apiSchema'
|
|
import type { useExecutionErrorStore } from '@/stores/executionErrorStore'
|
|
import type { NodeExecutionId } from '@/types/nodeIdentification'
|
|
|
|
type ExecutionErrorStore = ReturnType<typeof useExecutionErrorStore>
|
|
|
|
function createRequiredInputMissingNodeError(inputName: string): NodeError {
|
|
return {
|
|
errors: [
|
|
{
|
|
type: 'required_input_missing',
|
|
message: 'Missing',
|
|
details: '',
|
|
extra_info: { input_name: inputName }
|
|
}
|
|
],
|
|
dependent_outputs: [],
|
|
class_type: 'TestNode'
|
|
}
|
|
}
|
|
|
|
export function seedRequiredInputMissingNodeError(
|
|
store: ExecutionErrorStore,
|
|
executionId: NodeExecutionId,
|
|
inputName: string
|
|
): void {
|
|
store.lastNodeErrors = {
|
|
[executionId]: createRequiredInputMissingNodeError(inputName)
|
|
}
|
|
}
|