Skip to content

fix: stabilize Android reader scrolling#585

Open
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-android-reader-scroll-regression
Open

fix: stabilize Android reader scrolling#585
codedogQBY wants to merge 1 commit into
mainfrom
codex/fix-android-reader-scroll-regression

Conversation

@codedogQBY

Copy link
Copy Markdown
Owner

Summary

  • let Android scroll mode use native WebView/renderer scrolling instead of Foliate touch-driven page movement
  • throttle scroll-mode relocate messages from the reader bridge to reduce React Native update pressure while scrolling
  • throttle reader UI/context updates from relocate events so progress, chapter, and AI reading context stay current without rerendering on every scroll tick
  • restore scroll renderer block sizing and native inertia settings for smoother long-page scrolling

Fixes #548
Fixes #565
Fixes #567
Fixes #571

Analysis

The 1.3.5 reports describe the same Android scroll-mode regression from different angles: sticky/short scroll distance, jumping to non-adjacent paragraphs, line/content misalignment, and occasional flicker during long reading sessions. The common path is continuous scroll relocation: Foliate was still intercepting touch movement in scrolled mode and manually mutating container position, while every relocate event immediately crossed the WebView bridge and triggered multiple React Native state/context updates. That made Android scroll feel blocked or jumpy under pressure.

Verification

  • PASS: /Users/bealqiu/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node packages/app-expo/scripts/build-reader.js
  • PASS: git diff --cached --check
  • BLOCKED: packages/app-expo/node_modules/.bin/tsc -p packages/app-expo/tsconfig.json --noEmit, existing missing packages: base64-js, @smithy/protocol-http, @smithy/querystring-builder
  • BLOCKED: biome check on touched files, existing ReaderScreen lint backlog reports noExplicitAny, hook dependency diagnostics, unused variables, and related pre-existing warnings

@codedogQBY

Copy link
Copy Markdown
Owner Author

补充一份更细的验证 checklist,方便合并前复核:

已执行:

  • PASS packages/app-expo/scripts/build-reader.js:Reader WebView bridge 构建通过,确认 reader 侧脚本改动能产出。
  • PASS git diff --cached --check:无空白/补丁格式问题。

已知阻塞,不归这个 PR:

  • BLOCKED packages/app-expo/node_modules/.bin/tsc -p packages/app-expo/tsconfig.json --noEmit:仓库当前缺 base64-js@smithy/protocol-http@smithy/querystring-builder
  • BLOCKED touched-file Biome 扩展检查:ReaderScreen.tsx 仍有既有 lint backlog,包括 noExplicitAny、hook dependency diagnostics、unused variables 等。

建议真机回归:

  • Android 长篇 EPUB/PDF 连续滚动 10-15 分钟,观察是否还出现短距离卡住、跳段、闪烁。
  • 分别验证滚动模式和翻页模式,确认 relocate/progress/章节高亮仍更新。
  • 在阅读中打开 AI/划线/设置面板后返回,确认滚动惯性和当前阅读位置没有回退。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant