Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b59950f
feat: enhance workflow component with viewport visibility management …
ZeroZ-lab Oct 29, 2025
3535a4c
feat: implement node dragging enhancements with visual feedback and p…
ZeroZ-lab Oct 29, 2025
9e6e96f
feat: enhance node dragging functionality to support multiple nodes a…
ZeroZ-lab Oct 29, 2025
f81f148
feat: enhance node drag handling to set help line visibility when dra…
ZeroZ-lab Oct 29, 2025
3eba2ea
feat: filter out hidden nodes in helpline calculations for improved v…
ZeroZ-lab Oct 29, 2025
0c256a9
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 29, 2025
f340032
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 29, 2025
adb58ed
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 29, 2025
bc3d649
feat: enhance node dragging interactions and add tools fetching funct…
ZeroZ-lab Oct 29, 2025
d6fc58f
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 29, 2025
ee31bc3
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 29, 2025
60b8e0d
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 29, 2025
ee7d52a
fix: update node drag handlers to include nodes parameter
ZeroZ-lab Oct 29, 2025
947e665
refactor: simplify node IDs collection for movement logic
ZeroZ-lab Oct 29, 2025
ae10ffc
refactor: enhance helpline and node interactions with visible node ID…
ZeroZ-lab Oct 29, 2025
03dbf85
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 30, 2025
4ab944a
Merge branch 'fix-workflow-performance' of https://github.com/ZeroZ-l…
ZeroZ-lab Oct 30, 2025
4361538
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 30, 2025
c16861c
fix(workflow): streamline node interaction logic by removing redundan…
ZeroZ-lab Oct 30, 2025
746ad0c
Merge branch 'fix-workflow-performance' of https://github.com/ZeroZ-l…
ZeroZ-lab Oct 30, 2025
e3098ca
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Oct 31, 2025
f568130
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 3, 2025
54b9540
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 11, 2025
40d559c
Merge remote-tracking branch 'origin/main' into fix-workflow-performance
ZeroZ-lab Nov 13, 2025
cf641dd
Merge upstream/main
ZeroZ-lab Nov 13, 2025
2ed51e2
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 13, 2025
b6c7ca0
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 13, 2025
e0ad7e2
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 17, 2025
d786033
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 18, 2025
7772944
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 25, 2025
c7cae88
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 26, 2025
5f253f7
Merge branch 'main' into fix-workflow-performance
ZeroZ-lab Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions web/app/components/workflow/hooks/use-helpline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import type { Node } from '../types'
import { BlockEnum, isTriggerNode } from '../types'
import { useWorkflowStore } from '../store'

type HelplineOptions = {
nodes?: Node[];
visibleNodeIds?: Set<string>;
}

// Entry node (Start/Trigger) wrapper offsets
// The EntryNodeContainer adds a wrapper with status indicator above the actual node
// These offsets ensure alignment happens on the inner node, not the wrapper
Expand All @@ -29,28 +34,22 @@ export const useHelpline = () => {
y: node.position.y + ENTRY_NODE_WRAPPER_OFFSET.y,
}
}

return {
x: node.position.x,
y: node.position.y,
}
}, [isEntryNode])

const handleSetHelpline = useCallback((node: Node) => {
const { getNodes } = store.getState()
const nodes = getNodes()
const handleSetHelpline = useCallback((node: Node, options?: HelplineOptions) => {
const nodes = options?.nodes ?? store.getState().getNodes()
const visibleNodeIds = options?.visibleNodeIds
const {
setHelpLineHorizontal,
setHelpLineVertical,
} = workflowStore.getState()

if (node.data.isInIteration) {
return {
showHorizontalHelpLineNodes: [],
showVerticalHelpLineNodes: [],
}
}

if (node.data.isInLoop) {
if (node.data.isInIteration || node.data.isInLoop) {
return {
showHorizontalHelpLineNodes: [],
showVerticalHelpLineNodes: [],
Expand All @@ -61,6 +60,10 @@ export const useHelpline = () => {
const nodeAlignPos = getNodeAlignPosition(node)

const showHorizontalHelpLineNodes = nodes.filter((n) => {
if (visibleNodeIds && !visibleNodeIds.has(n.id))
return false
if (n.hidden)
return false
if (n.id === node.id)
return false

Expand Down Expand Up @@ -124,6 +127,10 @@ export const useHelpline = () => {
}

const showVerticalHelpLineNodes = nodes.filter((n) => {
if (visibleNodeIds && !visibleNodeIds.has(n.id))
return false
if (n.hidden)
return false
if (n.id === node.id)
return false
if (n.data.isInIteration)
Expand Down Expand Up @@ -188,7 +195,7 @@ export const useHelpline = () => {
showHorizontalHelpLineNodes,
showVerticalHelpLineNodes,
}
}, [store, workflowStore, getNodeAlignPosition])
}, [store, workflowStore, getNodeAlignPosition, isEntryNode])

return {
handleSetHelpline,
Expand Down
Loading
Loading