shenlei
d0efe3f2cc
安全区域改为从 key window 动态获取
...
- 新增 RDEPUBSafeArea:参考 GKNavigationBarSwift 的 keyWindow 三级查找与临时 window 兜底
- 移除 reflowableContentInsets 中 top/bottom 40 的固定默认值,改按设备真实安全区生成
- 各取安全区处的 ?? .zero 兜底改为回退到 key window 值
- DEBUG 构建下为文本可读区域绘制红色边框,方便查看排版范围
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:04:22 +09:00
shenlei
22e7e44220
feat: chapter runtime refactoring and related updates
...
- Refactor chapter runtime: replace window coordinator/snapshot with warmup orchestrator
- Update EPUB core: parser, reading session, JS bridge, navigator layout
- Update reader controller: data source, location resolution, persistence
- Update chapter runtime: data cache, loader, runtime store, disk cache, warmup orchestrator
- Remove deprecated navigation state machine and pagination state
- Update text rendering: book cache, HTML normalizer
- Update UI: text content view, dark image adjuster, text selection controller
- Update settings and reader configuration
- Add CODE_REVIEW.md and AUDIT_FINAL.md documentation
- Update pod dependencies (remove SSAlertSwift, SnapKit)
- Update podspec and pod configuration files
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 18:50:07 +09:00
shenlei
15b15d0e11
Remove all RDEPUBBackgroundTrace.log and bare print diagnostic calls
...
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>
2026-06-25 18:25:22 +08:00
shenlei
c65c190b71
feat: EPUB阅读器搜索、注释、CFI模块及大书远距跳转优化
...
- 实现EPUB阅读器搜索功能及选中注释功能
- 优化CFI模块,修复代码审查发现的11个问题
- 实现大书远距目录跳转与后台补全优化方案
- 优化设置面板与章节运行时联动
- 重构及大量改进优化
2026-06-22 20:26:34 +08:00
shen
6f75b083f7
feat: EPUB 阅读器搜索、选中注释、书签 chrome 状态及大量重构优化
...
- 新增 RDEPUBReaderSearchCoordinator 与 RDEPUBSelectionState 管理搜索和选中状态
- 新增 BookmarkChromeStateTests、NavigationBackwardTests、SelectionAnnotateTests 等 UI 测试
- 新增多个边界测试 epub 样本(损坏结构、空归档、缺失文件、流式外链验证)
- 重构阅读器 chrome 状态管理,统一 tool bar 与 search bar 交互
- 优化大书分页缓存策略(RDEPUBChapterSummaryDiskCache、RDEPUBPageCountCache)
- 移除废弃的 RDEPUBLocationConverter 和 RDEPUBPageBreakPolicy
- 更新 epub-bridge.js 与 JS bridge 通信协议
- 全面更新现有 UI 测试以适配新的 helper 和状态管理
2026-06-13 22:48:56 +08:00
shenlei
d15187b730
Reorganize docs and update reader search flows
2026-06-10 08:22:07 +08:00
shenlei
0e7c0577e3
feat: add in-reader search and restructure documentation
...
- Add RDEPUBReaderSearchBarView with animated show/hide, keyword
navigation, and match counting integrated into the reader controller
- Restructure docs: replace scattered design docs with consolidated
BUSINESS_LOGIC.md and UML_CLASS_DIAGRAMS.md; update ARCHITECTURE.md
- Add SearchTests and FanrenParseTimeTest; enhance LargeBookOnDemandTests
- Add scripts/run_ui_regression.sh and summarize_ui_results.py for
automated UI test execution and reporting
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 17:34:50 +08:00
shen
d20196ee34
feat: configurable chapter window & parallel metadata parsing with benchmark
...
1. Configurable chapter window size (onDemandChapterWindowSize: 3-15)
- Parameterized window radius in RDEPUBChapterRuntimeStore
- Updated RDEPUBChapterWindowCoordinator to use configurable radius
- RDEPUBChapterWindowSnapshot.from() accepts chapter array instead of fixed prev/next
- Even numbers round up to odd (4→5), min 3, max 15
2. Configurable metadata parsing concurrency (metadataParsingConcurrency)
- Default equals CPU core count
- Parallel execution via OperationQueue in paginateMetadataOnly
- Each worker creates independent builder instance
- NSLock protects result aggregation
3. Per-chapter and total wall-clock timing instrumentation
- Separated render vs I/O timing per chapter
- Summary log with wallClockMs, renderTotalMs, writeTotalMs, avgRenderMs
- Timing stored in RDEPUBReaderContext for test access
4. UI automation test infrastructure
- Added --demo-window-size, --demo-concurrency, --demo-clear-cache launch args
- DemoReaderState exposes windowSize, parseMs, parseConcurrency
- ConfigurableWindowTests: 5 test cases for window size 3/5/15
- ConcurrentParsingTests: 4 test cases for concurrency 2/4
- MetadataParseBenchmarkTests: serial vs parallel benchmark
5. Bug fixes
- Fixed page snap-back during background parsing (isUserInteracting check)
- Reduced BookPageMap refresh frequency from 16 to 32 chapters
- Moved waitForReadingInteractionToSettle outside operation loop
6. Design doc: dual-layer PageMap (estimated + precise mixed)
2026-06-03 23:38:11 +08:00
shenlei
feb05eaf87
feat: complete large-book pagination runtime and UI coverage
2026-06-03 17:47:16 +08:00
shenlei
c76beed03c
feat(reader): 实现大书快速进入与增量分页路径
...
- PaginationCoordinator: 新增 textReflowable 快速进入路径,支持增量章节构建
与 staged 合并策略,避免整书一次性构建的主线程阻塞
- TextBookBuilder: 重构为支持单章构建与增量合并模式
- ChapterPageCounter: 优化分页计数逻辑,支持章节级分页缓存
- PageFrameFactory: 新增 CoreText 页面帧工厂,提升排版性能
- ReaderContext/ReaderRuntime: 适配增量分页状态管理
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:16:57 +08:00
shen
1efb9d172f
feat(reader): 增强阅读器功能与 UI 测试支持
...
- 新增字体选择(系统/宋体/圆体/等宽)与暗色图片柔化配置
- 文本选择改为自定义手势+操作栏(拷贝/高亮/批注)
- 添加 accessibilityIdentifier 支持自动化 UI 测试
- 新增 UITests 覆盖阅读器打开/关闭、工具栏、设置面板、批注等
- 添加 Demo 测试用 EPUB 书源(宝山辽墓材料与释读)
- 新增文档:UI 自动化测试、功能开发计划、阅读器规划
2026-05-31 23:56:54 +08:00
shen
83b705b9ae
修改分页问题
2026-05-26 21:08:27 +08:00
shen
23182e8b5a
feat(epub): align wxread css and overlay pagination behavior
2026-05-25 22:15:24 +08:00
shen
54798ba578
refactor: 添加中文注释 + 优化模块结构
...
- 给全部 78 个 Swift 源文件添加详细的中文注释(文件级、类级、方法级)
- 删除 LegacyRDReaderController/ 死代码目录(16 文件 4592 行)
- 根目录翻页容器文件移入 ReaderView/ 目录
- Resources/ 移入 EPUBCore/Resources/(与使用者归属一致)
- RDEPUBTextIndexTable.swift 移入 EPUBTextRendering/(消除反向依赖)
- RDURLReaderController.swift 移入 EPUBUI/(入口控制器归入 UI 层)
- 更新 podspec 资源路径
2026-05-25 10:19:14 +08:00