Skip to content

Simplify and standardize how data types are presented in user-facing strings - #4147

Merged
Keavon merged 2 commits into
masterfrom
user-facing-type-formatting
May 14, 2026
Merged

Keavon merged 2 commits into
masterfrom
user-facing-type-formatting

Conversation

@Keavon

@Keavon Keavon commented May 14, 2026

Copy link
Copy Markdown
Member

Some places that listed List now show Vector[], for example. "called with Context" is removed from node input type signatures. Places that used to write DVec2 now write Vec2 consistently, amongst other cases.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request refactors the display of data types in tooltips by removing the 'Data Type:' prefix and centralizing type formatting in the backend. Key changes include the introduction of a more robust make_type_user_readable function that handles type aliases and converts List<T> to T[] syntax, alongside optimizations in the network interface utility. Feedback was provided regarding a potential bug in the UTF-8 handling of the new string manipulation logic, where byte-level iteration could corrupt multi-byte characters.

Comment thread node-graph/libraries/core-types/src/types.rs Outdated

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

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.

1 issue found across 4 files

Confidence score: 4/5

  • This PR looks safe to merge with minimal risk: the only reported issue is moderate (4/10) and localized rather than broadly destabilizing.
  • In node-graph/libraries/core-types/src/types.rs, building char values byte-by-byte can corrupt non-ASCII type names, which may cause incorrect type text handling for international/unicode identifiers.
  • Pay close attention to node-graph/libraries/core-types/src/types.rs - switch unmatched-text copying to UTF-8 character iteration to avoid Unicode corruption.
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/libraries/core-types/src/types.rs">

<violation number="1" location="node-graph/libraries/core-types/src/types.rs:383">
P2: Byte-wise `char` construction corrupts non-ASCII type names. Iterate by UTF-8 chars when copying unmatched text.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread node-graph/libraries/core-types/src/types.rs Outdated
@Keavon
Keavon force-pushed the user-facing-type-formatting branch from d4b2856 to 3d30959 Compare May 14, 2026 06:07
@Keavon
Keavon merged commit 1c9c19a into master May 14, 2026
10 checks passed
@Keavon
Keavon deleted the user-facing-type-formatting branch May 14, 2026 07:56
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