diff --git a/src/components/nodes/AnnotationNode.tsx b/src/components/nodes/AnnotationNode.tsx index 9a35b075..a1340599 100644 --- a/src/components/nodes/AnnotationNode.tsx +++ b/src/components/nodes/AnnotationNode.tsx @@ -3,7 +3,6 @@ import { useCallback, useRef } from "react"; import { Handle, Position, NodeProps, Node } from "@xyflow/react"; import { BaseNode } from "./BaseNode"; -import { useCommentNavigation } from "@/hooks/useCommentNavigation"; import { useAnnotationStore } from "@/store/annotationStore"; import { useWorkflowStore } from "@/store/workflowStore"; import { AnnotationNodeData } from "@/types"; @@ -12,7 +11,6 @@ type AnnotationNodeType = Node; export function AnnotationNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const openModal = useAnnotationStore((state) => state.openModal); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const fileInputRef = useRef(null); @@ -95,13 +93,8 @@ export function AnnotationNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} selected={selected} - commentNavigation={commentNavigation ?? undefined} + contentClassName="flex-1 min-h-0 overflow-clip" > Annotated -
- +
+ {nodeData.annotations.length > 0 ? `Edit (${nodeData.annotations.length})` : "Add annotations"}
@@ -156,12 +149,12 @@ export function AnnotationNode({ id, data, selected }: NodeProps fileInputRef.current?.click()} onDrop={handleDrop} onDragOver={handleDragOver} - className="w-full flex-1 min-h-[112px] border border-dashed border-neutral-600 rounded flex flex-col items-center justify-center cursor-pointer hover:border-neutral-500 hover:bg-neutral-700/50 transition-colors" + className="w-full h-full bg-neutral-900/40 flex flex-col items-center justify-center cursor-pointer hover:bg-neutral-800/60 transition-colors" > - + - + Drop, click, or connect
diff --git a/src/components/nodes/ArrayNode.tsx b/src/components/nodes/ArrayNode.tsx index a01052b3..8fb4b4af 100644 --- a/src/components/nodes/ArrayNode.tsx +++ b/src/components/nodes/ArrayNode.tsx @@ -3,7 +3,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { Handle, Node, NodeProps, Position, useReactFlow } from "@xyflow/react"; import { BaseNode } from "./BaseNode"; -import { useCommentNavigation } from "@/hooks/useCommentNavigation"; import { useWorkflowStore } from "@/store/workflowStore"; import { ArrayNodeData } from "@/types"; import { getConnectedInputsPure } from "@/store/utils/connectedInputs"; @@ -21,7 +20,6 @@ function arraysEqual(a: string[], b: string[]): boolean { export function ArrayNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const addNode = useWorkflowStore((state) => state.addNode); const onConnect = useWorkflowStore((state) => state.onConnect); @@ -174,35 +172,29 @@ export function ArrayNode({ id, data, selected }: NodeProps) { return ( updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} selected={selected} - commentNavigation={commentNavigation ?? undefined} hasError={!!nodeData.error} minWidth={320} minHeight={300} - headerButtons={ - - } > {/* Single text output point (each outgoing edge receives a separate item) */} + {/* Auto-route button - floating absolute positioned */} + +
diff --git a/src/components/nodes/AudioInputNode.tsx b/src/components/nodes/AudioInputNode.tsx index 36b8a8e9..fb3a8d0c 100644 --- a/src/components/nodes/AudioInputNode.tsx +++ b/src/components/nodes/AudioInputNode.tsx @@ -3,7 +3,6 @@ import { useCallback, useRef, 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 { AudioInputNodeData } from "@/types"; import { useAudioVisualization } from "@/hooks/useAudioVisualization"; @@ -13,7 +12,6 @@ type AudioInputNodeType = Node; export function AudioInputNode({ id, data, selected }: NodeProps) { const nodeData = data; - const commentNavigation = useCommentNavigation(id); const updateNodeData = useWorkflowStore((state) => state.updateNodeData); const fileInputRef = useRef(null); @@ -131,13 +129,7 @@ export function AudioInputNode({ id, data, selected }: NodeProps updateNodeData(id, { customTitle: title || undefined })} - onCommentChange={(comment) => updateNodeData(id, { comment: comment || undefined })} selected={selected} - commentNavigation={commentNavigation ?? undefined} minWidth={250} minHeight={150} > @@ -231,12 +223,12 @@ export function AudioInputNode({ id, data, selected }: NodeProps fileInputRef.current?.click()} onDrop={handleDrop} onDragOver={handleDragOver} - className="w-full flex-1 min-h-[112px] border border-dashed border-neutral-600 rounded flex flex-col items-center justify-center cursor-pointer hover:border-neutral-500 hover:bg-neutral-700/50 transition-colors" + className="w-full h-full bg-neutral-900/40 flex flex-col items-center justify-center cursor-pointer hover:bg-neutral-800/60 transition-colors" > - + - + Drop audio or click
diff --git a/src/components/nodes/ConditionalSwitchNode.tsx b/src/components/nodes/ConditionalSwitchNode.tsx index 1557d1c1..7ee31b68 100644 --- a/src/components/nodes/ConditionalSwitchNode.tsx +++ b/src/components/nodes/ConditionalSwitchNode.tsx @@ -206,32 +206,29 @@ export const ConditionalSwitchNode = memo(({ id, data, selected }: NodeProps updateNodeData(id, { customTitle })} - onCommentChange={(comment) => updateNodeData(id, { comment })} selected={selected} minWidth={260} minHeight={minHeight} className="bg-teal-950/80 border-teal-600" - headerButtons={showClearButton ? ( -
+ > + {/* Clear button - floating absolute positioned */} + {showClearButton && ( +
- ) : undefined} - > + )} + {/* Input handle (left) - text only, aligned with header */}