8 Commits

Author SHA1 Message Date
wangdl
3b0625ffbb fix: DOC-FULL V1 export deprecated 2026-06-07 20:33:53 +08:00
wangdl
b22df85891 feat: DOC-FULL Batch 1 FFI + Compat
#56 FFI DTO V2 exports (done in A1)
#83 V1 deprecated annotations
#84 V2→API protocol mapping doc

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-07 20:26:05 +08:00
wangdl
2f816510a9 fix: #44 events.rs Mutex poison 时恢复而非静默丢事件
push_reading_event 改用 match 替代 if let,poison 时通过 into_inner 恢复缓冲区。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 13:00:37 +08:00
wangdl
fc9e4eec81 fix: #38 EVENT_BUFFER 增加 MAX_BUFFER_SIZE=1000 上限
push_reading_event 时超出上限自动丢弃最旧事件,防止未导出事件堆积导致 OOM。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 12:55:00 +08:00
wangdl
bae6ef5726 feat: M3 completion — event buffer, FFI search/anchor, PDF strategy, quality fixes
Rust Core:
- events: global Mutex-buffered event queue (push/export/clear/update_position)
- image_meta: use ImageReader::format() for real decoded format instead of extension
- search: change match_start/match_end usize→u64 for FFI compatibility
- epub/pdf: module-level placeholder comments

FFI (UDL exposed, 12 total functions):
- Added: search_markdown_blocks, search_text_content, create_note_anchor
- Added: push_reading_event, update_reading_position, export_pending_events,
  clear_exported_events

Docs:
- README: synced DocumentBlock model (Table.headers + HorizontalRule),
  simplified dependency recommendations, removed nonexistent doc references
- docs/pdf-strategy.md: PDFKit vs PDFium vs MuPDF evaluation, 5 decisions,
  platform strategy matrix, roadmap

Build:
- .cargo/config.toml: cargo xtask alias
- xtask: CLI implementation (test/build-ios/fixtures commands)
- fixtures: markdown/sample.md (9 block types), text/sample.txt
- XCFramework rebuilt, Swift bindings regenerated (1977 lines)

58 tests pass, zero warnings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:23:26 +08:00
wangdl
b5f8e273a9 feat: ReadingEvent serde tests + NoteAnchor with from_position constructor and tests 2026-05-30 21:18:30 +08:00
wangdl
8042a9d92e feat: core data models - MaterialType, DocumentBlock, ReadingPosition, ReadingEvent, NoteAnchor, SearchResult, DocumentError 2026-05-30 20:22:16 +08:00
wangdl
e76f253260 chore: init Rust workspace skeleton with crate structure 2026-05-30 18:33:50 +08:00