[PR #25283] feat: implement trigger plugin frontend integration #30994

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

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

State: closed
Merged: Yes


This PR implements the frontend integration for trigger plugins, providing a complete user interface for configuring and managing trigger-based workflows.

Fixes #24196

What's Implemented

Core Features Completed:

  • API Service Layer: Complete REST API integration with comprehensive hooks for trigger providers, subscriptions, and OAuth management
  • Authentication System: Factory-pattern authentication with dropdown menu supporting OAuth flow
  • Dynamic Forms: Two-tier parameter handling (subscription-level + trigger-specific) with automatic form generation
  • Output Variables: Rich display of webhook data structures with nested object support
  • Type System: Full TypeScript integration compatible with existing tool infrastructure

Key Functionalities:

  • Trigger provider discovery and selection
  • Real-time authentication status tracking
  • Dynamic parameter forms based on trigger schemas
  • OAuth client configuration and authorization flow
  • Subscription lifecycle management (create → verify → build)
  • Output variable mapping for workflow integration

What's Still Missing

Pending Implementation:

  • OAuth Client Configuration UI: Modal for setting up GitHub OAuth App credentials (client_id/client_secret)
  • Subscription Builder Workflow: Complete builder management interface with verification and build steps
  • Error Handling Enhancement: Better user feedback for API failures and validation errors
  • Dynamic Options Integration: Full support for repository/event dynamic selections

Technical Architecture

The implementation follows Dify's existing patterns:

  • Factory Pattern: Authentication handling via node-auth-factory.tsx
  • Hook-based State: React Query for data fetching and caching
  • Type Compatibility: Seamless integration with existing ToolDefaultValue interfaces
  • Component Reuse: Leverages existing form components and output variable displays

Current Status

The PR establishes the foundation for trigger plugin frontend functionality. Users can now add trigger plugins to workflows and see dynamic parameter forms, but OAuth configuration still requires backend-only setup until the configuration UI is completed.

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/25283 **State:** closed **Merged:** Yes --- This PR implements the frontend integration for trigger plugins, providing a complete user interface for configuring and managing trigger-based workflows. **Fixes #24196** ## What's Implemented **✅ Core Features Completed:** - **API Service Layer**: Complete REST API integration with comprehensive hooks for trigger providers, subscriptions, and OAuth management - **Authentication System**: Factory-pattern authentication with dropdown menu supporting OAuth flow - **Dynamic Forms**: Two-tier parameter handling (subscription-level + trigger-specific) with automatic form generation - **Output Variables**: Rich display of webhook data structures with nested object support - **Type System**: Full TypeScript integration compatible with existing tool infrastructure **✅ Key Functionalities:** - Trigger provider discovery and selection - Real-time authentication status tracking - Dynamic parameter forms based on trigger schemas - OAuth client configuration and authorization flow - Subscription lifecycle management (create → verify → build) - Output variable mapping for workflow integration ## What's Still Missing **❌ Pending Implementation:** - **OAuth Client Configuration UI**: Modal for setting up GitHub OAuth App credentials (client_id/client_secret) - **Subscription Builder Workflow**: Complete builder management interface with verification and build steps - **Error Handling Enhancement**: Better user feedback for API failures and validation errors - **Dynamic Options Integration**: Full support for repository/event dynamic selections ## Technical Architecture The implementation follows Dify's existing patterns: - **Factory Pattern**: Authentication handling via `node-auth-factory.tsx` - **Hook-based State**: React Query for data fetching and caching - **Type Compatibility**: Seamless integration with existing `ToolDefaultValue` interfaces - **Component Reuse**: Leverages existing form components and output variable displays ## Current Status The PR establishes the foundation for trigger plugin frontend functionality. Users can now add trigger plugins to workflows and see dynamic parameter forms, but OAuth configuration still requires backend-only setup until the configuration UI is completed. ## 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. - [ ] 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:37 -05:00
yindo closed this issue 2026-02-21 20:48:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30994