Skip to content

Take core 7.11.0, show text documents as pages - #788

Merged
andiwand merged 2 commits into
mainfrom
core-7.11-read-aloud
Dec 3, 2026
Merged

andiwand merged 2 commits into
mainfrom
core-7.11-read-aloud

Conversation

@andiwand

@andiwand andiwand commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Takes core 7.11.0, turns on its pagination by default and replaces platform code with what the core now does.

Pages

  • Text documents show as separate pages. "Fit to screen" still gives the continuous view, and anyone who had turned page borders off keeps it.
  • WebViews before 86 keep the margins alone: pagination.js calls replaceChildren after it has detached the text, so the document would be blank there. A fix in the core would let us drop the version check.

Text-to-speech

  • The page's odr.readAloud decides what is read, highlights the word and scrolls along; the app only speaks. Reading starts at the selection or the current view instead of the top.
  • It is only offered where the core's translateText is true, so not for images and archives.

Smaller replacements

  • Printing waits for odr.chunks.loadAll() instead of polling.
  • The "Add text" prompt is set through HtmlConfig.editingFramePrompt.
  • The core only takes edit envelope version 3 now; the hand-written payloads in CoreTest follow.

Tested on an Android 16 emulator: all 121 Pro device tests pass on the final code. All 120 Lite tests passed before the translateText gate was added. Reading aloud, pause and resume, and the print preview were checked by hand. searchNavigationStaysAccessibleAcrossRotation fails now and then on this emulator, on main too.

Still to check: typing in the paged view with a physical phone's keyboard. The core's notes list that as not yet validated.

andiwand and others added 2 commits December 3, 2026 20:20
Text documents now use the core's pagination unless "Fit to screen" is
chosen. WebViews before 86 lack replaceChildren, which pagination.js calls
after detaching the text, so they keep the margins alone.

Text-to-speech speaks what the page's odr.readAloud sends instead of
injecting a script per paragraph, and reports the voice's position so the
page highlights it. It is offered where the core's translateText is true.

Printing waits for odr.chunks.loadAll instead of polling, and the
empty-frame prompt goes through HtmlConfig. The core only takes edit
envelope version 3 now, which the edit tests write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZZdVv7JbM9FVRtHWUP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZZdVv7JbM9FVRtHWUP
@andiwand
andiwand merged commit 27631d9 into main Dec 3, 2026
2 checks passed
@andiwand
andiwand deleted the core-7.11-read-aloud branch December 3, 2026 19:31
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