Skip to content

feat(agentflow): update behaviour for Start node, Http Node, and validation fixes (FLOWISE-265, FLOWISE-264)#6027

Merged
jocelynlin-wd merged 4 commits intomainfrom
feat/agentflow-http-node-editor
Mar 20, 2026
Merged

feat(agentflow): update behaviour for Start node, Http Node, and validation fixes (FLOWISE-265, FLOWISE-264)#6027
jocelynlin-wd merged 4 commits intomainfrom
feat/agentflow-http-node-editor

Conversation

@jocelynlin-wd
Copy link
Copy Markdown
Contributor

@jocelynlin-wd jocelynlin-wd commented Mar 20, 2026

Summary

  • Review and updated behaviors for Start and HTTP nodes
  • Fix computeArrayItemParameters crash when a non-array field changes while array params exist
  • Fix validateNode to resolve input params from availableNodes when node.data.inputs is missing
  • Fix validateNode to respect param.default values in required field checks
  • Add option.description rendering in options dropdown to match legacy UI

Test plan

  • tests pass (pnpm test)
  • Lint passes (pnpm lint)
  • All coverage thresholds met
  • Visual validation in examples app (see recordings below)

🤖 Generated with Claude Code

Recordings:

agentflow-sdk-start-node.mov
sgentflow-sdk-http-node.mov

…dation fixes (FLOWISE-265, FLOWISE-264)

- Add HttpBodyInput atom that switches between textarea (json/raw) and
  key-value array editor (formData/xWwwFormUrlencoded)
- Add nested array + $index visibility support for Start node Form Input
- Fix computeArrayItemParameters crash when non-array field changes
- Fix validateNode to use availableNodes schema when node.data.inputs is missing
- Fix validateNode to respect param.default for required field checks
- Add option.description rendering in dropdown to match legacy UI

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience and robustness of the agentflow UI by introducing a flexible HTTP node body editor, improving the dynamic rendering capabilities of array inputs, and addressing several validation issues. These changes streamline the process of configuring complex nodes, prevent common crashes, and provide more informative UI elements, making the platform more intuitive and reliable for users.

Highlights

  • New HttpBodyInput Component: Introduced a new HttpBodyInput component that dynamically renders either a textarea (for JSON/raw body types) or a key-value array editor (for formData/xWwwFormUrlencoded body types) for the HTTP node's body field.
  • Enhanced Array Input Visibility: Improved the ArrayInput component to support nested array rendering and $index-based field visibility, specifically for the Start node's Form Input mode, allowing for more complex and dynamic forms.
  • Validation Fixes: Addressed several validation issues, including fixing a crash in computeArrayItemParameters when a non-array field changed, ensuring validateNode resolves input parameters from availableNodes when node.data.inputs is missing, and making validateNode respect param.default values for required field checks.
  • Improved Options Dropdown: Added functionality to render option.description in options dropdowns, providing more context to users when selecting options.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new HttpBodyInput component for conditional rendering of HTTP node body editors, supporting rich text for JSON/raw types and array inputs for form data. It enhances the NodeInputHandler to display descriptions for select options and updates the InputParam type to include an optional description field. Additionally, the PR improves node validation by considering default values for required fields and prioritizing schemas from availableNodes. Several new test cases were added for ArrayInput to cover nested array visibility, for HttpBodyInput to ensure its functionality, and for EditNodeDialog to verify dynamic itemParameters computation and prevent crashes when non-array fields change. The jest.config.js was updated to include coverage for the new HttpBodyInput component.

@jocelynlin-wd
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several valuable features and fixes. The new HttpBodyInput component provides a flexible UI for the HTTP node's body, and the support for nested arrays with indexed visibility is a great enhancement. The fixes to the validation logic, including using availableNodes for schema information and respecting default values, improve the robustness of the system. The crash fix in computeArrayItemParameters is also a welcome improvement. The code quality is high, and the changes are well-tested. I have no further comments.

sx={{ mt: 1 }}
renderValue={(selected) => {
const match = inputParam.options?.find((o) => (typeof o === 'string' ? o : o.name) === selected)
return match ? (typeof match === 'string' ? match : match.label) : String(selected)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show only label as selected value (exclude descriptions)

const key = isObj ? option.name : option
const label = isObj ? option.label : option
const desc = isObj ? option.description : undefined
return (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display dropdown with label and descriptions (if available), this is the behaviour of Start Node in agentflow v2

const baseParams = nodeSchema?.inputs || node.data.inputs || []

// The credential field is a separate property on the node schema (not in inputs).
// Prepend it to inputParams so the dialog renders it.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is especially the case for Start node. The change below will render credential field in Start node (in addition to Agent/LLM node)

Note that we don't support Create New Credentials yet, this will be done in a separate task.

if (param.type === 'array' && param.array) {
const items = (inputValues[param.name] as Record<string, unknown>[]) || []
const raw = inputValues[param.name]
const items = Array.isArray(raw) ? (raw as Record<string, unknown>[]) : []
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix a bug on HTTP node body type field selection, select JSON or raw will throw an error and broke UI

Image

// evaluateParamVisibility correctly uses those values to resolve show/hide conditions on
// dependent fields, so async-driven visibility is handled automatically here.
if (!param.optional && evaluateParamVisibility(param, inputValues) && isEmptyValue(inputValues[param.name])) {
if (!param.optional && evaluateParamVisibility(param, inputValues) && isEmptyValue(inputValues[param.name] ?? param.default)) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if user does not specifically select a value in dropdown, validation will show an error. This is inconsistent with agentflow v2 which accepts default value as the field value.

Copy link
Copy Markdown

@chloebyun-wd chloebyun-wd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested HTTP node body type switching (json/raw/formData/xWwwFormUrlencoded), credential field visibility, variable support, and validated no false required warnings on fresh nodes. Also verified Start node nested array visibility per row 👍

@jocelynlin-wd jocelynlin-wd changed the title feat(agentflow): add HttpBodyInput, nested array visibility, and validation fixes (FLOWISE-265, FLOWISE-264) feat(agentflow): update behaviour for Start node, Http Node, and validation fixes (FLOWISE-265, FLOWISE-264) Mar 20, 2026
Copy link
Copy Markdown
Contributor

@jchui-wd jchui-wd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally:
Start node dropdown descriptions, HTTP node credential field, and Execute Flow JSON input all working as expected.

@jocelynlin-wd jocelynlin-wd merged commit 1473702 into main Mar 20, 2026
7 checks passed
@jocelynlin-wd jocelynlin-wd deleted the feat/agentflow-http-node-editor branch March 20, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants