From 6943a379c993b6ce5e11977d736edcbf8e414e93 Mon Sep 17 00:00:00 2001 From: lyzno1 Date: Thu, 18 Sep 2025 16:51:19 +0800 Subject: [PATCH] feat: show placeholder '--' for invalid cron expressions in node display - Return '--' placeholder when cron mode has empty or invalid expressions - Prevents displaying fallback dates that confuse users - Maintains consistent UX for invalid schedule configurations --- .../trigger-schedule/utils/execution-time-calculator.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app/components/workflow/nodes/trigger-schedule/utils/execution-time-calculator.ts b/web/app/components/workflow/nodes/trigger-schedule/utils/execution-time-calculator.ts index db050d1837..98aa334aa4 100644 --- a/web/app/components/workflow/nodes/trigger-schedule/utils/execution-time-calculator.ts +++ b/web/app/components/workflow/nodes/trigger-schedule/utils/execution-time-calculator.ts @@ -244,6 +244,12 @@ export const getFormattedExecutionTimes = (data: ScheduleTriggerNodeType, count: } export const getNextExecutionTime = (data: ScheduleTriggerNodeType): string => { + // Return placeholder for cron mode with empty or invalid expression + if (data.mode === 'cron') { + if (!data.cron_expression || data.cron_expression.trim() === '' || !isValidCronExpression(data.cron_expression)) + return '--' + } + const times = getFormattedExecutionTimes(data, 1) if (times.length === 0) { const userCurrentTime = getUserTimezoneCurrentTime(data.timezone)