Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Background
In real-world operations, when a workflow run fails, operators typically identify the failing node's node_id from server logs (e.g., a code node execution error). They then need to return to the workflow editor and find the corresponding node on the canvas for troubleshooting and fixes.
The current workflow editor has the following limitations:
Cmd+K search only matches by node title/type/description — it does not support searching by node_id. Operators usually have the node_id from logs, not the node title, so they cannot search and locate the node directly.
- No URL-based node navigation — operators cannot construct a link that opens the editor and automatically navigates to a specific node. They must manually find it on the canvas.
Requirements
Provide two ways for operators to quickly locate a workflow node by node_id:
Cmd+K search supports node_id matching — in the goto-anything search @node mode, include node_id in the search scope and display it in the search results.
- URL parameter
?node_id=xxx for direct navigation — when opening a URL with the node_id query parameter, the editor automatically selects and scrolls to that node.
Solution
1. Cmd+K search supports node_id
Modified file: web/app/components/workflow/hooks/use-workflow-search.tsx
Changes:
- Added a
nodeId field to the searchableNodes mapping, exposing node.id to the search logic.
- Added
node_id matching rules to the calculateScore scoring function with the highest weight (exact match: 120 points > title exact prefix: 100 points), ensuring that when searching by node_id, the target node ranks first.
- Appended
node_id to the search result description, separated by · (e.g., Node description · 1721234567890), so users can confirm the matched node.
Scoring rules:
| Match type |
Score |
Description |
nodeId === searchTerm |
120 |
Exact node_id match |
nodeId.startsWith(searchTerm) |
90 |
Prefix match |
nodeId.includes(searchTerm) |
40 |
Partial match |
Usage:
Cmd+K → type @node → paste node_id → select result → node is selected and scrolled into view
2. URL parameter ?node_id=xxx for direct navigation
New file: web/app/components/workflow/hooks/use-locate-node.ts
Modified files:
web/app/components/workflow/index.tsx — call useLocateNode(nodes) in the Workflow component
web/i18n/en-US/workflow.json — added panel.locateNodeNotFound and panel.locateNodeSuccess
web/i18n/zh-Hans/workflow.json — added corresponding Chinese translations
Changes:
- Added
useLocateNode hook that reads the node_id query parameter from the URL.
- Once workflow node data has loaded, it looks up the node by
node_id:
- Found: selects the node (automatically opens the right-side config panel) + scrolls the viewport to the node + shows a success toast.
- Not found: shows an error toast with the specific
node_id.
- Uses
useRef to ensure the locate action runs only once, preventing repeated triggers when node data changes.
Usage:
https://your-dify.com/app/{appId}/workflow?node_id=1721234567890
Opening this URL automatically selects and scrolls to the target node in the editor.
Known limitations
- Both methods can only search/locate nodes that are currently rendered on the canvas. The canvas displays only one set of node data at a time (the latest draft or a specific historical run).
- If the failing node has been deleted from the latest draft, the operator must first enter "Run History," switch to the run that contains the node, and then search.
- Searching for a
node_id across all historical runs requires a backend API and is out of scope for this change.
2. Additional context or comments
No response
3. Can you help us with this feature?
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
Background
In real-world operations, when a workflow run fails, operators typically identify the failing node's
node_idfrom server logs (e.g., a code node execution error). They then need to return to the workflow editor and find the corresponding node on the canvas for troubleshooting and fixes.The current workflow editor has the following limitations:
Cmd+Ksearch only matches by node title/type/description — it does not support searching bynode_id. Operators usually have thenode_idfrom logs, not the node title, so they cannot search and locate the node directly.Requirements
Provide two ways for operators to quickly locate a workflow node by
node_id:Cmd+Ksearch supportsnode_idmatching — in the goto-anything search@nodemode, includenode_idin the search scope and display it in the search results.?node_id=xxxfor direct navigation — when opening a URL with thenode_idquery parameter, the editor automatically selects and scrolls to that node.Solution
1. Cmd+K search supports node_id
Modified file:
web/app/components/workflow/hooks/use-workflow-search.tsxChanges:
nodeIdfield to thesearchableNodesmapping, exposingnode.idto the search logic.node_idmatching rules to thecalculateScorescoring function with the highest weight (exact match: 120 points > title exact prefix: 100 points), ensuring that when searching bynode_id, the target node ranks first.node_idto the search resultdescription, separated by·(e.g.,Node description · 1721234567890), so users can confirm the matched node.Scoring rules:
nodeId === searchTermnodeId.startsWith(searchTerm)nodeId.includes(searchTerm)Usage:
2. URL parameter
?node_id=xxxfor direct navigationNew file:
web/app/components/workflow/hooks/use-locate-node.tsModified files:
web/app/components/workflow/index.tsx— calluseLocateNode(nodes)in theWorkflowcomponentweb/i18n/en-US/workflow.json— addedpanel.locateNodeNotFoundandpanel.locateNodeSuccessweb/i18n/zh-Hans/workflow.json— added corresponding Chinese translationsChanges:
useLocateNodehook that reads thenode_idquery parameter from the URL.node_id:node_id.useRefto ensure the locate action runs only once, preventing repeated triggers when node data changes.Usage:
Opening this URL automatically selects and scrolls to the target node in the editor.
Known limitations
node_idacross all historical runs requires a backend API and is out of scope for this change.2. Additional context or comments
No response
3. Can you help us with this feature?