feat(agentflow): update behaviour for Start node, Http Node, and validation fixes (FLOWISE-265, FLOWISE-264)#6027
Conversation
…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]>
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
|
/gemini review |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 ( |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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>[]) : [] |
| // 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)) { |
There was a problem hiding this comment.
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.
chloebyun-wd
left a comment
There was a problem hiding this comment.
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 👍
jchui-wd
left a comment
There was a problem hiding this comment.
Tested locally:
Start node dropdown descriptions, HTTP node credential field, and Execute Flow JSON input all working as expected.

Summary
computeArrayItemParameterscrash when a non-array field changes while array params existvalidateNodeto resolve input params fromavailableNodeswhennode.data.inputsis missingvalidateNodeto respectparam.defaultvalues in required field checksoption.descriptionrendering in options dropdown to match legacy UITest plan
pnpm test)pnpm lint)🤖 Generated with Claude Code
Recordings:
agentflow-sdk-start-node.mov
sgentflow-sdk-http-node.mov