From e631c5268c2a056dbcbbd6fc602ce0ac22ffbd40 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Mon, 2 Mar 2026 22:32:59 +1300 Subject: [PATCH] feat(46-03): remove header props from 8 node components (batch 2) - PromptConstructorNode: removed title, customTitle, comment, header callbacks, onExpand - PromptNode: removed title, customTitle, comment, header callbacks, onExpand, headerButtons - RouterNode: removed title, customTitle, comment, header callbacks - SplitGridNode: removed title, customTitle, comment, header callbacks - SwitchNode: removed title, customTitle, comment, header callbacks - VideoFrameGrabNode: removed title, customTitle, comment, header callbacks, onRun - VideoTrimNode: removed title, customTitle, comment, header callbacks, onRun (all 3 variants) - VideoStitchNode: removed title, customTitle, comment, header callbacks, onRun (all 3 variants) --- .../nodes/PromptConstructorNode.tsx | 9 ------ src/components/nodes/PromptNode.tsx | 29 ------------------- src/components/nodes/RouterNode.tsx | 5 ---- src/components/nodes/SplitGridNode.tsx | 8 ----- src/components/nodes/SwitchNode.tsx | 5 ---- src/components/nodes/VideoFrameGrabNode.tsx | 9 ------ src/components/nodes/VideoStitchNode.tsx | 21 -------------- src/components/nodes/VideoTrimNode.tsx | 15 ---------- 8 files changed, 101 deletions(-) diff --git a/src/components/nodes/PromptConstructorNode.tsx b/src/components/nodes/PromptConstructorNode.tsx index b0a4a271..6f881ab8 100644 --- a/src/components/nodes/PromptConstructorNode.tsx +++ b/src/components/nodes/PromptConstructorNode.tsx @@ -4,7 +4,6 @@ import { useCallback, useState, useEffect, useMemo, useRef } from "react"; import { createPortal } from "react-dom"; import { Handle, Position, NodeProps, Node } from "@xyflow/react"; import { BaseNode } from "./BaseNode"; -import { useCommentNavigation } from "@/hooks/useCommentNavigation"; import { usePromptAutocomplete } from "@/hooks/usePromptAutocomplete"; import { useWorkflowStore } from "@/store/workflowStore"; import { PromptConstructorNodeData, PromptNodeData, LLMGenerateNodeData, AvailableVariable } from "@/types"; @@ -15,7 +14,6 @@ type PromptConstructorNodeType = Node) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const edges = useWorkflowStore((state) => state.edges); const nodes = useWorkflowStore((state) => state.nodes); @@ -181,14 +179,7 @@ export function PromptConstructorNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} - onExpand={handleOpenModal} selected={selected} - commentNavigation={commentNavigation ?? undefined} > {/* Text input handle */} ; export function PromptNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const incrementModalCount = useWorkflowStore((state) => state.incrementModalCount); const decrementModalCount = useWorkflowStore((state) => state.decrementModalCount); @@ -115,34 +113,7 @@ export function PromptNode({ id, data, selected }: NodeProps) { <> updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} - onExpand={handleOpenModal} selected={selected} - commentNavigation={commentNavigation ?? undefined} - headerButtons={ -
- -
- } > {/* Text input handle - for receiving text from LLM nodes */} ) return ( updateNodeData(id, { customTitle })} - onCommentChange={(comment) => updateNodeData(id, { comment })} selected={selected} minWidth={200} minHeight={minHeight} diff --git a/src/components/nodes/SplitGridNode.tsx b/src/components/nodes/SplitGridNode.tsx index 635f20ca..c1d75251 100644 --- a/src/components/nodes/SplitGridNode.tsx +++ b/src/components/nodes/SplitGridNode.tsx @@ -3,7 +3,6 @@ import { useCallback, useState, useEffect } from "react"; import { Handle, Position, NodeProps, Node } from "@xyflow/react"; import { BaseNode } from "./BaseNode"; -import { useCommentNavigation } from "@/hooks/useCommentNavigation"; import { useWorkflowStore } from "@/store/workflowStore"; import { SplitGridNodeData } from "@/types"; import { SplitGridSettingsModal } from "../SplitGridSettingsModal"; @@ -12,7 +11,6 @@ type SplitGridNodeType = Node; export function SplitGridNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const regenerateNode = useWorkflowStore((state) => state.regenerateNode); const isRunning = useWorkflowStore((state) => state.isRunning); @@ -40,14 +38,8 @@ export function SplitGridNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} selected={selected} hasError={nodeData.status === "error"} - commentNavigation={commentNavigation ?? undefined} > {/* Image input handle */} ) return ( updateNodeData(id, { customTitle })} - onCommentChange={(comment) => updateNodeData(id, { comment })} selected={selected} minWidth={220} minHeight={minHeight} diff --git a/src/components/nodes/VideoFrameGrabNode.tsx b/src/components/nodes/VideoFrameGrabNode.tsx index aa6509e5..9fac6551 100644 --- a/src/components/nodes/VideoFrameGrabNode.tsx +++ b/src/components/nodes/VideoFrameGrabNode.tsx @@ -3,7 +3,6 @@ import React, { useMemo } from "react"; import { Handle, Position, NodeProps, Node } from "@xyflow/react"; import { BaseNode } from "./BaseNode"; -import { useCommentNavigation } from "@/hooks/useCommentNavigation"; import { useWorkflowStore } from "@/store/workflowStore"; import { VideoFrameGrabNodeData } from "@/types"; @@ -11,7 +10,6 @@ type VideoFrameGrabNodeType = Node; export function VideoFrameGrabNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const regenerateNode = useWorkflowStore((state) => state.regenerateNode); const isRunning = useWorkflowStore((state) => state.isRunning); @@ -40,16 +38,9 @@ export function VideoFrameGrabNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} - onRun={canExtract ? handleExtract : undefined} selected={selected} isExecuting={isRunning} hasError={nodeData.status === "error"} - commentNavigation={commentNavigation ?? undefined} minWidth={320} minHeight={320} > diff --git a/src/components/nodes/VideoStitchNode.tsx b/src/components/nodes/VideoStitchNode.tsx index c39a86d0..aac0ebd5 100644 --- a/src/components/nodes/VideoStitchNode.tsx +++ b/src/components/nodes/VideoStitchNode.tsx @@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { Handle, Position, NodeProps, Node } from "@xyflow/react"; import { BaseNode } from "./BaseNode"; -import { useCommentNavigation } from "@/hooks/useCommentNavigation"; import { useWorkflowStore } from "@/store/workflowStore"; import { VideoStitchNodeData } from "@/types"; import { checkEncoderSupport } from "@/hooks/useStitchVideos"; @@ -13,7 +12,6 @@ type VideoStitchNodeType = Node; export function VideoStitchNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const edges = useWorkflowStore((state) => state.edges); const nodes = useWorkflowStore((state) => state.nodes); @@ -367,13 +365,7 @@ export function VideoStitchNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} selected={selected} - commentNavigation={commentNavigation ?? undefined} minWidth={500} minHeight={280} > @@ -403,13 +395,7 @@ export function VideoStitchNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} selected={selected} - commentNavigation={commentNavigation ?? undefined} minWidth={500} minHeight={280} > @@ -445,16 +431,9 @@ export function VideoStitchNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} - onRun={handleStitch} selected={selected} isExecuting={isRunning} hasError={nodeData.status === "error"} - commentNavigation={commentNavigation ?? undefined} minWidth={500} minHeight={280} > diff --git a/src/components/nodes/VideoTrimNode.tsx b/src/components/nodes/VideoTrimNode.tsx index 19fe3ec4..e23599f0 100644 --- a/src/components/nodes/VideoTrimNode.tsx +++ b/src/components/nodes/VideoTrimNode.tsx @@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { Handle, Position, NodeProps, Node } from "@xyflow/react"; import { BaseNode } from "./BaseNode"; -import { useCommentNavigation } from "@/hooks/useCommentNavigation"; import { useWorkflowStore } from "@/store/workflowStore"; import { VideoTrimNodeData } from "@/types"; import { checkEncoderSupport } from "@/hooks/useStitchVideos"; @@ -22,7 +21,6 @@ function formatTime(seconds: number): string { export function VideoTrimNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const regenerateNode = useWorkflowStore((state) => state.regenerateNode); const isRunning = useWorkflowStore((state) => state.isRunning); @@ -234,13 +232,7 @@ export function VideoTrimNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} selected={selected} - commentNavigation={commentNavigation ?? undefined} minWidth={360} minHeight={360} > @@ -261,16 +253,9 @@ export function VideoTrimNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} - onRun={canTrim ? handleTrim : undefined} selected={selected} isExecuting={isRunning} hasError={nodeData.status === "error"} - commentNavigation={commentNavigation ?? undefined} minWidth={360} minHeight={360} >