1. 30 Dec, 2025 5 commits
  2. 29 Dec, 2025 4 commits
  3. 28 Dec, 2025 8 commits
  4. 27 Dec, 2025 2 commits
  5. 26 Dec, 2025 2 commits
  6. 25 Dec, 2025 9 commits
  7. 24 Dec, 2025 1 commit
  8. 23 Dec, 2025 9 commits
    • Johnny's avatar
    • Johnny's avatar
      style: organize imports in MemoView hooks · 595daaa1
      Johnny authored
      595daaa1
    • Johnny's avatar
      fix(MemoEditor): dispatch toggleFocusMode action properly · 0f9322ea
      Johnny authored
      - Wrap actions.toggleFocusMode() with dispatch() call
      - Create toggleFocusMode helper function for callbacks
      - Fix focus mode not toggling due to action not being dispatched
      0f9322ea
    • Johnny's avatar
      fix(MemoEditor): restore focus mode functionality · 201a0466
      Johnny authored
      - Add useFocusMode hook to lock body scroll in focus mode
      - Add 'f' key keyboard shortcut to toggle focus mode
      - Add FocusModeExitButton inside editor
      - Import and wire up all focus mode components and hooks
      - Update useKeyboard to handle focus mode toggle
      201a0466
    • Johnny's avatar
      fix(MemoEditor): restore focus mode styles · ca84241b
      Johnny authored
      - Import and use FOCUS_MODE_STYLES from constants
      - Apply proper fixed positioning, shadow, and spacing in focus mode
      - Add transition animation for smooth mode switching
      - Replace empty 'focus-mode' class with actual Tailwind utilities
      ca84241b
    • Johnny's avatar
      fix(MemoEditor): restore wrapper styles removed by refactoring · f2bc115a
      Johnny authored
      - Add back Tailwind utility classes for proper layout
      - Restore padding, border, background, and flex styles
      - Fix missing styles on memo-editor-wrapper element
      f2bc115a
    • Johnny's avatar
      style(MemoView): restore comments and formatting · 735dd1fe
      Johnny authored
      - Add back descriptive comments removed by editor refactoring commit
      - Restore original timestamp calculation format in MemoHeader
      - Improve code readability with section comments
      735dd1fe
    • Johnny's avatar
      refactor(MemoView): improve maintainability and code organization · e61d594d
      Johnny authored
      Complete refactoring of MemoView components for better code quality:
      
      - Split useMemoViewState into individual hook files (useMemoActions,
        useKeyboardShortcuts, useNsfwContent, useImagePreview, useMemoCreator)
        for single responsibility principle
      - Consolidate types closer to usage - move hook-specific types to
        respective files, keep only component props in shared types.ts
      - Optimize context with separate static/dynamic memoization to reduce
        unnecessary re-renders
      - Simplify barrel exports to only expose public API (MemoView component
        and MemoViewProps type)
      - Add comprehensive JSDoc documentation to all public APIs with usage
        examples
      
      Benefits:
      - Better maintainability: each hook file has one clear purpose
      - Improved performance: context optimization prevents unnecessary re-renders
      - Enhanced developer experience: clear documentation and encapsulation
      - Cleaner architecture: public API is minimal, internal details hidden
      
      All automated checks pass (TypeScript compilation, linter, production build).
      e61d594d
    • Johnny's avatar
      refactor(editor): complete state machine and services migration · 1b11e8c8
      Johnny authored
      BREAKING CHANGE: MemoEditor internal architecture completely refactored
      
      ## Summary
      
      Refactored MemoEditor from hooks-based state management to a three-layer
      architecture (Presentation → State → Services) using useReducer pattern.
      
      ## Changes
      
      ### Architecture
      - **State Layer** (5 new files): types, actions, reducer, context, barrel export
      - **Service Layer** (6 new files): error, validation, upload, cache, memo services + barrel
      - **Component Layer** (3 new files): EditorToolbar, EditorContent, EditorMetadata
      - **Simplified Hooks** (3 new files): useMemoInit, useAutoSave, useKeyboard
      
      ### Code Reduction
      - Main component: ~380 lines → ~140 lines (-63%)
      - Hooks removed: 5 old hooks (useMemoEditorState, useMemoSave, etc.)
      - Total lines removed: 508 lines of old code
      - Utility hooks preserved: 8 hooks still in use (useLocation, useDragAndDrop, etc.)
      
      ### Improvements
      -  Predictable state transitions with useReducer
      -  Testable business logic in pure service functions
      -  Cleaner component code (presentation only)
      -  Better separation of concerns
      -  Type-safe actions with discriminated unions
      -  Centralized error handling
      
      ## Statistics
      - Files changed: 26
      - Commits created: 25 (squashed into 1)
      - New files: 17
      - Removed files: 5
      - TypeScript errors: 0
      - Lint errors: 0
      
      ## Testing
      Manual testing required for:
      - Editor functionality (create, edit, save)
      - Drag and drop
      - Focus mode
      - Keyboard shortcuts (Cmd/Ctrl + Enter)
      - Auto-save to localStorage
      1b11e8c8