Frontend type constraints#4334
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a structured FrontendTypeConstraintForInput enum to handle complex type constraints for node inputs, replacing the previous simple string representation. It includes logic to compute, intersect, and validate these constraints, along with comprehensive unit tests and corresponding frontend updates in NodeCatalog.svelte. The review feedback highlights several instances where the unqualified warn! macro should be replaced with log::warn! to prevent compilation errors, identifies a few typos in comments, and suggests using optional chaining in the frontend to safely access nested properties.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
558bba1 to
b5d20e4
Compare
| DOCUMENT_NODE_TYPES.get(identifier) | ||
| } | ||
|
|
||
| impl FrontendTypeConstraintForInput { |
There was a problem hiding this comment.
Maybe just InputTypeConstraint?
There was a problem hiding this comment.
Seems reasonable. Thanks for the review.
b5d20e4 to
5fcaffe
Compare
Closes #4330
Note that this adds some warnings:
I guess maybe these nodes should be updated to use the tables so that they don't produce errors when instantiated. Alternatively the list thing could be removed.