feat(01-01): create Zustand store with 6 slices, IPC batcher, and unit tests

- Install zustand 5.x and immer 11.x dependencies
- Create 6 Zustand slices: navigation, company, selection, ui, communication, social
- Create combined store with devtools + immer middleware
- Create IPC event batcher with 50ms debounce window (schedule/flush/dispose)
- Create typed selector hooks for narrow state subscriptions
- Add 14 unit tests covering store initialization, slice behaviors, and batcher timing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 4.6 committed 2026-03-22 01:30:37 -04:00
1 parent a4de64b876
commit 5e9d36c058
13 files changed
+818 -4

No files matched your search

+35
View File
@@ -38,6 +38,9 @@ importers:
framer-motion:
specifier: 12.36.0
version: 12.36.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
immer:
specifier: ^11.1.4
version: 11.1.4
react:
specifier: 19.2.4
version: 19.2.4
@@ -50,6 +53,9 @@ importers:
zod:
specifier: 4.3.6
version: 4.3.6
zustand:
specifier: ^5.0.12
version: 5.0.12(@types/react@19.2.14)(immer@11.1.4)(react@19.2.4)
devDependencies:
'@eslint/js':
specifier: 9.38.0
@@ -1928,6 +1934,9 @@ packages:
resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==}
engines: {node: '>= 4'}
immer@11.1.4:
resolution: {integrity: sha512-XREFCPo6ksxVzP4E0ekD5aMdf8WMwmdNaz6vuvxgI40UaEiu6q3p8X52aU6GdyvLY3XXX/8R7JOTXStz/nBbRw==}
import-fresh@3.3.1:
resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
engines: {node: '>=6'}
@@ -2916,6 +2925,24 @@ packages:
zod@4.3.6:
resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==}
zustand@5.0.12:
resolution: {integrity: sha512-i77ae3aZq4dhMlRhJVCYgMLKuSiZAaUPAct2AksxQ+gOtimhGMdXljRT21P5BNpeT4kXlLIckvkPM029OljD7g==}
engines: {node: '>=12.20.0'}
peerDependencies:
'@types/react': '>=18.0.0'
immer: '>=9.0.6'
react: '>=18.0.0'
use-sync-external-store: '>=1.2.0'
peerDependenciesMeta:
'@types/react':
optional: true
immer:
optional: true
react:
optional: true
use-sync-external-store:
optional: true
snapshots:
7zip-bin@5.2.0: {}
@@ -4783,6 +4810,8 @@ snapshots:
ignore@7.0.5: {}
immer@11.1.4: {}
import-fresh@3.3.1:
dependencies:
parent-module: 1.0.1
@@ -5676,3 +5705,9 @@ snapshots:
zod: 4.3.6
zod@4.3.6: {}
zustand@5.0.12(@types/react@19.2.14)(immer@11.1.4)(react@19.2.4):
optionalDependencies:
'@types/react': 19.2.14
immer: 11.1.4
react: 19.2.4