Skip to content

Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs#4042

Merged
Keavon merged 1 commit intomasterfrom
migrate-text-nodes-module
Apr 24, 2026
Merged

Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs#4042
Keavon merged 1 commit intomasterfrom
migrate-text-nodes-module

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented Apr 24, 2026

Broken out from #4010.

@Keavon Keavon changed the title Move the String category nodes from gcore/src/logic.rs to text/src/lib.rs Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs Apr 24, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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_get returns 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 - align json_get string 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.

Comment thread node-graph/nodes/text/src/lib.rs
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 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.

Comment thread node-graph/nodes/text/src/lib.rs
string: String,
/// The character(s) that separate the substrings. These are not included in the outputs.
#[default("\\n")]
delimeter: String,
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.

medium

The parameter name delimeter is misspelled. It should be delimiter for better maintainability and clarity in the node graph UI.

Suggested change
delimeter: String,
delimiter: String,

Comment thread node-graph/nodes/text/src/lib.rs
Comment thread node-graph/nodes/text/src/lib.rs
@Keavon Keavon merged commit a59fed9 into master Apr 24, 2026
11 checks passed
@Keavon Keavon deleted the migrate-text-nodes-module branch April 24, 2026 01:12
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.

1 participant