No description shown in Iteration node #4048

Closed
opened 2026-02-21 18:04:32 -05:00 by yindo · 1 comment
Owner

Originally created by @WeepsDanky on GitHub (Jun 12, 2024).

Originally assigned to: @zxhlyh on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.10

Cloud or Self Hosted

Cloud

Steps to reproduce

image
No description shown in Iteration node.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @WeepsDanky on GitHub (Jun 12, 2024). Originally assigned to: @zxhlyh on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.10 ### Cloud or Self Hosted Cloud ### Steps to reproduce ![image](https://github.com/langgenius/dify/assets/50621638/a556281f-b725-4a7a-ac4c-bde846ac2600) No description shown in Iteration node. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:04:32 -05:00
yindo closed this issue 2026-02-21 18:04:33 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 13, 2024):

Hello @WeepsDanky! I'm here to help you with bug reports, answer your questions, and assist you as you wait for a human maintainer. Let's work together to resolve any issues you may be experiencing.

The issue with the Iteration node not displaying a description might be related to the defaultValue or the checkValid function in the nodeDefault configuration. To resolve this, ensure that the description field is properly set and handled within the Iteration node's configuration. Here is a possible modification to include a description:

const nodeDefault: NodeDefault<IterationNodeType> = {
  defaultValue: {
    start_node_id: '',
    iterator_selector: [],
    output_selector: [],
    description: '', // Add this line to include a description field
  },
  getAvailablePrevNodes(isChatMode: boolean) {
    const nodes = isChatMode
      ? ALL_CHAT_AVAILABLE_BLOCKS
      : ALL_COMPLETION_AVAILABLE_BLOCKS.filter(type => type !== BlockEnum.End)
    return nodes
  },
  getAvailableNextNodes(isChatMode: boolean) {
    const nodes = isChatMode ? ALL_CHAT_AVAILABLE_BLOCKS : ALL_COMPLETION_AVAILABLE_BLOCKS
    return nodes
  },
  checkValid(payload: IterationNodeType, t: any) {
    let errorMessages = ''

    if (!errorMessages && (!payload.iterator_selector || payload.iterator_selector.length === 0))
      errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.iteration.input`) })

    if (!errorMessages && (!payload.output_selector || payload.output_selector.length === 0))
      errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.iteration.output`) })

    return {
      isValid: !errorMessages,
      errorMessage: errorMessages,
    }
  },
}

export default nodeDefault

Ensure that the description is properly set when configuring the Iteration node in your workflow. This should help in displaying the description as expected [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 13, 2024): <!-- Greeting --> Hello @WeepsDanky! I'm here to help you with bug reports, answer your questions, and assist you as you wait for a human maintainer. Let's work together to resolve any issues you may be experiencing. <!-- Answer --> The issue with the Iteration node not displaying a description might be related to the `defaultValue` or the `checkValid` function in the `nodeDefault` configuration. To resolve this, ensure that the description field is properly set and handled within the Iteration node's configuration. Here is a possible modification to include a description: ```ts const nodeDefault: NodeDefault<IterationNodeType> = { defaultValue: { start_node_id: '', iterator_selector: [], output_selector: [], description: '', // Add this line to include a description field }, getAvailablePrevNodes(isChatMode: boolean) { const nodes = isChatMode ? ALL_CHAT_AVAILABLE_BLOCKS : ALL_COMPLETION_AVAILABLE_BLOCKS.filter(type => type !== BlockEnum.End) return nodes }, getAvailableNextNodes(isChatMode: boolean) { const nodes = isChatMode ? ALL_CHAT_AVAILABLE_BLOCKS : ALL_COMPLETION_AVAILABLE_BLOCKS return nodes }, checkValid(payload: IterationNodeType, t: any) { let errorMessages = '' if (!errorMessages && (!payload.iterator_selector || payload.iterator_selector.length === 0)) errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.iteration.input`) }) if (!errorMessages && (!payload.output_selector || payload.output_selector.length === 0)) errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.iteration.output`) }) return { isValid: !errorMessages, errorMessage: errorMessages, } }, } export default nodeDefault ``` Ensure that the description is properly set when configuring the Iteration node in your workflow. This should help in displaying the description as expected <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/iteration/default.ts)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4048