Skip to content

feat(agentflow): add client filtering for form input options in Start node#6212

Merged
jocelynlin-wd merged 1 commit intomainfrom
feat/start-node-limit-form-input-client
Apr 14, 2026
Merged

feat(agentflow): add client filtering for form input options in Start node#6212
jocelynlin-wd merged 1 commit intomainfrom
feat/start-node-limit-form-input-client

Conversation

@jocelynlin-wd
Copy link
Copy Markdown
Contributor

  • Enhanced Start node to include a client property for the form input option, allowing differentiation between 'agentflowv2' and 'agentflowsdk'.
  • Added tests to verify that the 'formInput' option is correctly filtered based on the client type.

FLOWISE-510

start-node-limit-form-input-client.mov

… node

- Enhanced Start node to include a client property for the form input option, allowing differentiation between 'agentflowv2' and 'agentflowsdk'.
- Added tests to verify that the 'formInput' option is correctly filtered based on the client type.
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 restricts the 'Form Input' option in the Start node to the 'agentflowv2' client and introduces unit tests to verify the filtering logic for different clients. Feedback suggests improving the test assertions by using toMatchObject and checking the exact length of the options array to ensure consistency with existing tests and avoid unnecessary type casting.

name: 'formInput',
description: 'Start the workflow with form inputs'
description: 'Start the workflow with form inputs',
client: ['agentflowv2']
Copy link
Copy Markdown
Contributor Author

@jocelynlin-wd jocelynlin-wd Apr 14, 2026

Choose a reason for hiding this comment

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

didn't bump the version since there is no change to the runtime schema

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what does client means? I wonder instead of making the changes here in OSS, should we create a new node in extension that extends the original Start class, but override the params to exclude formInput.

my main concern is that if we make changes here, this cllient value will get stored in every saved flow moving forward for every users, making it hard in future if we want to get rid/make further changes

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.

(shared the tech doc offline)

The client field was introduced in PR #6107 as a general-purpose mechanism for scoping node params/options per client (agentflowv2 vs agentflowsdk). It lives on the param definition (schema), not on saved flow data — filterNodeByClient() on the server strips it before sending the API response, so it never gets stored in flows.

The extension approach would work too, but it means maintaining a parallel Start node that needs to stay in sync with the OSS one. Since the client filtering infrastructure is already in place and doesn't affect saved data, this felt like the lighter-weight path.

Let me know if this makes sense to you or if you still prefer strongly to go with the extension route.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yep agree with that

@jocelynlin-wd jocelynlin-wd merged commit 96fca43 into main Apr 14, 2026
7 checks passed
@jocelynlin-wd jocelynlin-wd deleted the feat/start-node-limit-form-input-client branch April 14, 2026 18:08
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.

2 participants