[BrushGraph 1/7]: Add core data models and validation#60
Open
maxmmitchell wants to merge 2 commits intoadd-brush-designer-uifrom
Open
[BrushGraph 1/7]: Add core data models and validation#60maxmmitchell wants to merge 2 commits intoadd-brush-designer-uifrom
maxmmitchell wants to merge 2 commits intoadd-brush-designer-uifrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive data model and validation system for a brush behavior graph, including UI display utilities and a guided tutorial framework. Feedback focuses on improving the robustness of the graph validation logic, specifically addressing potential index out-of-bounds errors, fixing nested list structures in error messages, and ensuring locale-independent string formatting for technical values. Additionally, a more reliable deduplication method for validation exceptions was suggested.
romanofranz
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is the first PR in a stacked series to introduce the Brush Graph feature. This PR adds the foundational data structures and validation logic.
Details
BrushGraph: An immutable snapshot of the entire graph state (nodes and edges).GraphNode: Represents a node on the canvas. It wraps aNodeDatapayload and holds UI state (expanded, error, disabled).NodeData(Sealed Interface): The core domain model wrapping various Proto types (Tip,Paint,Behavior,Coat,Family).Port(Sealed Class): Defines input, output, and dynamic "Add" ports for nodes.update
strings.xml(needed so all PRs' code can compile, many references to string resources throughout)preserveEdgesOnTypeChange: A mapping algorithm that preserves incoming user connections when a node's operation type is changed (e.g., changing a BinaryOp from ADD to MULTIPLY).GraphValidatorencodes semantic rules about node connections and many generalBrushFamilyvalidation rules at the graph level, so errors can be propagated to the user and link to erroneous nodes in graph space.