Skip to content

fix(paginator): emit periodic relocates while a continuous scroll never pauses - #72

Merged
chrox merged 1 commit into
mainfrom
fix/scrolled-relocate-max-wait
Aug 13, 2026
Merged

fix(paginator): emit periodic relocates while a continuous scroll never pauses#72
chrox merged 1 commit into
mainfrom
fix/scrolled-relocate-max-wait

Conversation

@chrox

@chrox chrox commented Aug 13, 2026

Copy link
Copy Markdown
Member

In scrolled mode the relocate that reports reading position sits behind a 250ms trailing debounce. A scroll that never pauses, such as the Auto Scroll reading mode stepping the container every frame, resets the timer forever, so reading progress (percentage and time remaining) only updates once the scrolling stops (readest/readest#5635, item 2).

This tracks the current unbroken run of scroll events and forces the relocate at most once per SCROLL_RELOCATE_MAX_WAIT (1s) while the run lasts. The debounced call still reports the final position and ends the run.

Finger drags are skipped for the same reason preloading skips them: the visible-range measurement drops frames mid-swipe, and the release settles through the trailing debounce anyway (readest/readest#4785). #isAnimating and #stabilizing/#justAnchored guards are shared with the debounced path via the extracted scrolledScrollRelocate.

Covered by a new regression test in readest: a 2.5s continuous scroll burst must emit at least two 'scroll' relocates while still in progress (was zero).

🤖 Generated with Claude Code

…er pauses

In scrolled mode the relocate that reports reading position sits behind a
250ms trailing debounce. A scroll that never pauses, such as the Auto Scroll
reading mode stepping the container every frame, resets the timer forever,
so reading progress only updates once the scrolling stops (readest#5635).

Track the current unbroken run of scroll events and force the relocate at
most once per second while it lasts. The debounced call still reports the
final position and ends the run. Finger drags are skipped for the same
reason preloading skips them: the measurement drops frames mid-swipe, and
the release settles through the debounce anyway (readest#4785).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chrox
chrox merged commit fd91451 into main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant