Skip to content

Conversation

christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Aug 27, 2025

Summary

Adds ADR-0004 documenting the architectural decision to implement centralized layout management using CRDT backing store with command pattern architecture. This ADR provides technical justification for transitioning from direct position mutations to a reactive, centralized state management system.

This architectural foundation supports the implementation work being developed in the vue-nodes-migration branch.

Key Technical Decisions Documented

  • Centralized State Management: Move from scattered node.position mutations to single authoritative layout store
  • CRDT Foundation: Yjs-backed store provides conflict resolution and collaboration readiness
  • Command Pattern: All spatial mutations flow through explicit commands for undo/redo and system coordination
  • Reactive Architecture: Transition from O(n) diff-based change detection to O(1) signal-based reactivity

Current Architecture Problems Addressed

  • Performance bottlenecks from polling-based change detection in complex workflows (100+ nodes)
  • Position conflicts between LiteGraph canvas and DOMwidgets.ts overlay systems
  • Inability to support collaborative editing due to direct mutation patterns
  • Renderer lock-in preventing alternative rendering backends (WebGL, DOM, hybrid)
  • Inefficient diff-based undo/redo requiring expensive traversals on every interaction

Review Focus

  • Technical accuracy of architecture pattern descriptions (corrected from initial ECS mischaracterization)
  • Separation of universal CRDT benefits vs Yjs-specific implementation features
  • Completeness of migration strategy and risk mitigations
  • Alignment with existing ADR format and conventions

The ADR follows the established format and includes specific technical context about the evolution from diff-based to signal-based reactive systems.

┆Issue is synchronized with this Notion page by Unito

Copy link

github-actions bot commented Aug 27, 2025

🎭 Playwright Test Results

All tests passed across all browsers!

⏰ Completed at: 09/05/2025, 12:45:25 AM UTC

📊 Test Reports by Browser


🎉 Your tests are passing across all browsers!

@christian-byrne christian-byrne added documentation Improvements or additions to documentation area:vue-migration labels Aug 27, 2025
@christian-byrne christian-byrne marked this pull request as ready for review September 5, 2025 00:35
@christian-byrne christian-byrne requested a review from a team as a code owner September 5, 2025 00:35
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 5, 2025
Adds ADR-0004 documenting the architectural decision to implement centralized layout management using CRDT backing store with command pattern architecture.

## Key Technical Decisions Documented

- **Centralized State Management**: Move from scattered `node.position` mutations to single authoritative layout store
- **CRDT Foundation**: Yjs-backed store provides conflict resolution and collaboration readiness
- **Command Pattern**: All spatial mutations flow through explicit commands for undo/redo and system coordination
- **Reactive Architecture**: Transition from O(n) diff-based change detection to O(1) signal-based reactivity

## Current Architecture Problems Addressed

- Performance bottlenecks from polling-based change detection in complex workflows
- Position conflicts between LiteGraph canvas and DOMwidgets.ts overlay systems
- Inability to support collaborative editing due to direct mutation patterns
- Renderer lock-in preventing alternative rendering backends
@christian-byrne
Copy link
Contributor Author

Accepted and begun in #4263

@christian-byrne christian-byrne merged commit a49cbab into main Sep 5, 2025
19 checks passed
@christian-byrne christian-byrne deleted the adr/crdt-layout-system branch September 5, 2025 05:32
@benceruleanlu benceruleanlu mentioned this pull request Sep 5, 2025
snomiao pushed a commit that referenced this pull request Sep 12, 2025
Adds ADR-0004 documenting the architectural decision to implement centralized layout management using CRDT backing store with command pattern architecture.

## Key Technical Decisions Documented

- **Centralized State Management**: Move from scattered `node.position` mutations to single authoritative layout store
- **CRDT Foundation**: Yjs-backed store provides conflict resolution and collaboration readiness
- **Command Pattern**: All spatial mutations flow through explicit commands for undo/redo and system coordination
- **Reactive Architecture**: Transition from O(n) diff-based change detection to O(1) signal-based reactivity

## Current Architecture Problems Addressed

- Performance bottlenecks from polling-based change detection in complex workflows
- Position conflicts between LiteGraph canvas and DOMwidgets.ts overlay systems
- Inability to support collaborative editing due to direct mutation patterns
- Renderer lock-in preventing alternative rendering backends
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:vue-migration documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant