From b305e8b65d210f359d0a07a2cbafb8c537e9c55f Mon Sep 17 00:00:00 2001 From: zhangx1n Date: Mon, 4 May 2026 11:48:46 +0800 Subject: [PATCH] fix(deployments): clean up runtime binding display Show runtime bindings as a single summary to avoid duplicated overlapping text in deployment details.\n\nEnable build-push workflow runs for the 4-27-app-deploy branch so app deploy images can be built from this branch. --- .github/workflows/build-push.yml | 1 + .../detail/deploy-tab/deployment-panel.tsx | 45 +++++++++++-------- web/features/deployments/utils.ts | 3 ++ 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 915ed6cfe8..bec2a1a1b6 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -9,6 +9,7 @@ on: - "release/e-*" - "hotfix/**" - "feat/hitl-backend" + - "4-27-app-deploy" tags: - "*" diff --git a/web/features/deployments/detail/deploy-tab/deployment-panel.tsx b/web/features/deployments/detail/deploy-tab/deployment-panel.tsx index 26e62f779d..730c573ea3 100644 --- a/web/features/deployments/detail/deploy-tab/deployment-panel.tsx +++ b/web/features/deployments/detail/deploy-tab/deployment-panel.tsx @@ -1,7 +1,7 @@ 'use client' import type { FC, ReactNode } from 'react' -import type { EnvironmentDeploymentRow } from '@/features/deployments/types' +import type { EnvironmentDeploymentRow, RuntimeBindingDisplay } from '@/features/deployments/types' import { cn } from '@langgenius/dify-ui/cn' import { useTranslation } from 'react-i18next' import { @@ -15,8 +15,7 @@ import { isRuntimePluginBinding, releaseCommit, releaseLabel, - runtimeBindingLabel, - runtimeBindingValue, + runtimeBindingSummary, } from '../../utils' type InfoBlockProps = { @@ -39,15 +38,31 @@ type InfoRowProps = { } const InfoRow: FC = ({ label, value, mono, suffix }) => ( -
+
{label} - + {value} {suffix && {suffix}}
) +type RuntimeBindingItemProps = { + binding: RuntimeBindingDisplay +} + +const RuntimeBindingItem: FC = ({ binding }) => { + const summary = runtimeBindingSummary(binding) + + return ( +
+ + {summary} + +
+ ) +} + type DeploymentPanelProps = { row: EnvironmentDeploymentRow } @@ -86,29 +101,23 @@ export const DeploymentPanel: FC = ({ row }) => { {(modelCredentials.length > 0 || pluginCredentials.length > 0 || envVars.length > 0) && (
-
+
{modelCredentials.map(c => ( - ))} {pluginCredentials.map(c => ( - ))} {envVars.map(v => ( - ))}
diff --git a/web/features/deployments/utils.ts b/web/features/deployments/utils.ts index 8eb017bfb7..273766a9b9 100644 --- a/web/features/deployments/utils.ts +++ b/web/features/deployments/utils.ts @@ -53,6 +53,9 @@ export const runtimeBindingLabel = (binding?: RuntimeBindingDisplay) => export const runtimeBindingValue = (binding?: RuntimeBindingDisplay) => binding?.displayValue || binding?.maskedValue || binding?.displayName || '—' +export const runtimeBindingSummary = (binding?: RuntimeBindingDisplay) => + binding?.label || binding?.slot || binding?.displayName || binding?.displayValue || binding?.maskedValue || binding?.kind || '—' + export const isRuntimeEnvVarBinding = (binding?: RuntimeBindingDisplay) => (binding?.kind?.toLowerCase() ?? '').includes('env')