mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 10:23:41 +00:00
Split the 570-line useMachineStore into three focused stores for better separation of concerns and improved re-render optimization: **New Stores:** - useMachineUploadStore (128 lines): Pattern upload state and logic - useMachineCacheStore (194 lines): Pattern caching and resume functionality - useMachineStore (reduced to ~245 lines): Connection, status, and polling **Benefits:** - Components only subscribe to relevant state (reduces unnecessary re-renders) - Clear separation of concerns (upload, cache, connection) - Easier to test and maintain individual stores - 30% reduction in main store size **Technical Details:** - Uses dynamic imports to avoid circular dependencies - Maintains all existing functionality - Updated FileUpload, PatternCanvas, and App components - All TypeScript compilation errors resolved - Build tested successfully Implements conservative 2-store extraction approach from issue #31. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| components | ||
| data | ||
| formats | ||
| hooks | ||
| lib | ||
| platform | ||
| services | ||
| stores | ||
| types | ||
| utils | ||
| App.css | ||
| App.tsx | ||
| index.css | ||
| main.tsx | ||
| vite-env.d.ts | ||