Add RDEPUBBackgroundTrace.log at key decision points in the
reconciliation pipeline to trace why pageMap updates get rejected:
1. refreshBookPageMapInPlace — logs when a full pageMap update is enqueued
2. evaluateTakeover — logs when keepCurrentWindow is returned due to:
- jumpSession coverage ratio < 0.8
- adjacent coverage missing (hasPrev/hasNext)
- renderSignature mismatch
3. evaluateFullPageMapTakeover — logs when keepCurrentWindow is returned due to:
- currentSpineIndex not in candidate chapters
- adjacent coverage missing
4. commitPendingPageMapUpdate — logs when keepCurrentWindow decision is
applied and pending update is removed from queue
Also fix unused variable warning for currentPageNumber in extendPartial case.
Co-Authored-By: Claude <noreply@anthropic.com>
Keep only the evaluateFullPageMapTakeover: fullReplace diagnostic log
in RDEPUBPageMapReconciliationCoordinator.swift for future debugging.
Simplified RDEPUBBackgroundTrace to just the log method (removed measure
and debug gating). Removed all [EPUB][...], [ReadViewDemo], and
[EPUB][Pagination] print statements across the project.
Also includes earlier bug fixes:
- Fix stale currentPageNumber in extendPartial commit
- Fix pageCurl rebindVisiblePage during transition
- Fix keepCurrentWindow not removing pending update from queue
- Fix right-aligned text (巫鸿 bug) via avoidPageBreakInside,
tail merger, and continuation paragraph normalization
- Add text-indent reset for aligned blocks in CSS compatibility layer
Co-Authored-By: Claude <noreply@anthropic.com>