Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: raycast/extensions
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: raycast/extensions
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: pnt/notes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 12 commits
  • 11 files changed
  • 1 contributor

Commits on Oct 22, 2025

  1. feat: optimize large notes with image caching and debug logging

    - Implement hash-based caching for processed notes and images
    - Process images with shell script (parallel, no Node.js memory)
    - Resize images to 450px JPEG 20% quality for performance
    - Add LRU cache cleanup (75MB limit)
    - Create debug logging system with preference toggle
    - Add AI tool for viewing debug logs
    - Fix all error logging to use debugLog
    - Handle notes up to 500MB with streaming processing
    
    Fixes large note crashes and improves loading speed 10x+
    pernielsentikaer committed Oct 22, 2025
    Configuration menu
    Copy the full SHA
    cae2306 View commit details
    Browse the repository at this point in the history
  2. perf: implement 3 key optimizations for cache system

    Optimization #1: Hash by ID+ModTime (50% faster cache checks)
    - Replace content-based hashing with ID+modification time
    - Reduces cache check from ~1-10s to <50ms
    - Only fetches timestamp from Notes, not entire content
    
    Optimization #4: Cache metadata file (instant size checks)
    - Add .cache-meta.json to track total size and file count
    - Eliminates expensive disk scans on every cache operation
    - Recalculates only when outdated (>7 days)
    
    Optimization #7: True LRU cache (proper access tracking)
    - Touch files on access to update mtime
    - Ensures frequently-accessed notes stay in cache
    - Makes LRU cleanup actually based on usage, not just age
    
    Expected improvements:
    - Cache checks: 50-100x faster
    - Cache operations: No more disk scans
    - Cache hits: Better retention of hot notes
    pernielsentikaer committed Oct 22, 2025
    Configuration menu
    Copy the full SHA
    103f0d8 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2025

  1. feat: optimize image cache with WebP format

    - Switch from JPEG to WebP format for 20-30% smaller cache files
    - Update quality from 20% to 40% (WebP is more efficient)
    - Change file extensions from .jpg to .webp throughout codebase
    - Update cache cleanup and metadata to handle WebP files
    - Clear existing cache to test new format
    
    Expected benefits:
    - 20-30% smaller image cache files
    - Better compression at same quality
    - Maintains fast processing speed
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    76528ce View commit details
    Browse the repository at this point in the history
  2. fix: update image detection regex for WebP format

    - Change regex from .jpg to .webp in NoteDetail.tsx
    - Fixes issue where images weren't displaying after WebP optimization
    - Images are processed and cached as .webp but UI was still looking for .jpg files
    
    This resolves the 'images not loading' issue after the WebP format change.
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    caa67b1 View commit details
    Browse the repository at this point in the history
  3. fix: revert WebP back to JPEG - sips doesn't support WebP writing

    - sips can read WebP but cannot write WebP format
    - Revert all WebP references back to JPEG format
    - Clear cache to test with working JPEG format
    - Images should now process and display correctly
    
    The WebP optimization was a good idea but macOS sips doesn't support writing WebP files.
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    d3c6d55 View commit details
    Browse the repository at this point in the history
  4. fix: update cache metadata with image file sizes

    CRITICAL BUG FIX: Cache metadata was missing image file sizes
    - Shell script saves JPEG images to image-cache/ without updating metadata
    - Only HTML files (1KB) were tracked, not images (5-20KB each)
    - This caused cleanup to never trigger, allowing unlimited cache growth
    - Now updates metadata after shell script finishes processing images
    - Ensures 75MB limit is properly enforced with LRU cleanup
    
    This fixes the cache size tracking and prevents disk space issues.
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    c423179 View commit details
    Browse the repository at this point in the history
  5. fix: prevent debugLog recursion crashes

    CRITICAL BUG FIX: debugLog could cause infinite recursion
    - If writeFileSync fails (disk full, permissions), catch block called debugLog again
    - This created infinite recursion → stack overflow → extension crash
    - Fixed by using console.error instead of debugLog in catch blocks
    - Applied to both debugLog() and rotateLogIfNeeded() functions
    
    This prevents the extension from crashing when logging fails.
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    60a4edc View commit details
    Browse the repository at this point in the history
  6. fix: eliminate redundant file read in cache metadata

    CRITICAL PERFORMANCE FIX: Removed redundant file read
    - Was re-reading entire HTML file (100MB+) just to recompute hash
    - Could easily exceed Raycast memory budget and cause RangeError
    - Now reuses htmlHash already computed at function start (line 402)
    - Prevents silent failures in try/catch that would skip image tracking
    
    Also added note about existing caches needing recalculateCacheMetadata()
    for caches created before the image metadata fix.
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    e4fc145 View commit details
    Browse the repository at this point in the history
  7. fix: update metadata for cache-hit images

    CRITICAL BUG FIX: Cache-hit path wasn't updating metadata
    - Cache-hit branch used cached images but never updated .cache-meta.json
    - Images existed in image-cache/ but weren't counted in metadata
    - LRU cleanup read meta.totalSize and thought cache was tiny
    - Result: 75MB limit never triggered, images piled up indefinitely
    
    Now updates metadata when using cached images so LRU cleanup works correctly.
    This ensures the 75MB cache limit is properly enforced.
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    8db1dd4 View commit details
    Browse the repository at this point in the history
  8. fix: remove incorrect await from sync function

    - processImagesWithShellScript is a sync function but was being called with await
    - This could cause timing issues or unexpected behavior
    - Removed the await keyword to match the function signature
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    296ac43 View commit details
    Browse the repository at this point in the history
  9. migrate: convert .eslintrc.json to eslint.config.js

    - Migrate from legacy JSON config to new flat config format
    - Preserve all existing rules including import/order configuration
    - Remove .eslintrc.json file
    - ESLint v9+ compatible configuration
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    d316275 View commit details
    Browse the repository at this point in the history
  10. fix: handle Buffer chunks in readStream data handlers

    - Change parameter type from string to string | Buffer
    - Use .toString() to convert Buffer chunks to strings
    - Fixes TypeScript error with createReadStream data handlers
    pernielsentikaer committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    d8a0abe View commit details
    Browse the repository at this point in the history
Loading