feat(07): close native text pagination semantics loop
This commit is contained in:
+14
-14
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
|
||||
milestone: v1.1
|
||||
milestone_name: WXRead 深化对齐
|
||||
status: ready_to_execute
|
||||
last_updated: "2026-05-22T12:03:00.000Z"
|
||||
last_activity: 2026-05-22
|
||||
last_updated: "2026-05-22T12:35:00.000Z"
|
||||
last_activity: 2026-05-22 -- Phase 07 execution completed
|
||||
progress:
|
||||
total_phases: 4
|
||||
completed_phases: 0
|
||||
total_plans: 11
|
||||
completed_plans: 0
|
||||
percent: 0
|
||||
completed_phases: 2
|
||||
total_plans: 6
|
||||
completed_plans: 6
|
||||
percent: 50
|
||||
---
|
||||
|
||||
# STATE
|
||||
@@ -23,18 +23,18 @@ progress:
|
||||
参见:`.planning/PROJECT.md`(更新于 2026-05-22)
|
||||
|
||||
**核心价值:** 稳定可用的 EPUB/TXT 阅读体验
|
||||
**当前关注:** `v1.1` 已完成 Phase 6-7 规划,下一步按顺序进入执行或继续规划 Phase 8
|
||||
**当前关注:** `v1.1` 已完成 Phase 6-7 执行闭环,下一步进入 Phase 8 规划或执行
|
||||
|
||||
## 当前结论(摘要)
|
||||
|
||||
- `v1.1` 已基于现有候选需求正式生成 active `REQUIREMENTS.md` 与 `ROADMAP.md`。
|
||||
- 当前活跃 roadmap 包含 Phase 6-9:页面几何、属性闭环、分页质量/缓存、自动化回归。
|
||||
- Phase 7 已补齐 research / patterns / validation / plans,属性闭环的实现入口已收敛到 renderer → layouter → page metadata 这条链路。
|
||||
- Phase 7 已完成执行与验证,HTML/CSS → attributed string → paginator 的属性闭环已落到 renderer → layouter → page metadata 这条链路。
|
||||
- `v1.0` 归档与 audit 仍保留在 `.planning/milestones/` 和 `.planning/v1.0-MILESTONE-AUDIT.md` 供后续追溯。
|
||||
|
||||
## 当前风险焦点
|
||||
|
||||
- native text 几何查询、自定义分页属性闭环、分页质量与自动化验证是 `v1.1` 的主要技术风险
|
||||
- native text 分页质量/缓存与自动化验证仍是 `v1.1` 的主要技术风险
|
||||
- `v1.0` 遗留的 requirement bookkeeping gap 已归档,不应阻塞 `v1.1` 执行,但后续引用历史证据时需注意
|
||||
- simulator 仍会输出既有 `.SFUI-Semibold` CoreText 替代提示,但未造成功能性失败
|
||||
|
||||
@@ -51,7 +51,7 @@ progress:
|
||||
|
||||
## 下一步
|
||||
|
||||
- 建议下一步:`$gsd-execute-phase 6` 或继续 `$gsd-plan-phase 8`
|
||||
- 建议下一步:`$gsd-plan-phase 8` 或在确认顺序后继续 `$gsd-execute-phase 8`
|
||||
- 已完成的产物目录:
|
||||
- `.planning/milestones/`
|
||||
- `.planning/phases/06-page-geometry-and-interaction-hit-layer/`
|
||||
@@ -60,7 +60,7 @@ progress:
|
||||
|
||||
## Current Position
|
||||
|
||||
Phase: 7
|
||||
Plan: 07-01 / 07-02 / 07-03
|
||||
Status: Ready for execute-phase
|
||||
Last activity: 2026-05-22 — Phase 7 research, validation, patterns, and plans created
|
||||
Phase: 8
|
||||
Plan: pending
|
||||
Status: Ready for next phase
|
||||
Last activity: 2026-05-22 -- Phase 07 execution completed with verification passed
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
phase: 7
|
||||
plan: 07-01
|
||||
status: complete
|
||||
requirements-completed:
|
||||
- ATTR-01
|
||||
- ATTR-03
|
||||
updated: 2026-05-22
|
||||
---
|
||||
|
||||
# 07-01 Summary
|
||||
|
||||
- Added explicit native-text semantic types and attributed-string keys for block kinds, pagination hints, and attachment placement.
|
||||
- Extended chapter preprocessing to inject semantic markers for WXRead-style hints such as `avoidPageBreakInside`, `pageBreakBefore`, `pageBreakAfter`, `pageRelate`, and image/body block semantics.
|
||||
- Renderer post-processing now strips those markers and applies real attributes before fragment-offset extraction, so semantic metadata is preserved without breaking the existing offset contract.
|
||||
|
||||
## Verification
|
||||
|
||||
- `build_sim` for `ReadViewDemo` on iOS Simulator succeeded on 2026-05-22.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
phase: 7
|
||||
plan: 07-02
|
||||
status: complete
|
||||
requirements-completed:
|
||||
- ATTR-01
|
||||
- ATTR-02
|
||||
- ATTR-03
|
||||
updated: 2026-05-22
|
||||
---
|
||||
|
||||
# 07-02 Summary
|
||||
|
||||
- Taught `RDEPUBTextLayouter` to consume semantic hints and emit `semanticBoundary` breaks when explicit page-break or avoid-break rules should influence pagination.
|
||||
- Expanded page metadata and layout frames to retain block kinds, semantic hints, and attachment placements alongside the existing attachment and break diagnostics.
|
||||
- Propagated the richer pagination diagnostics through `RDEPUBTextBookBuilder` and `RDPlainTextBookBuilder`, so chapter summaries can now explain attachment-heavy and block-sensitive pagination behavior.
|
||||
|
||||
## Verification
|
||||
|
||||
- `build_sim` for `ReadViewDemo` on iOS Simulator succeeded on 2026-05-22.
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
phase: 7
|
||||
plan: 07-03
|
||||
status: complete
|
||||
requirements-completed:
|
||||
- ATTR-01
|
||||
- ATTR-02
|
||||
- ATTR-03
|
||||
updated: 2026-05-22
|
||||
---
|
||||
|
||||
# 07-03 Summary
|
||||
|
||||
- Added reusable semantic diagnostic summaries on `RDEPUBTextBookBuilder` and `RDEPUBReaderController` for the native text path.
|
||||
- Updated `ReadViewDemo` startup validation to prioritize a Phase 7 semantic-closure line and a pagination line from native reflowable samples.
|
||||
- Verified the simulator runtime log now surfaces explicit semantic evidence for a real sample book, rather than only generic sample-matrix output.
|
||||
|
||||
## Verification
|
||||
|
||||
- `build_run_sim` for `ReadViewDemo` on iPhone 17 (iOS 26.5 simulator) succeeded on 2026-05-22.
|
||||
- Runtime log included `属性闭环诊断:宝山辽墓材料与释读 · 章节 10 · block kinds [attachment,paragraph] · placements [inline,centered] · block kinds: attachment`.
|
||||
- Runtime log included `分页诊断:宝山辽墓材料与释读 · 章节 10 · attachment 页 54 · semantic break 页 57 · block kinds [attachment,paragraph] · placements [inline,centered] · reasons [attachmentBoundary:31, blockBoundary:26, frameLimit:17, chapterEnd:4] · page break: blockBoundary`.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
phase: 7
|
||||
status: passed
|
||||
requirements-verified:
|
||||
- ATTR-01
|
||||
- ATTR-02
|
||||
- ATTR-03
|
||||
updated: 2026-05-22
|
||||
---
|
||||
|
||||
# Phase 7 Verification
|
||||
|
||||
## Result
|
||||
|
||||
Passed.
|
||||
|
||||
## What Was Verified
|
||||
|
||||
- HTML/CSS pagination semantics now survive the native text pipeline as explicit attributed-string metadata.
|
||||
- Paginator and page metadata consume those semantics and expose them in break reasons and diagnostics.
|
||||
- Demo startup validation surfaces semantic-closure evidence for a native reflowable sample book.
|
||||
|
||||
## Evidence
|
||||
|
||||
- `build_sim` for `ReadViewDemo` succeeded after the semantic extraction and layouter-consumption changes.
|
||||
- `build_run_sim` for `ReadViewDemo` succeeded on iPhone 17 (iOS 26.5 simulator).
|
||||
- Runtime log surfaced:
|
||||
- `属性闭环诊断:宝山辽墓材料与释读 · 章节 10 · block kinds [attachment,paragraph] · placements [inline,centered] · block kinds: attachment`
|
||||
- `分页诊断:宝山辽墓材料与释读 · 章节 10 · attachment 页 54 · semantic break 页 57 · block kinds [attachment,paragraph] · placements [inline,centered] · reasons [attachmentBoundary:31, blockBoundary:26, frameLimit:17, chapterEnd:4] · page break: blockBoundary`
|
||||
|
||||
## Residual Risk
|
||||
|
||||
- Current semantic extraction is intentionally conservative and heuristic-driven; future EPUB variants may require additional tag/class/style mappings in Phase 8.
|
||||
- The sample evidence currently proves attachment and paragraph semantics clearly; richer code/list/table/blockquote samples should continue to be exercised as later phases tighten quality and automation.
|
||||
|
||||
Reference in New Issue
Block a user