1. 25 Dec, 2025 8 commits
    • Steven's avatar
      docs: create AGENTS.md for AI agents and remove outdated CLAUDE.md · 9f5a7bb8
      Steven authored
      - Remove outdated CLAUDE.md with obsolete architecture references
      - Create comprehensive AGENTS.md covering:
        - Backend: Go, gRPC, Connect RPC, store layer, migrations
        - Frontend: React, React Query, Context API, state management
        - Development commands, workflows, and testing patterns
        - Code conventions, configuration, CI/CD, and security notes
      9f5a7bb8
    • Steven's avatar
      fix: react hooks order violation in MemoDetail when creating comments · 65238919
      Steven authored
      Replace dynamic hook mapping with useMemoComments hook to fetch all comments
      via listMemoComments API, ensuring consistent hook order across renders and
      fixing page load failure after comment creation.
      65238919
    • Steven's avatar
      c4dfb854
    • Steven's avatar
      fix: register Catalan and Galician locales in i18n configuration · 28e4ade0
      Steven authored
      The translation files ca.json and gl.json existed but weren't registered in the locales array, preventing users from selecting these languages.
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      Co-Authored-By: 's avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      28e4ade0
    • Steven's avatar
      refactor(react-query): optimize config, add error boundary, and remove JSDoc · d4e08ae2
      Steven authored
      This commit combines multiple improvements to the React Query migration:
      
      Performance Optimization:
      - Increase default staleTime from 10s to 30s for better performance
      - Reduces unnecessary network requests while maintaining data freshness
      
      Error Handling:
      - Add ErrorBoundary component with user-friendly error UI
      - Integrated at app root level for comprehensive coverage
      - Provides error details and reload option
      
      Documentation:
      - Add docs/auth-architecture.md explaining AuthContext design decisions
      - Document why AuthContext is preferred over React Query for current user
      
      Code Cleanup:
      - Remove all JSDoc comments from hooks and components
      - Keep essential inline comments for clarity
      - Simplifies code readability
      
      Files modified:
      - src/lib/query-client.ts - Optimized staleTime
      - src/main.tsx - Added ErrorBoundary wrapper
      - src/components/ErrorBoundary.tsx - New component
      - src/hooks/useMemoQueries.ts - Removed JSDoc
      - src/hooks/useUserQueries.ts - Removed JSDoc
      - src/components/PagedMemoList/PagedMemoList.tsx - Removed JSDoc
      - docs/auth-architecture.md - New documentation
      
      All changes verified with TypeScript compilation and production build.
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      Co-Authored-By: 's avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      d4e08ae2
    • ghose's avatar
    • dwojtas's avatar
    • Steven's avatar
      perf(react-query): fix context re-renders and improve type safety · b2e2b642
      Steven authored
      Optimizes React Query migration with performance and consistency improvements:
      
      Performance:
      - Memoize AuthContext and InstanceContext provider values to prevent unnecessary re-renders
      - Convert InstanceContext getter functions to useMemo hooks
      - Fix refetchSettings to avoid state dependency that caused frequent recreations
      
      Type Safety:
      - Replace 'any' types in useAttachmentQueries with proper protobuf types
      - Add Attachment and ListAttachmentsRequest type imports
      
      Query Key Consistency:
      - Replace hardcoded ["users", "stats"] with userKeys.stats() factory function
      - Ensures consistent cache key management across mutations
      
      Developer Experience:
      - Rename unused useCurrentUser to useCurrentUserQuery to avoid confusion
      - Add documentation explaining AuthContext-based vs React Query current user hooks
      - Update internal references in useNotifications and useTagCounts
      
      All changes verified with TypeScript compilation and build tests.
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      Co-Authored-By: 's avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      b2e2b642
  2. 24 Dec, 2025 1 commit
  3. 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
  4. 22 Dec, 2025 6 commits
  5. 20 Dec, 2025 5 commits
    • Johnny's avatar
      feat: implement scheduler plugin · 5828f34a
      Johnny authored
      - Added `scheduler` package with core functionalities for job scheduling.
      - Implemented job registration, execution, and graceful shutdown mechanisms.
      - Introduced middleware support for logging, recovery from panics, and timeout handling.
      - Developed cron expression parser to support both 5-field and 6-field formats.
      - Created comprehensive integration and unit tests for scheduler, job definitions, middleware, and parser functionalities.
      - Enhanced logging capabilities to track job execution and errors.
      5828f34a
    • Johnny's avatar
      feat: add Email Plugin with SMTP functionality · b55a0314
      Johnny authored
      - Implemented the Email Plugin for self-hosted Memos instances, providing SMTP email sending capabilities.
      - Created configuration structure for SMTP settings with validation.
      - Developed message structure for email content with validation and formatting.
      - Added synchronous and asynchronous email sending methods.
      - Implemented error handling and logging for email sending processes.
      - Included tests for client, configuration, and message functionalities to ensure reliability.
      - Updated documentation to reflect new features and usage instructions.
      b55a0314
    • Johnny's avatar
      chore: fix remark tag parse · 319a7cac
      Johnny authored
      319a7cac
    • Johnny's avatar
      chore: prevent sensitive data caching · 6b0f90f3
      Johnny authored
      6b0f90f3
    • Johnny's avatar
      chore: fix linter · eaef04a0
      Johnny authored
      eaef04a0
  6. 19 Dec, 2025 2 commits
    • Steven's avatar
      feat(web): add glassmorphism map controls with Google Maps integration · d236ef16
      Steven authored
      - Add custom zoom controls with modern glassmorphism styling
      - Add "Open in Google Maps" button for location markers
      - Refactor to React component architecture with proper Leaflet integration
      - Create reusable GlassButton component for maintainability
      - Use React 18 createRoot for portal rendering
      - Replace imperative DOM manipulation with declarative React patterns
      - Add coordinate display to location metadata
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      Co-Authored-By: 's avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      d236ef16
    • Steven's avatar
      refactor: remove deprecated Sessions and AccessTokens settings · d0c39081
      Steven authored
      - Remove ListSessions and RevokeSession RPC endpoints
      - Remove Session message and SessionsSetting from UserSetting
      - Remove ACCESS_TOKENS key and AccessTokensSetting
      - Update references to use RefreshTokensUserSetting with its own ClientInfo
      - Remove UserSessionsSection frontend component
      - Clean up user store to remove session and access token settings
      - Regenerate protobuf files
      
      The system now uses:
      - REFRESH_TOKENS for session management with sliding expiration
      - PERSONAL_ACCESS_TOKENS for long-lived API tokens
      d0c39081
  7. 18 Dec, 2025 4 commits
    • Steven's avatar
      refactor(auth): remove legacy session cookie authentication · a6c32908
      Steven authored
      - Remove SessionCookieName and SessionSlidingDuration constants
      - Remove ExtractSessionCookieFromHeader() function
      - Remove SessionIDContextKey and GetSessionID() function
      - Remove sessionID parameter from SetUserInContext()
      - Remove SessionID field from AuthResult struct
      - Remove session cookie extraction from middleware
      - Update documentation to reflect JWT + PAT only auth
      
      Session cookies were never being set since migration to refresh token
      authentication. This change removes ~50 lines of dead code and clarifies
      that the system uses JWT access tokens, refresh tokens, and PATs only.
      a6c32908
    • Steven's avatar
      refactor(web): improve auth flow and eliminate route duplication · b0aeb06f
      Steven authored
      - Extract route paths to router/routes.ts as single source of truth
      - Refactor connect.ts auth interceptor with better structure and error handling
        - Add TokenRefreshManager class to prevent race conditions
        - Implement smart redirect logic for public/private routes
        - Support unauthenticated access to explore and user profile pages
        - Add proper error handling for missing access tokens
        - Extract magic strings to named constants
      - Maintain backward compatibility by aliasing Routes to ROUTES
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      Co-Authored-By: 's avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      b0aeb06f
    • Johnny's avatar
      fix(auth): resolve token refresh and persistence issues · 50606a85
      Johnny authored
      - Fix cookie expiration timezone to use GMT (RFC 6265 compliance)
      - Use Connect RPC client for token refresh instead of fetch
      - Fix error code checking (numeric Code.Unauthenticated instead of string)
      - Prevent infinite redirect loop when already on /auth page
      - Fix protobuf Timestamp conversion using timestampDate helper
      - Store access token in sessionStorage to avoid unnecessary refreshes on page reload
      - Add refresh token cookie fallback for attachment authentication
      - Improve error handling with proper type checking
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      Co-Authored-By: 's avatarClaude Sonnet 4.5 <noreply@anthropic.com>
      50606a85
    • Johnny's avatar
      refactor: user auth improvements (#5360) · 7932f6d0
      Johnny authored
      7932f6d0
  8. 17 Dec, 2025 3 commits
  9. 16 Dec, 2025 2 commits