Fix settings persistence dirty state#15
Conversation
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b3df22d. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR fixes editor settings/user-state persistence in the DataVisualizer Unity editor tooling by ensuring preference/collapse-state changes correctly compute “dirty” vs no-op updates, persist through the appropriate storage path, and clean up stale namespace collapse entries when a namespace becomes empty.
Changes:
- Introduces a named helper for the Select Active Object preference so updates mark the settings asset dirty only when the value changes, and then save.
- Centralizes namespace collapse state updates/removals so no-op writes don’t force dirty/save, and removes stored collapse state when the last managed type is removed from a namespace.
- Adds EditMode regression tests for dirty semantics and fixes test asmdef
.metaimporter values so Unity loads the EditMode test assembly.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta | Fixes importer fields so Unity correctly parses/loads the EditMode test assembly definition. |
| Tests/Editor/SettingsPersistenceTests.cs.meta | Adds the missing .meta so Unity tracks the new test file with a stable GUID. |
| Tests/Editor/SettingsPersistenceTests.cs | Adds EditMode coverage for dirty/no-op semantics for selectActiveObject and namespace collapse state. |
| Editor/DataVisualizer/NamespaceController.cs | Routes collapse persistence through centralized helpers and removes collapse state when a namespace becomes empty. |
| Editor/DataVisualizer/DataVisualizer.cs | Adds ApplySelectActiveObjectPreference and updates UI callback to use it; routes namespace collapse persistence through the new helper APIs. |
| Editor/DataVisualizer/Data/NamespaceCollapseState.cs | Introduces shared list-level SetCollapsed/Remove helpers to enforce consistent change detection. |
| Editor/DataVisualizer/Data/DataVisualizerUserState.cs | Adds user-state APIs for setting/removing namespace collapse state with consistent dirty/no-op reporting. |
| Editor/DataVisualizer/Data/DataVisualizerSettings.cs | Adds SetSelectActiveObject and settings-backed namespace collapse set/remove helpers that mark the asset dirty only on real changes. |
Files not reviewed (2)
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d4a3f44. Configure here.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 11 changed files in this pull request and generated no new comments.
Files not reviewed (3)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 08ba4e6. Configure here.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated 1 comment.
Files not reviewed (4)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SelectionPersistenceTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9a0284e. Configure here.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated no new comments.
Files not reviewed (4)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SelectionPersistenceTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 24f2bcd. Configure here.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated 3 comments.
Files not reviewed (4)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SelectionPersistenceTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
|
@cursor review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated no new comments.
Files not reviewed (4)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SelectionPersistenceTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9db147e. Configure here.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated 1 comment.
Files not reviewed (4)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SelectionPersistenceTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 32f9c92. Configure here.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 14 changed files in this pull request and generated no new comments.
Files not reviewed (4)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SelectionPersistenceTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file
|
@cursor review |
|
@copilot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4f1bc6b. Configure here.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 17 changed files in this pull request and generated no new comments.
Files not reviewed (5)
- Tests/Editor/NamespaceOrderingTests.cs.meta: Generated file
- Tests/Editor/SelectionPersistenceTests.cs.meta: Generated file
- Tests/Editor/SettingsPersistenceTests.cs.meta: Generated file
- Tests/Editor/TypePopoverLayoutTests.cs.meta: Generated file
- Tests/Editor/WallstopStudios.DataVisualizer.Tests.Editor.asmdef.meta: Generated file

Summary
Fixes the completed PLAN.md correctness items currently on this branch.
selectActiveObjectsettings dirty through a named helper used by the settings UI callbackType.FullNameidentity instead of short type names.assetpaths as refresh invalidations without loading deleted assets.metaimporter values so Unity parses the EditMode test assemblyValidation
dotnet tool restoredotnet tool run csharpier -- check Editor Runtime Testsgit diff --checknpm pack --dry-runD:\tmp\data-visualizer-unity-testswith package dependencyfile:D:/Code/Packages/Packages/com.wallstop-studios.data-visualizer-quitso the Unity Test Framework command-line update callback could run after project load.23passed,0failed inD:\tmp\data-visualizer-editmode-results.xml.Risk / Rollback
Risk is limited to Unity Editor settings/user-state persistence, editor namespace/type ordering, selection restoration, and editor asset invalidation. Runtime assembly behavior is unchanged. Rollback is reverting the PR commits.
Note
Medium Risk
Touches editor settings/user-state persistence and selection restore paths where bugs could mis-order types or lose selection, but scope is editor-only with broad new tests and no runtime assembly changes.
Overview
Fixes Data Visualizer editor state so settings and user JSON persist reliably and type/object selection uses
Type.FullNameinstead of ambiguous short names.Persistence:
selectActiveObjectand namespace collapse go through helpers that return whether anything changed, soPersistSettingsonly marks the settings asset dirty when needed. Last-object-per-type updates are idempotent (in-place update, clear on null GUID) and report change for persistence. Removing the last managed type in a namespace drops that namespace’s collapse state and fixes managed-type list updates across namespaces.Identity & restore: Selected type is stored and restored as
lastSelectedTypeFullNamewithFormerlySerializedAsandDataVisualizerUserState.FromJsonmigration from legacylastSelectedTypeName. Shared ordering/resolution helpers sort and find types by full name (including custom order and popover tie-breakers). Refresh/startup useResolveSelectedTypeByFullNameand expand the correct namespace group viaStyleConstants.NamespaceItemClass(not object rows). Saved object GUIDs are validated per exact type, normalized for casing, and can be included whenFindAssetsmisses them; stale GUIDs clear on delete/wrong type.Editor refresh & UI: Asset post-processing triggers refresh on import/move and on deleted/moved-from
.assetpaths without loading deleted files. Type-add/search USS rules fix row and field heights under filtering/rich text.Tests: New EditMode coverage for persistence dirty semantics, full-name collisions, selection/GUID restore, popover layout, and test asmdef meta fix.
Reviewed by Cursor Bugbot for commit 4f1bc6b. Bugbot is set up for automated code reviews on this repo. Configure here.