Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs#4042
Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs#4042
Conversation
There was a problem hiding this comment.
1 issue found across 13 files
Confidence score: 4/5
- This PR is likely safe to merge, with one moderate inconsistency rather than a clear breakage, so risk appears limited.
- In
node-graph/nodes/text/src/lib.rs,json_getreturns quoted strings for array elements but raw strings for object values, which can cause surprising user-facing output differences depending on JSON container type. - Pay close attention to
node-graph/nodes/text/src/lib.rs- alignjson_getstring handling between arrays and objects to avoid inconsistent text results.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="node-graph/nodes/text/src/lib.rs">
<violation number="1" location="node-graph/nodes/text/src/lib.rs:177">
P2: `json_get` serializes array string elements with quotes, unlike object string values. Return raw string values consistently to avoid surprising output differences based only on container type.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Code Review
This pull request reorganizes the node graph library by relocating string-related and logic nodes. String manipulation nodes have been moved from the core logic module to the text crate, while the switch node was moved to the math crate. Additionally, the quantize nodes were recategorized under "Debug". Review feedback highlights several improvement opportunities in the newly moved text nodes: optimizing string concatenation by removing unnecessary clones, correcting the spelling of "delimiter" for UI consistency, fixing a logic error in the order of escape sequence replacements, and standardizing error handling in the JSON retrieval node.
| string: String, | ||
| /// The character(s) that separate the substrings. These are not included in the outputs. | ||
| #[default("\\n")] | ||
| delimeter: String, |
Broken out from #4010.