[PR #24082] fix: simplify trigger-schedule hourly mode calculation and improve UI consistency #30494

Closed
opened 2026-02-21 20:47:36 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24082

State: closed
Merged: Yes


Summary

This PR fixes the trigger-schedule component's hourly mode calculation logic and improves UI consistency:

Core Fix:

  • Simplify hourly mode calculation to use DatePicker as single data source
  • Remove complex fallback logic that caused Next 5 display not updating when DatePicker changes
  • Ensure pure mathematical calculation: baseTime + (i × interval)

UI/UX Improvements:

  • Replace custom pickers with base components for better consistency
  • Fix dark mode compatibility with subtle divider colors
  • Improve selector styling with consistent borders and design system colors
  • Add notClearable prop to prevent accidental clearing

Test Coverage:

  • Update all hourly frequency tests to match simplified logic
  • Add comprehensive test coverage for edge cases
  • All 62 tests passing including 18 hourly-specific tests

Fixes

  • DatePicker changes now properly update Next 5 execution times in hourly mode
  • Consistent data flow between once mode and hourly mode
  • No more fallback to current time - DatePicker is the only data source

Checklist

  • I understand that this PR may be closed in case there was no previous discussion or issues
  • I've added tests for each change and made atomic commits
  • I've updated the code to follow project conventions
  • I ran linting and formatting tools
**Original Pull Request:** https://github.com/langgenius/dify/pull/24082 **State:** closed **Merged:** Yes --- ## Summary This PR fixes the trigger-schedule component's hourly mode calculation logic and improves UI consistency: **Core Fix:** - Simplify hourly mode calculation to use DatePicker as single data source - Remove complex fallback logic that caused Next 5 display not updating when DatePicker changes - Ensure pure mathematical calculation: baseTime + (i × interval) **UI/UX Improvements:** - Replace custom pickers with base components for better consistency - Fix dark mode compatibility with subtle divider colors - Improve selector styling with consistent borders and design system colors - Add notClearable prop to prevent accidental clearing **Test Coverage:** - Update all hourly frequency tests to match simplified logic - Add comprehensive test coverage for edge cases - All 62 tests passing including 18 hourly-specific tests ## Fixes - DatePicker changes now properly update Next 5 execution times in hourly mode - Consistent data flow between once mode and hourly mode - No more fallback to current time - DatePicker is the only data source ## Checklist - [x] I understand that this PR may be closed in case there was no previous discussion or issues - [x] I've added tests for each change and made atomic commits - [x] I've updated the code to follow project conventions - [x] I ran linting and formatting tools
yindo added the pull-request label 2026-02-21 20:47:36 -05:00
yindo closed this issue 2026-02-21 20:47:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30494