Standardize clone depth of drawable configurations - #993
Open
Cyclone1337 wants to merge 19 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Image validation accepts empty data that cannot produce a valid non-web image.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Standardizes drawable configuration cloning so mutable nested state is independent while intentional GameObject sharing remains intact.
Changes:
- Deep-clones drawable configurations, collections, and mutable nested data.
- Adds lightweight surface-only cloning and image-data validation.
- Adds regression tests and clone-semantics documentation.
File summaries
| File | Description |
|---|---|
Assets/SEETests/Net/Actions/Drawable/AddImageNetActionTests.cs.meta |
Registers the test asset. |
Assets/SEETests/Net/Actions/Drawable/AddImageNetActionTests.cs |
Tests image validation. |
Assets/SEETests/Net/Actions/Drawable.meta |
Registers the test folder. |
Assets/SEETests/Net/Actions.meta |
Registers the test folder. |
Assets/SEETests/Net.meta |
Registers the test folder. |
Assets/SEETests/Game/Drawable/Configurations/TextConfCloneTests.cs.meta |
Registers the test asset. |
Assets/SEETests/Game/Drawable/Configurations/TextConfCloneTests.cs |
Tests text cloning. |
Assets/SEETests/Game/Drawable/Configurations/MindMapNodeConfCloneTests.cs.meta |
Registers the test asset. |
Assets/SEETests/Game/Drawable/Configurations/MindMapNodeConfCloneTests.cs |
Tests nested and collection cloning. |
Assets/SEETests/Game/Drawable/Configurations/LineConfCloneTests.cs.meta |
Registers the test asset. |
Assets/SEETests/Game/Drawable/Configurations/LineConfCloneTests.cs |
Tests line cloning. |
Assets/SEETests/Game/Drawable/Configurations/LineCapConfCloneTests.cs.meta |
Registers the test asset. |
Assets/SEETests/Game/Drawable/Configurations/LineCapConfCloneTests.cs |
Tests line-cap cloning. |
Assets/SEETests/Game/Drawable/Configurations/ImageConfCloneTests.cs.meta |
Registers the test asset. |
Assets/SEETests/Game/Drawable/Configurations/ImageConfCloneTests.cs |
Tests file-data cloning. |
Assets/SEETests/Game/Drawable/Configurations/DrawableConfigCloneTests.cs.meta |
Registers the test asset. |
Assets/SEETests/Game/Drawable/Configurations/DrawableConfigCloneTests.cs |
Tests aggregate and surface-only clones. |
Assets/SEETests/Game/Drawable/Configurations.meta |
Registers the test folder. |
Assets/SEETests/Game/Drawable.meta |
Registers the test folder. |
Assets/SEETests/Game.meta |
Registers the test folder. |
Assets/SEE/Net/Actions/Drawable/SurfaceNetAction.cs |
Uses surface-only cloning. |
Assets/SEE/Net/Actions/Drawable/AddImageNetAction.cs |
Validates image data before cloning. |
Assets/SEE/Game/Drawable/Configurations/TextConf.cs |
Documents clone depth. |
Assets/SEE/Game/Drawable/Configurations/MindMapNodeConf.cs |
Deep-clones nested configurations and collections. |
Assets/SEE/Game/Drawable/Configurations/LineConf.cs |
Documents line clone semantics. |
Assets/SEE/Game/Drawable/Configurations/LineCapConf.cs |
Documents line-cap clone semantics. |
Assets/SEE/Game/Drawable/Configurations/ImageConf.cs |
Preserves null or copies file data. |
Assets/SEE/Game/Drawable/Configurations/DrawableConfig.cs |
Deep-clones contained configurations. |
Review details
Files not reviewed (13)
- Assets/SEETests/Game.meta: Generated file
- Assets/SEETests/Game/Drawable.meta: Generated file
- Assets/SEETests/Game/Drawable/Configurations.meta: Generated file
- Assets/SEETests/Game/Drawable/Configurations/DrawableConfigCloneTests.cs.meta: Generated file
- Assets/SEETests/Game/Drawable/Configurations/ImageConfCloneTests.cs.meta: Generated file
- Assets/SEETests/Game/Drawable/Configurations/LineCapConfCloneTests.cs.meta: Generated file
- Assets/SEETests/Game/Drawable/Configurations/LineConfCloneTests.cs.meta: Generated file
- Assets/SEETests/Game/Drawable/Configurations/MindMapNodeConfCloneTests.cs.meta: Generated file
- Assets/SEETests/Game/Drawable/Configurations/TextConfCloneTests.cs.meta: Generated file
- Assets/SEETests/Net.meta: Generated file
- Assets/SEETests/Net/Actions.meta: Generated file
- Assets/SEETests/Net/Actions/Drawable.meta: Generated file
- Assets/SEETests/Net/Actions/Drawable/AddImageNetActionTests.cs.meta: Generated file
- Files reviewed: 15/28 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
But we cannot.
koschke
reviewed
Sep 2, 2026
koschke
left a comment
Collaborator
There was a problem hiding this comment.
There were only very minor things, which I fixed myself.
I renamed the new test classes so that they start with the prefix Test for consistency with our other test classes.
I will ask Claude for a second opinion tomorrow.
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.
Closes #987
Summary
This PR reviews and standardizes the clone depth of drawable configurations.
The contained configurations of
DrawableConfigare now cloned independently instead of being retained by reference. Mutable nested state in the individual drawable configurations is cloned where appropriate, while intentional sharing is preserved and documented.Changes
DrawableConfig.MindMapNodeConf, includingBranchLineConf.GameObjectreferences contained inMindMapNodeConf.Children.ImageConf.FileDatavalues while independently copying existing file data.AddImageNetAction.CloneWithoutDrawableTypes()to avoid unnecessary deep cloning in surface network actions.Testing
DrawableConfig.Clone(), andCloneWithoutDrawableTypes().