Repository navigation
fix(reader): keep contextual pair direction aligned with sorted books - #575
Conversation
drevendev
left a comment
There was a problem hiding this comment.
Independent cross-project exact-head review — 17ee8a0a187f087b0af4b8a2db960cdf152f659c (base 9a082f42ba9ac5ce9bd97a4f54c59ffa9cec70ba).
Reviewed the full eight-file diff and surrounding Reader catalogue filter, DOM sort, URL restore, pair eligibility and keyboard navigation; current README/AGENTS.md and project manifest/state; Issue #283; the absence of earlier reviews/threads; and head-associated Actions jobs/logs.
The fix maintains one consistent source of order: sortCatalog() reorders the actual catalogue DOM, then updateCatalog() walks those current children when deciding the two eligible measured editions. The restored catalog_order is applied before the pair link is generated, including history navigation. This preserves the documented signed right-minus-left comparison and keeps incompatible, pending or metric-missing books ineligible. The reverse-order and shared-URL regressions exercise the real source logic; desktop/mobile Chromium tests cover the visible pair link after restoring a sorted catalogue. No new source fetch, measurement, rights or FantLab-parity claim is introduced.
Exact-head verification observed: Scriptorium Pages run 44341288108 and Reader package run 44341288130 both succeeded. Their logs show 1,491 Python tests per applicable suite, canonical site build, and real Chromium desktop/mobile Reader acceptance. The Pages deployment job was skipped; the generated screenshots/PDF are branch-preview evidence, not public Pages readback. Reviewer-local execution and independent visual inspection of screenshot artifact: not run.
Verdict: APPROVE this bounded Reader ordering correction on the named HEAD. No blocking defect established by this source/CI review. This does not close #283's wider visual/print acceptance, certify a live deployment, or establish FantLab parity; acceptance of any later changed head requires fresh evidence.
* feat(lexical): add source-free CSV aggregate renderer * feat(lexical): expose CSV from existing offline CLI * test(lexical): verify CSV numbers, missingness, formula safety and CLI * docs(lexical): document private CSV evidence and spreadsheet protections * docs(readme): expose offline lexical CSV export * docs(state): track source-free CSV acceptance without reopening merged #575
User-visible fix
When a verified catalogue filter leaves exactly two compatible measured editions, the contextual comparison now preserves their visible sorted DOM order (left/right). The signed delta remains
right - left; changing sort order no longer silently reverses the meaning of the visible book sequence.On shared
catalog_orderURLs, sort the catalogue before deriving the contextual pair. No new external requests, book text, metrics, rights claims, or FantLab parity assertions.Verification
Refs #283.