-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(editor): Hide fromAI button in old workflow tool #13552
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
@@ -44,7 +45,8 @@ function sanitizeFromAiParameterName(s: string) { | |||
return s; | |||
} | |||
|
|||
const NODE_DENYLIST = ['toolCode', 'toolHttpRequest']; | |||
// nodeName | [nodeName, highestUnsupportedVersion] | |||
const NODE_DENYLIST = ['toolCode', 'toolHttpRequest', ['toolWorkflow', 1.2]] as const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really would have loved to see this at the node description level instead of the UI. Sorry if I am repeating a conversation we already have.
What's blocking us from refactoring this to be more generic like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's significant upside here, it's not like we're gonna keep growing this list in the future. This solution works and doesn't introduce more permanent configuration flags on our node descriptions.
For handling the workflow tool for example we'd need realistically want to support the I guess the versioned node saves us here. Begs the question if this applies in general though@version
displayOptions syntax for a "proper" implementation.
Otherwise we'd end up with maxVersionWithFromAIUnsupported
or similar?
In contrast we might well end up with a flag on node properties if we happen upon use cases where expressions make sense but fromAI is disallowed for whatever reason, since in that case we can expect that we'll keep adding more in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we are already adding more nodes and might continue.
Like you suggested, we could solve this in a generic way. Maybe similar to display options.
hideFromAIButton: { lte: 1.5 }
might work.
This could be a lightweight implementation, it does not need to support all possible variations of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a very finite amount of tools that don't support fromAI, and we don't intend to produce more. This seems like a lot of effort for little practical upside 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel it would be cleaner and more generic and better in touch with how n8n is supposed to be. So I guess it's more code hygiene for me here.
It's your call though.
|
n8n
|
Project |
n8n
|
Branch Review |
ADO-3282
|
Run status |
|
Run duration | 05m 52s |
Commit |
|
Committer | Charlie Kolb |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
3
|
|
0
|
|
4
|
|
0
|
|
437
|
View all changes introduced in this branch ↗︎ |
Summary
We show the button here even though it won't work.
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/ADO-3282/bug-fromai-button-displays-on-old-workflow-tool
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)