From e38c19f8d874acfa792d42bc0d06bcf2ac905c5e Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sun, 28 Jun 2026 17:53:56 +0800 Subject: [PATCH] feat: add description handling to VariableSelector and OptionCombobox for improved option clarity --- .../_components/node-config-panel.tsx | 3 --- .../_components/variable-selector.tsx | 1 + web/components/option-combobox.tsx | 16 ++++++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx b/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx index c18b013..c7ef493 100644 --- a/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx +++ b/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx @@ -160,9 +160,6 @@ export function NodeConfigPanel({ }) }} /> - {input.description ? ( -
{input.description}
- ) : null} ) })} diff --git a/web/app/dashboard/ai-workflows/_components/variable-selector.tsx b/web/app/dashboard/ai-workflows/_components/variable-selector.tsx index 90639b4..64d3cf2 100644 --- a/web/app/dashboard/ai-workflows/_components/variable-selector.tsx +++ b/web/app/dashboard/ai-workflows/_components/variable-selector.tsx @@ -25,6 +25,7 @@ export function VariableSelector({ const options = variables.map((variable) => ({ value: `${variable.nodeId}.${variable.field}`, label: `${variable.nodeName}.${variable.label || variable.field}`, + description: variable.description, })) return ( diff --git a/web/components/option-combobox.tsx b/web/components/option-combobox.tsx index 84c365b..a8b7631 100644 --- a/web/components/option-combobox.tsx +++ b/web/components/option-combobox.tsx @@ -23,6 +23,7 @@ import { useI18n } from "@/i18n/provider" export type ComboboxOption = { value: string label: string + description?: string } type OptionComboboxProps = { @@ -75,21 +76,28 @@ export function OptionCombobox({ {options.map((option) => ( { onChange(option.value) setOpen(false) }} >
-
+
- {option.label} + + {option.label} + {option.description ? ( + + {option.description} + + ) : null} +
{renderOptionAction ? (