Skip to content

Make reader page turns and continuous scrolling consistent - #33

Merged
Eoic merged 19 commits into
developmentfrom
fix/32-continuous-page-swipes
Nov 14, 2026
Merged

Eoic merged 19 commits into
developmentfrom
fix/32-continuous-page-swipes

Conversation

@Eoic

@Eoic Eoic commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Page turns now follow touch and mouse movement across EPUB chapters and PDF spreads, and unfinished turns can be interrupted. Mouse hit-testing ignores clipped neighbour text in outer margins. Release-velocity estimates cannot fling against the final drag movement; intentional reversals remain supported. PDF viewers retain their rendered pages through settlement, defer speculative initialization while moving, and preserve zoom, selection, links, search, keyboard focus, and navigation history.

Small scroll-wheel movements turn paginated pages instantly across EPUB, MOBI, AZW3, TXT, PDF, CBZ, and CBR. Same-direction bursts are limited to one turn per 120 ms; reversal is immediate. Zoomed PDFs scroll within a spread, then turn at its top or bottom edge while preserving zoom. Horizontal mouse drags also turn zoomed PDFs. With animations disabled or reduced motion enabled, mouse turns commit instantly on release.

Continuous EPUB uses measured fragment heights to prevent overflow and a full-width scroll surface with centered text and a viewport-edge scrollbar. Wheel input and completed touch swipes cross chapter boundaries; backward navigation opens the previous chapter at its bottom. Inertia alone, cancelled gestures, and selection gestures do not turn chapters. Custom scrolling renderers share the touch-boundary handling.

Reading settings place a Light/Sepia/Night Page appearance dropdown above Highlight links.

Closes #32. Contributes to FR-3_1 (PapyrusReader/docs#25) and FR-3_2 (PapyrusReader/docs#26). The client host-theme regression follow-up is PapyrusReader/client#152; dependency pins remain unchanged.

Validation:

  • Reader formatting/analysis: clean. Full suite: 322 passed, 7 optional corpus tests skipped.
  • Example analysis, 2 tests, and release web build passed.
  • Release Chromium smoke coverage passed for all seven formats, desktop margin scrolling, instant wheel turns, responsive settings, and mobile EPUB forward/reverse chapter swipes.
  • Dedicated PDF checks passed at 800px and 1440px with 4x CPU throttling: repeated and interrupted touch/mouse turns, selection, reverse navigation, zoomed edge wheel turns, retained 200% zoom, and reduced-motion mouse turns.
  • Ten consecutive TXT forward/reverse browser checks passed under 4x CPU throttling after reproducing the incorrect release-velocity fling. Deterministic EPUB and PDF tests cover both directions, intentional reversals, incoming PDF pages during an unfinished turn, and clipped neighbour text in EPUB margins.
  • New regressions reproduced and verified fixes for reduced-motion/disabled-animation mouse swipes and custom-renderer EPUB chapter swipes, including switching from pagination to scrolling.
  • Client integration: 48 focused tests passed with this reader; 12 theme combinations also passed with the client's existing reader pin. Client formatting/analysis and 22 web checks passed.
  • Browser gesture checks use single-page format strokes and sufficient distance during interrupted PDF turns, so their expected page counts do not depend on release speed. The fast-forward/slow-reverse case was reproduced and verified.
  • Hot reload into the client browser app succeeded.

Physical-device verification is still outstanding; these checks do not certify arbitrary-book performance. No release versions or client reader pins change.

Copilot AI balanced review requested due to automatic review settings November 14, 2026 00:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T00:17:44.560319Z 6903677 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Eoic Eoic changed the title Keep swipe page turns continuous across chapters and PDFs Keep page swipes continuous across chapters and book formats Nov 14, 2026
@Eoic Eoic changed the title Keep page swipes continuous across chapters and book formats Unify drag and scroll-wheel page turns across book formats Nov 14, 2026
@Eoic Eoic changed the title Unify drag and scroll-wheel page turns across book formats Make reader page turns and continuous scrolling consistent Nov 14, 2026
@Eoic
Eoic merged commit 77f0c7e into development Nov 14, 2026
4 checks passed
@Eoic
Eoic deleted the fix/32-continuous-page-swipes branch November 14, 2026 20:46
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.

Keep swipe page turns continuous across chapters and PDFs

2 participants