• Steven's avatar
    refactor: standardize MobX store architecture with base classes and utilities · f5624fa6
    Steven authored
    Refactored all stores to follow consistent patterns and best practices while keeping MobX:
    
    New Infrastructure:
    - Created base-store.ts with StandardState base class and factory functions
    - Added store-utils.ts with RequestDeduplicator, StoreError, and OptimisticUpdate helpers
    - Added config.ts for MobX configuration and strict mode
    - Created comprehensive README.md with architecture guide and examples
    
    Server State Stores (API data):
    - attachment.ts: Added request deduplication, error handling, computed properties, delete/clear methods
    - workspace.ts: Added Theme type validation, computed memoization, improved initialization
    - memo.ts: Enhanced with optimistic updates, request deduplication, structured errors
    - user.ts: Fixed temporal coupling, added computed memoization, request deduplication
    
    Client State Stores (UI state):
    - view.ts: Added helper methods (toggleSortOrder, setLayout, resetToDefaults), input validation
    - memoFilter.ts: Added utility methods (hasFilter, clearAllFilters, removeFiltersByFactor)
    
    Improvements:
    - Request deduplication prevents duplicate API calls (all server stores)
    - Computed property memoization improves performance
    - Structured error handling with error codes
    - Optimistic updates for better UX (memo updates)
    - Comprehensive JSDoc documentation
    - Type-safe APIs with proper exports
    - Clear separation between server and client state
    
    All stores now follow consistent patterns for better maintainability and easier onboarding.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    Co-Authored-By: 's avatarClaude <noreply@anthropic.com>
    f5624fa6
Name
Last commit
Last update
..
components Loading commit data...
helpers Loading commit data...
hooks Loading commit data...
layouts Loading commit data...
lib Loading commit data...
locales Loading commit data...
pages Loading commit data...
router Loading commit data...
store Loading commit data...
themes Loading commit data...
types Loading commit data...
utils Loading commit data...
App.tsx Loading commit data...
grpcweb.ts Loading commit data...
i18n.ts Loading commit data...
index.css Loading commit data...
main.tsx Loading commit data...