From 195ff4711d08471f70e2162c49a76c57776c7d10 Mon Sep 17 00:00:00 2001
From: yyh <92089059+lyzno1@users.noreply.github.com>
Date: Thu, 30 Apr 2026 13:33:37 +0800
Subject: [PATCH 1/2] refactor(web): migrate subscription create modal to
dialog (#35721)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
---
eslint-suppressions.json | 5 -
.../create/__tests__/common-modal.spec.tsx | 32 +----
.../subscription-list/create/common-modal.tsx | 130 +++++++++++++-----
3 files changed, 93 insertions(+), 74 deletions(-)
diff --git a/eslint-suppressions.json b/eslint-suppressions.json
index ced0d27afe..183560f81b 100644
--- a/eslint-suppressions.json
+++ b/eslint-suppressions.json
@@ -3167,11 +3167,6 @@
"count": 2
}
},
- "web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.ts": {
"erasable-syntax-only/enums": {
"count": 1
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsx
index 459b657f3f..af52ec14f0 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsx
@@ -1,6 +1,6 @@
+import type * as React from 'react'
import type { TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'
import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'
-import * as React from 'react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { SupportedCreationMethods } from '@/app/components/plugins/types'
import { TriggerCredentialTypeEnum } from '@/app/components/workflow/block-selector/types'
@@ -134,36 +134,6 @@ vi.mock('@langgenius/dify-ui/toast', () => ({
}),
}))
-vi.mock('@/app/components/base/modal/modal', () => ({
- default: ({
- children,
- onClose,
- onConfirm,
- title,
- confirmButtonText,
- bottomSlot,
- size,
- disabled,
- }: {
- children: React.ReactNode
- onClose: () => void
- onConfirm: () => void
- title: string
- confirmButtonText: string
- bottomSlot?: React.ReactNode
- size?: string
- disabled?: boolean
- }) => (
-
-
{title}
-
{children}
-
{bottomSlot}
-
-
-
- ),
-}))
-
type MockFormValuesConfig = {
values: Record
isCheckValidated: boolean
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx
index 15d3417c9b..502cf73d54 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx
@@ -1,8 +1,15 @@
'use client'
import type { TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'
+import { Button } from '@langgenius/dify-ui/button'
+import { cn } from '@langgenius/dify-ui/cn'
+import {
+ Dialog,
+ DialogCloseButton,
+ DialogContent,
+ DialogTitle,
+} from '@langgenius/dify-ui/dialog'
import { useTranslation } from 'react-i18next'
import { EncryptedBottom } from '@/app/components/base/encrypted-bottom'
-import Modal from '@/app/components/base/modal/modal'
import { SupportedCreationMethods } from '@/app/components/plugins/types'
import {
ConfigurationStepContent,
@@ -48,46 +55,93 @@ export const CommonCreateModal = ({ onClose, createType, builder }: Props) => {
const isApiKeyType = createType === SupportedCreationMethods.APIKEY
const isVerifyStep = currentStep === ApiKeyStep.Verify
const isConfigurationStep = currentStep === ApiKeyStep.Configuration
+ const isDisabled = isVerifyingCredentials || isBuilding
+ const modalSize = createType === SupportedCreationMethods.MANUAL ? 'md' : 'sm'
return (
- : null}
- size={createType === SupportedCreationMethods.MANUAL ? 'md' : 'sm'}
- containerClassName="min-h-[360px]"
- clickOutsideNotClose
- >
- {isApiKeyType && }
+
)
}
From f01e0997294ae5457544af58fd217b7d6bab903e Mon Sep 17 00:00:00 2001
From: eldoradoel <55902524+eldoradoel@users.noreply.github.com>
Date: Thu, 30 Apr 2026 13:42:35 +0800
Subject: [PATCH 2/2] fix: ToolEntity data validation failed during workflow
synchronization (#35696)
Co-authored-by: DESKTOP-ETT0IAR\MINIO
---
.../delete_tool_parameters_cache_when_sync_draft_workflow.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/api/events/event_handlers/delete_tool_parameters_cache_when_sync_draft_workflow.py b/api/events/event_handlers/delete_tool_parameters_cache_when_sync_draft_workflow.py
index ba9758175f..f1196445ed 100644
--- a/api/events/event_handlers/delete_tool_parameters_cache_when_sync_draft_workflow.py
+++ b/api/events/event_handlers/delete_tool_parameters_cache_when_sync_draft_workflow.py
@@ -3,6 +3,7 @@ import logging
from core.tools.entities.tool_entities import ToolProviderType
from core.tools.tool_manager import ToolManager
from core.tools.utils.configuration import ToolParameterConfigurationManager
+from core.workflow.human_input_adapter import adapt_node_config_for_graph
from events.app_event import app_draft_workflow_was_synced
from graphon.nodes import BuiltinNodeTypes
from graphon.nodes.tool.entities import ToolEntity
@@ -19,7 +20,8 @@ def handle(sender, **kwargs):
for node_data in synced_draft_workflow.graph_dict.get("nodes", []):
if node_data.get("data", {}).get("type") == BuiltinNodeTypes.TOOL:
try:
- tool_entity = ToolEntity.model_validate(node_data["data"])
+ adapted_node_data = adapt_node_config_for_graph(node_data)
+ tool_entity = ToolEntity.model_validate(adapted_node_data["data"])
provider_type = ToolProviderType(tool_entity.provider_type.value)
tool_runtime = ToolManager.get_tool_runtime(
provider_type=provider_type,