From 7bcedcbaab90021a3f390a3f3942cbd9f3ca3690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Fri, 24 Apr 2026 16:31:19 +0800 Subject: [PATCH] fix: right click node not display the node detail panel (#35554) --- web/app/components/workflow/hooks/use-nodes-interactions.ts | 2 +- web/app/components/workflow/nodes/_base/node.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/hooks/use-nodes-interactions.ts b/web/app/components/workflow/hooks/use-nodes-interactions.ts index beb3f3733d..f885236ad9 100644 --- a/web/app/components/workflow/hooks/use-nodes-interactions.ts +++ b/web/app/components/workflow/hooks/use-nodes-interactions.ts @@ -1712,7 +1712,7 @@ export const useNodesInteractions = () => { nodeId: node.id, }, }) - handleNodeSelect(node.id) + handleNodeSelect(node.id, true) }, [workflowStore, handleNodeSelect], ) diff --git a/web/app/components/workflow/nodes/_base/node.tsx b/web/app/components/workflow/nodes/_base/node.tsx index ed83c58b6e..43f8e5773e 100644 --- a/web/app/components/workflow/nodes/_base/node.tsx +++ b/web/app/components/workflow/nodes/_base/node.tsx @@ -79,6 +79,7 @@ const BaseNode: FC = ({ const appId = useStore(s => s.appId) const { nodePanelPresence } = useCollaboration(appId as string) const controlMode = useStore(s => s.controlMode) + const isContextMenuTarget = useStore(s => s.nodeMenu?.nodeId === id) const currentUserPresence = useMemo(() => { const userId = userProfile?.id || '' @@ -123,7 +124,7 @@ const BaseNode: FC = ({ const { hasNodeInspectVars } = useInspectVarsCrud() const isLoading = data._runningStatus === NodeRunningStatus.Running || data._singleRunningStatus === NodeRunningStatus.Running const hasVarValue = hasNodeInspectVars(id) - const showSelectedBorder = Boolean(data.selected || data._isBundled || data._isEntering) + const showSelectedBorder = Boolean(data.selected || isContextMenuTarget || data._isBundled || data._isEntering) const { showRunningBorder, showSuccessBorder,