Comfy-Org / Comfy-Org/ComfyUI_frontend
layoutStore.ts: 1,485 lines mixing Yjs CRDT sync with layout state
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Recommendation
### ♻️ REFACTOR: Extract Yjs sync into a dedicated composable
The layout store mixes CRDT synchronization logic with layout state management.
## What Was Found
- **File:** `src/renderer/core/layout/store/layoutStore.ts` — 1,485 lines
- **Consumers:** 21 files
- **Mixed concerns:** Yjs CRDT sync logic + layout state management
## Context
Extract Yjs sync into a dedicated `useYjsSync` composable. Keep the store thin and focused on layout state. The Yjs sync logic is independently testable.
---
**Category:** Refactoring Opportunity | **Confidence:** MEDIUM | **Tools:** Static analysis
_Filed by audit-code skill_
Part of #11022
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11038-layoutStore-ts-1-485-lines-mixing-Yjs-CRDT-sync-with-layout-state-33e6d73d365081638feef3dc6a9cc414) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.