You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2 format check flakes: paginator's debounced afterScroll runs on a destroyed view #1291
check:v2-reader-formats (gates the PR) failed 2 of the last 4 runs on branches that do not touch the page (#1288 first run, #1289), and passed on a re-run:
FAIL clock.runFor: TypeError: Cannot read properties of null (reading 'document')
at #getVisibleRange
at #afterScroll
at later (the paginator's debounce)
at ClockController._callFirstTimer
Where: the telemetry rows of formats.check.mjs (fake clock), in the runFor after "the same book reopened". The previous book's paginator still has a debounced #afterScroll pending when its view is destroyed; the fake clock then fires it and this.#view is null.
No failure of this kind before 2026-11-13 (first seen after #1285 and #1287 merged), so something in those made the pending debounce likelier; the race itself is in the fork's paginator.
In a real browser this is an uncaught error in a timer after a book closes: nothing is saved or shown wrong, but it is noise in Sentry and the gate is flaky.
Fix candidates:
fork: #afterScroll / #getVisibleRange return when the view is gone, or destroy() cancels the debounce (a fork push and a pin bump);
Activity
test(v2-reader): format check lets the fork's destroyed-view afterScr…
fix(reader): fork guard for afterScroll on a destroyed view; format c…
feat(reader): V2 page tells hosts the TOC entry, the end of the book …
feat(reader): V2 reader shows time left in the chapter and the book (#…
feat(reader): V2 reader gets a table of contents and section navigati…
feat(reader): V2 reading settings: size, font (incl. OpenDyslexic), l…
feat(reader): V2 reader word popup and selection toolbar: translate, …
feat(reader): V2 reader saves words to the vocabulary with their sent…
feat(reader): V2 reader: finish a book at its end, saved on the serve…