From f5ef5083345eecf220b6ae28ac83be7ff209b844 Mon Sep 17 00:00:00 2001 From: Joe Munene Date: Wed, 15 Apr 2026 22:16:35 +0300 Subject: [PATCH] fix(frontend/builder): preserve agent name in AgentExecutor node title after reload When an AgentExecutorBlock node was saved and the page reloaded, the node title reverted to the generic "Agent Executor" because NodeHeader always used data.title (the block name). This reads agent_name and graph_version from hardcodedValues (persisted via input_default) and uses them as the display title, falling back to data.title for non-agent blocks. Closes #11041 --- .../nodes/CustomNode/components/NodeHeader.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeHeader.tsx index 9a3add62b6..bf069393da 100644 --- a/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeHeader.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeHeader.tsx @@ -21,7 +21,17 @@ type Props = { export const NodeHeader = ({ data, nodeId }: Props) => { const updateNodeData = useNodeStore((state) => state.updateNodeData); - const title = (data.metadata?.customized_name as string) || data.title; + const agentName = data.hardcodedValues?.agent_name as string | undefined; + const graphVersion = data.hardcodedValues?.graph_version as number | undefined; + const agentDisplayName = + agentName && graphVersion != null + ? `${agentName} v${graphVersion}` + : agentName || undefined; + + const title = + (data.metadata?.customized_name as string) || + agentDisplayName || + data.title; const [isEditingTitle, setIsEditingTitle] = useState(false); const [editedTitle, setEditedTitle] = useState(title);