diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c3b9d2e..62d0c96b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Reading position auto-save now uses simple 2-second debounce - - Saves only after 2s of no scrolling (was 15s minimum interval) +- Reading position auto-save now uses simple 3-second debounce + - Saves only after 3s of no scrolling (was 15s minimum interval) - Much less aggressive, reduces relay traffic - Still saves instantly at 100% completion diff --git a/src/hooks/useReadingPosition.ts b/src/hooks/useReadingPosition.ts index 3c7b9add..8d2cee60 100644 --- a/src/hooks/useReadingPosition.ts +++ b/src/hooks/useReadingPosition.ts @@ -70,7 +70,7 @@ export const useReadingPosition = ({ clearTimeout(saveTimerRef.current) } - const DEBOUNCE_MS = 2000 // Save max every 2 seconds + const DEBOUNCE_MS = 3000 // Save max every 3 seconds console.log('[reading-position] ⏱️ Debouncing save for', DEBOUNCE_MS, 'ms (pos:', Math.round(currentPosition * 100) + '%)') saveTimerRef.current = setTimeout(() => { console.log('[reading-position] 💾 Auto-save at', Math.round(currentPosition * 100) + '%')