[PR #24104] fix: validate checklist before publishing workflow #30508

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

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

State: closed
Merged: Yes


Summary

This PR adds validation for checklist items before publishing a workflow, ensuring that workflows with unresolved configuration issues cannot be published.

image

Changes

  • Added checklist validation as the first step in the workflow publish process
  • Import necessary hooks (useNodes, useEdges, useChecklist) to check checklist status
  • Display error notification when attempting to publish with unresolved checklist items
  • Prevent workflow publication until all checklist issues are resolved

Problem

Previously, the workflow publish process would perform detailed validation but didn't check the checklist status first. This could lead to confusing situations where workflows with configuration issues might proceed further in the publish process than intended.

Solution

The solution checks for unresolved checklist items at the beginning of the onPublish callback. If any items are found, it:

  1. Shows an error notification with the existing translation key workflow.panel.checklistTip
  2. Throws an error to prevent the publish process from continuing
  3. Only proceeds to detailed validation if the checklist is clear

Fixes #24103

**Original Pull Request:** https://github.com/langgenius/dify/pull/24104 **State:** closed **Merged:** Yes --- ## Summary This PR adds validation for checklist items before publishing a workflow, ensuring that workflows with unresolved configuration issues cannot be published. <img width="460" height="270" alt="image" src="https://github.com/user-attachments/assets/5d0c4010-0ca0-4f7d-a2e8-219676141a05" /> ## Changes - Added checklist validation as the first step in the workflow publish process - Import necessary hooks (`useNodes`, `useEdges`, `useChecklist`) to check checklist status - Display error notification when attempting to publish with unresolved checklist items - Prevent workflow publication until all checklist issues are resolved ## Problem Previously, the workflow publish process would perform detailed validation but didn't check the checklist status first. This could lead to confusing situations where workflows with configuration issues might proceed further in the publish process than intended. ## Solution The solution checks for unresolved checklist items at the beginning of the `onPublish` callback. If any items are found, it: 1. Shows an error notification with the existing translation key `workflow.panel.checklistTip` 2. Throws an error to prevent the publish process from continuing 3. Only proceeds to detailed validation if the checklist is clear Fixes #24103
yindo added the pull-request label 2026-02-21 20:47:38 -05:00
yindo closed this issue 2026-02-21 20:47:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30508