[PR #25326] feat: implement trigger-plugin support with real-time status sync #31011

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

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

State: closed
Merged: Yes


Summary

This PR implements comprehensive trigger-plugin support and real-time status synchronization between trigger cards and workflow nodes.

Key Features:

  • Real-time Status Sync: Zustand-based state management for instant UI updates across trigger-card and entry node containers
  • Trigger-Plugin Support: Full backend and frontend integration for trigger-plugin nodes with proper icon display
  • Layout Improvements: Fixed responsive design issues with long trigger names and consistent styling
  • Design System Integration: Updated status indicators to use semantic design tokens

Backend Changes:

  • Fixed event handler to properly sync trigger-plugin nodes to database when workflows are published

Frontend Changes:

  • Added Zustand store for trigger status management with reactive subscriptions
  • Refactored trigger-card to use unified BlockIcon component
  • Implemented flexible tool matching logic for trigger-plugin icons
  • Fixed layout issues with proper flexbox and truncation
  • Updated entry node container styling to use semantic design system variables

Testing:

  • 100% test coverage with comprehensive Jest unit and integration tests
  • Tests cover optimistic updates, error handling, and multi-component synchronization

Screenshots

Before After
Trigger-plugin nodes not appearing in trigger card Trigger-plugin nodes properly displayed with icons
Layout breaks with long trigger names Responsive layout with proper truncation
Status changes not synced between components Real-time status sync across all UI components

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/25326 **State:** closed **Merged:** Yes --- ## Summary This PR implements comprehensive trigger-plugin support and real-time status synchronization between trigger cards and workflow nodes. **Key Features:** - **Real-time Status Sync**: Zustand-based state management for instant UI updates across trigger-card and entry node containers - **Trigger-Plugin Support**: Full backend and frontend integration for trigger-plugin nodes with proper icon display - **Layout Improvements**: Fixed responsive design issues with long trigger names and consistent styling - **Design System Integration**: Updated status indicators to use semantic design tokens **Backend Changes:** - Fixed event handler to properly sync trigger-plugin nodes to database when workflows are published **Frontend Changes:** - Added Zustand store for trigger status management with reactive subscriptions - Refactored trigger-card to use unified BlockIcon component - Implemented flexible tool matching logic for trigger-plugin icons - Fixed layout issues with proper flexbox and truncation - Updated entry node container styling to use semantic design system variables **Testing:** - 100% test coverage with comprehensive Jest unit and integration tests - Tests cover optimistic updates, error handling, and multi-component synchronization ## Screenshots | Before | After | |--------|-------| | Trigger-plugin nodes not appearing in trigger card | Trigger-plugin nodes properly displayed with icons | | Layout breaks with long trigger names | Responsive layout with proper truncation | | Status changes not synced between components | Real-time status sync across all UI components | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:48:39 -05:00
yindo closed this issue 2026-02-21 20:48:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31011