DOC-FULL-005 P0 | ReadingPosition camelCase + clamp 【status:todo】 #54

Closed
opened 2026-06-07 11:33:12 +08:00 by wangdl · 1 comment
Owner

v2 修正

  1. #[serde(rename_all = "camelCase")]
  2. 所有 progress 字段 clamp 0~1
  3. NaN→0, Infinity→1, 负数→0

JSON 输出

{"type":"pdf","pageNumber":12,"pageProgress":0.4,"overallProgress":0.32}
## v2 修正 1. 加 `#[serde(rename_all = "camelCase")]` 2. 所有 progress 字段 clamp 0~1 3. NaN→0, Infinity→1, 负数→0 ## JSON 输出 ```json {"type":"pdf","pageNumber":12,"pageProgress":0.4,"overallProgress":0.32} ```
wangdl added this to the M-DOC-FULL:Document Runtime 完整阅读内核与学习事件协议 milestone 2026-06-07 11:33:12 +08:00
wangdl changed title from DOC-FULL-005 P0 | ReadingPosition JSON 与 API 协议对齐 to DOC-FULL-005 P0 | ReadingPosition camelCase + clamp 2026-06-07 11:45:15 +08:00
wangdl changed title from DOC-FULL-005 P0 | ReadingPosition camelCase + clamp to DOC-FULL-005 P0 | ReadingPosition camelCase + clamp 【status:todo】 2026-06-07 19:15:01 +08:00
Author
Owner

审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。

本 Issue: Position 6 种类型存在。但: 无 #[serde(rename_all=camelCase)],字段 snake_case。progress 未 clamp 0~1。可能导出 NaN/Infinity。

状态: status:todo
工作类型: work:extend-existing

## 审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。 **本 Issue**: Position 6 种类型存在。但: 无 #[serde(rename_all=camelCase)],字段 snake_case。progress 未 clamp 0~1。可能导出 NaN/Infinity。 **状态**: status:todo **工作类型**: work:extend-existing
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#54
No description provided.