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

@@ -0,0 +1,17 @@
import type { StateCreator } from "zustand";
import type { AppState } from "../store";
export interface CommunicationSlice {
// Placeholder for future message state -- this slice will be populated
// during component decomposition. The communication component currently
// manages its own internal state.
}
export const createCommunicationSlice: StateCreator<
AppState,
[["zustand/immer", never]],
[],
CommunicationSlice
> = () => ({
// Empty state for now
});