-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Comparing changes
Open a pull request
base repository: raycast/extensions
base: main
head repository: raycast/extensions
compare: pnt/notes
- 12 commits
- 11 files changed
- 1 contributor
Commits on Oct 22, 2025
-
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+
Configuration menu - View commit details
-
Copy full SHA for cae2306 - Browse repository at this point
Copy the full SHA cae2306View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 103f0d8 - Browse repository at this point
Copy the full SHA 103f0d8View commit details
Commits on Oct 23, 2025
-
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
Configuration menu - View commit details
-
Copy full SHA for 76528ce - Browse repository at this point
Copy the full SHA 76528ceView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for caa67b1 - Browse repository at this point
Copy the full SHA caa67b1View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for d3c6d55 - Browse repository at this point
Copy the full SHA d3c6d55View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for c423179 - Browse repository at this point
Copy the full SHA c423179View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 60a4edc - Browse repository at this point
Copy the full SHA 60a4edcView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for e4fc145 - Browse repository at this point
Copy the full SHA e4fc145View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 8db1dd4 - Browse repository at this point
Copy the full SHA 8db1dd4View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 296ac43 - Browse repository at this point
Copy the full SHA 296ac43View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for d316275 - Browse repository at this point
Copy the full SHA d316275View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for d8a0abe - Browse repository at this point
Copy the full SHA d8a0abeView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...pnt/notes