From a9058d12922c0b70a6871aba8c00c1471bee223e Mon Sep 17 00:00:00 2001 From: Marc Kelechava Date: Wed, 10 Dec 2025 15:43:23 -0800 Subject: [PATCH] Add debug/play button to HTTP Request workflow block (#4265) --- .../nodes/HttpRequestNode/HttpRequestNode.tsx | 51 +++++-------------- .../editor/nodes/components/NodeHeader.tsx | 3 ++ 2 files changed, 17 insertions(+), 37 deletions(-) diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/HttpRequestNode/HttpRequestNode.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/HttpRequestNode/HttpRequestNode.tsx index b5c4fc61..2bd0991e 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/HttpRequestNode/HttpRequestNode.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/HttpRequestNode/HttpRequestNode.tsx @@ -6,19 +6,16 @@ import { } from "@/components/ui/accordion"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; -import { useDeleteNodeCallback } from "@/routes/workflows/hooks/useDeleteNodeCallback"; import { useNodeLabelChangeHandler } from "@/routes/workflows/hooks/useLabelChangeHandler"; import { Handle, NodeProps, Position, useEdges, useNodes } from "@xyflow/react"; import { useCallback } from "react"; -import { EditableNodeTitle } from "../components/EditableNodeTitle"; -import { NodeActionMenu } from "../NodeActionMenu"; +import { NodeHeader } from "../components/NodeHeader"; +import type { WorkflowBlockType } from "@/routes/workflows/types/workflowTypes"; import type { HttpRequestNode as HttpRequestNodeType } from "./types"; import { HelpTooltip } from "@/components/HelpTooltip"; import { Switch } from "@/components/ui/switch"; import { placeholders, helpTooltips } from "../../helpContent"; import { WorkflowBlockInputTextarea } from "@/components/WorkflowBlockInputTextarea"; -import { WorkflowBlockIcon } from "../WorkflowBlockIcon"; -import { WorkflowBlockTypes } from "@/routes/workflows/types/workflowTypes"; import { AppNode } from ".."; import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils"; import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect"; @@ -64,13 +61,12 @@ const timeoutTooltip = "Request timeout in seconds."; const followRedirectsTooltip = "Whether to automatically follow HTTP redirects."; -function HttpRequestNode({ id, data }: NodeProps) { +function HttpRequestNode({ id, data, type }: NodeProps) { const { editable } = data; - const [label, setLabel] = useNodeLabelChangeHandler({ + const [label] = useNodeLabelChangeHandler({ id, initialValue: data.label, }); - const deleteNodeCallback = useDeleteNodeCallback(); const rerender = useRerender({ prefix: "accordian" }); const nodes = useNodes(); const edges = useEdges(); @@ -139,27 +135,14 @@ function HttpRequestNode({ id, data }: NodeProps) { className="opacity-0" />
-
-
-
- -
-
- - HTTP Request Block -
-
-
- {/* Quick Action Buttons */} + - - { - deleteNodeCallback(id); - }} - /> -
-
+ } + />
{/* Method and URL Section */} diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx index a3ae7fcd..33656a34 100644 --- a/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx @@ -64,6 +64,7 @@ interface Props { blockLabel: string; // today, this + wpid act as the identity of a block disabled?: boolean; editable: boolean; + extraActions?: React.ReactNode; nodeId: string; totpIdentifier: string | null; totpUrl: string | null; @@ -156,6 +157,7 @@ function NodeHeader({ blockLabel, disabled = false, editable, + extraActions, nodeId, totpIdentifier, totpUrl, @@ -563,6 +565,7 @@ function NodeHeader({
+ {extraActions} {thisBlockIsPlaying && (