From c705f58531ecca748b34a9a4976d0b84d59541a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 19:52:38 +0000 Subject: [PATCH] feat(editor): show composed webhook URL + Copy button on Webhook nodes When the selected node is http.webhook, the config panel now shows the full POST URL (${origin}/wh/${workflowId}/${path}) with a one-click Copy button and an active-workflow reminder. Removes the guesswork of assembling the URL by hand from the design spec. --- frontend/src/editor/NodeConfigPanel.tsx | 57 ++++++++++++++++++++++++- frontend/src/pages/EditorPage.tsx | 2 + 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/frontend/src/editor/NodeConfigPanel.tsx b/frontend/src/editor/NodeConfigPanel.tsx index 7d8f5de..f2573f3 100644 --- a/frontend/src/editor/NodeConfigPanel.tsx +++ b/frontend/src/editor/NodeConfigPanel.tsx @@ -1,3 +1,5 @@ +import { useState } from "react"; +import { Copy, Check } from "lucide-react"; import { useNodeTypes, useConnections } from "@/api/hooks"; import { SchemaForm } from "@/forms/SchemaForm"; import type { Node } from "@xyflow/react"; @@ -7,9 +9,11 @@ interface Props { selected: Node | null; onChange: (patch: Partial) => void; onDelete: () => void; + workflowId: string; + workflowActive: boolean; } -export function NodeConfigPanel({ selected, onChange, onDelete }: Props) { +export function NodeConfigPanel({ selected, onChange, onDelete, workflowId, workflowActive }: Props) { const nts = useNodeTypes(); const cs = useConnections(); if (!selected) { @@ -56,6 +60,13 @@ export function NodeConfigPanel({ selected, onChange, onDelete }: Props) { onChange={(v) => onChange({ config: v })} /> )} + {selected.data.typeId === "http.webhook" && ( + + )} + + + POST {url} + + {!path && ( +

Set a URL path above to complete the endpoint.

+ )} + {!workflowActive && ( +

+ The webhook only responds when the workflow is active — activate it + from the toolbar to receive requests. +

+ )} + + ); +} diff --git a/frontend/src/pages/EditorPage.tsx b/frontend/src/pages/EditorPage.tsx index 380d592..2a74c31 100644 --- a/frontend/src/pages/EditorPage.tsx +++ b/frontend/src/pages/EditorPage.tsx @@ -158,6 +158,8 @@ export default function EditorPage() { selected={selected} onChange={patchSelected} onDelete={deleteSelected} + workflowId={id ?? ""} + workflowActive={wf.data.active} />