mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
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