v0.3.0 - Definition/State Architecture
🎉 FlowGraph v0.3.0
Breaking Changes
This release introduces a major architectural refactor: Definition/State separation for Node and Edge.
- Node.Id and Edge.Id are now read-only (immutable)
- Node and Edge now use composition:
Definition(immutable record) +State(mutable observable) - CommunityToolkit.Mvvm removed from FlowGraph.Core - Core is now framework-agnostic with zero external dependencies
Migration Guide
Before (v0.2.x):
var node = new Node { Id = "n1", Type = "test", Position = new Point(100, 200) };After (v0.3.0):
var node = new Node(
new NodeDefinition { Id = "n1", Type = "test" },
new NodeState { X = 100, Y = 200 }
);
// Or use pass-through properties (backward compatible):
node.Type = "test";
node.Position = new Point(100, 200);New Files
FlowGraph.Core/Models/ObservableBase.cs- Pure .NET INPC base classFlowGraph.Core/Models/NodeDefinition.cs- Immutable node identityFlowGraph.Core/Models/EdgeDefinition.cs- Immutable edge identityFlowGraph.Core/Models/PortDefinition.cs- Immutable port definitionFlowGraph.Core/Models/INodeState.cs/IEdgeState.cs- State interfacesFlowGraph.Core/Models/NodeState.cs/EdgeState.cs- Default implementations
Benefits
✅ Clean undo/redo via definition snapshots
✅ Framework-agnostic Core (pure .NET BCL)
✅ Better serialization (exclude transient UI state)
✅ Improved testability
Stats
- 360 tests passing
- Build: 0 warnings, 0 errors