dify/web/app/components/workflow/hooks
yyh a0188bd9b5
fix(workflow)!: add mounted guard to prevent ReactFlow operations after unmount
When switching from graph view to skill view during an active preview run,
SSE callbacks continue executing and attempt to update ReactFlow node/edge
states. This could cause errors since the component is unmounted.

Add optional `isMountedRef` parameter to `useNodesInteractionsWithoutSync`
and `useEdgesInteractionsWithoutSync` hooks. When provided, operations are
skipped if the component has unmounted, preventing potential errors while
allowing the SSE connection to continue running in the background.

BREAKING CHANGE: `useNodesInteractionsWithoutSync` and
`useEdgesInteractionsWithoutSync` now accept an optional `isMountedRef`
parameter. Existing callers are unaffected as the parameter is optional.
2026-01-27 00:43:58 +08:00
..
use-workflow-run-event feat: add mention node executor 2026-01-08 17:36:21 +08:00
index.ts new restore 2026-01-23 14:22:58 +08:00
use-auto-generate-webhook-url.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-available-blocks.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-checklist.ts Merge branch 'feat/collaboration2' into feat/support-agent-sandbox 2026-01-25 00:00:03 +08:00
use-collaborative-workflow.ts fix web style 2026-01-17 22:10:10 +08:00
use-config-vision.ts fix: fix when vision is disabled delete the configs (#30420) 2026-01-01 00:40:21 +08:00
use-DSL.ts feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
use-dynamic-test-run-options.tsx refactor(i18n): use JSON with flattened key and namespace (#30114) 2025-12-29 14:52:32 +08:00
use-edges-interactions-without-sync.ts fix(workflow)!: add mounted guard to prevent ReactFlow operations after unmount 2026-01-27 00:43:58 +08:00
use-edges-interactions.ts Merge branch 'feat/collaboration2' into feat/support-agent-sandbox 2026-01-25 00:00:03 +08:00
use-fetch-workflow-inspect-vars.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-helpline.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-inspect-vars-crud-common.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-inspect-vars-crud.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-leader-restore.ts new restore 2026-01-23 14:22:58 +08:00
use-make-group.ts feat(workflow): enhance group node availability checks 2026-01-06 02:07:13 +08:00
use-node-data-update.ts fix web style 2026-01-18 13:40:12 +08:00
use-node-plugin-installation.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-nodes-available-var-list.ts feat: Merge parent workflow nodes into subgraph variable scope.And some 2026-01-23 06:56:59 +08:00
use-nodes-interactions-without-sync.ts fix(workflow)!: add mounted guard to prevent ReactFlow operations after unmount 2026-01-27 00:43:58 +08:00
use-nodes-interactions.ts Merge branch 'feat/collaboration2' into feat/support-agent-sandbox 2026-01-25 00:00:03 +08:00
use-nodes-layout.ts feat(web): migrate from es-toolkit/compat to native es-toolkit (#30244) (#30246) 2025-12-31 11:13:22 +08:00
use-nodes-meta-data.ts feat(workflow): add group node support and translations 2026-01-05 16:29:00 +08:00
use-nodes-sync-draft.ts remove forceUpload 2026-01-23 14:33:15 +08:00
use-panel-interactions.ts feat: workflow interaction (#4214) 2024-05-09 17:18:51 +08:00
use-selection-interactions.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-serial-async-callback.ts fix: can not save when switch to skill 2026-01-21 13:56:18 +08:00
use-set-workflow-vars-with-value.ts Chore/workflow last run (#21823) 2025-07-02 17:48:07 +08:00
use-shortcuts.ts Merge branch 'feat/collaboration2' into feat/support-agent-sandbox 2026-01-25 00:00:03 +08:00
use-tool-icon.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-workflow-comment.ts fix web style 2026-01-18 13:40:12 +08:00
use-workflow-history.ts refactor(i18n): use JSON with flattened key and namespace (#30114) 2025-12-29 14:52:32 +08:00
use-workflow-interactions.ts refactor(workflow)!: persist the debug state of the chatflow preview panel to the zustand store and split useChat hook into modular files 2026-01-26 23:21:44 +08:00
use-workflow-mode.ts feat: workflow remove preview mode (#3941) 2024-04-28 17:09:56 +08:00
use-workflow-refresh-draft.ts chore: slice workflow refresh draft hook (#19292) 2025-05-06 18:24:10 +08:00
use-workflow-run.ts Chore/slice workflow (#18351) 2025-04-18 13:59:12 +08:00
use-workflow-search.tsx chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-workflow-start-run.tsx feat: introduce trigger functionality (#27644) 2025-11-12 17:59:37 +08:00
use-workflow-variables.ts chore(web): new lint setup (#30020) 2025-12-23 16:58:55 +08:00
use-workflow.ts Merge branch 'feat/collaboration2' into feat/support-agent-sandbox 2026-01-25 00:00:03 +08:00