From 148d312cc76f5887ac6eee1fa202daef6f86c051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Thu, 18 Jun 2026 14:40:22 +0200 Subject: [PATCH] Fix typecheck (#21783) Typed `onNodeDragStop` as `@xyflow/react`'s `OnNodeDrag` instead of hand-annotating the event param with the global DOM `MouseEvent | TouchEvent`, which didn't match the prop's expected React `MouseEvent` and broke typecheck. Review in cubic --- .../components/WorkflowDiagramCanvasEditable.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx index 43fccb3b6e..a1c2bbf867 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx @@ -30,6 +30,7 @@ import { ReactFlowProvider, type Connection, type Edge, + type OnNodeDrag, } from '@xyflow/react'; import { useCallback } from 'react'; import { isDefined } from 'twenty-shared/utils'; @@ -133,10 +134,7 @@ export const WorkflowDiagramCanvasEditable = () => { }); }; - const onNodeDragStop = async ( - _: MouseEvent | TouchEvent, - node: WorkflowDiagramNode, - ) => { + const onNodeDragStop: OnNodeDrag = async (_, node) => { const stepToUpdate = workflowWithCurrentVersion?.currentVersion?.steps?.find( (step) => step.id === node.id,