71 lines
4.5 KiB
Markdown
71 lines
4.5 KiB
Markdown
# 5-29 Editor Runtime 后续收口 Checklist v1
|
||||
|
|
|
|||
|
|
> 创建时间:2026-05-25
|
|||
|
|
> 状态:`process`
|
|||
|
|
> 来源:承接 `design/05-editor-mainline/done/5-28-leptos-tiptap-editor-runtime-module-extraction-v1.md` 的后续未专项完成项。
|
|||
|
|
|
|||
|
|
## 1. 目标
|
|||
|
|
|
|||
|
|
在 `5-28` 已完成附件链接、history-safe delete、command sync、persistence、attachment upload intent 首批拆分后,继续把 editor runtime 的 selection / overlay / block menu / mindmap node view 切成可索引模块。Codex 维护本文件作为事实源,Reasonix 只做短批次审计、窄范围实现或浏览器 smoke。
|
|||
|
|
|
|||
|
|
## 2. 本轮边界
|
|||
|
|
|
|||
|
|
本轮优先处理:
|
|||
|
|
|
|||
|
|
- `editor_runtime/dom_selection.rs` 第一刀。
|
|||
|
|
- overlay / block menu 后续切片的只读审计。
|
|||
|
|
- 仍使用 HTML 整文替换的用户编辑路径风险复核,例如块手柄拖拽重排和复制副本。
|
|||
|
|
- `task488` / `task489` / `task479` 作为回归基线。
|
|||
|
|
|
|||
|
|
本轮不处理:
|
|||
|
|
|
|||
|
|
- shell host resource open / local upload 落盘语义;这些归 `3-20`。
|
|||
|
|
- Page AI 流式 apply / review session。
|
|||
|
|
- mindmap 事实源重构;本轮最多审计 node view 拆分边界。
|
|||
|
|
|
|||
|
|
## 3. Batch A 候选任务
|
|||
|
|
|
|||
|
|
- [x] Worker A:实现 `dom_selection.rs` 第一刀。
|
|||
|
|
- 允许修改:`rust/spikes/leptos-tiptap-spike/src/lib.rs`、`rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`、新增 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/dom_selection.rs`。
|
|||
|
|
- 目标函数:`active_editor_text_selection`、`selection_summary`、`has_active_text_selection`、`selection_has_rich_marks`,以及必要的 selection payload helper。
|
|||
|
|
- 禁止:迁出 block menu DOM、overlay state、host bridge、resource open。
|
|||
|
|
- [ ] Worker B:只读审计 overlay / block menu 拆分。
|
|||
|
|
- 目标:列出强依赖 Leptos signal 的函数,判断是否先抽 context struct 或先迁纯 helper。
|
|||
|
|
- 输出:下一刀最小实现范围和 smoke 建议。
|
|||
|
|
- [ ] Worker C:只读审计剩余 HTML 整文替换用户编辑路径。
|
|||
|
|
- 目标:查 `set_content`、`apply_html_update`、`apply_document_update` 的用户触发链路,列出可迁 Tiptap command/transaction 的候选。
|
|||
|
|
- 输出:风险表和建议 RED smoke。
|
|||
|
|
- [ ] Worker D:浏览器 smoke 审计 editor runtime 基线。
|
|||
|
|
- 目标:只读运行或复核 `task488`、`task489`、`task479`,截图/结果证明附件删除和块菜单删除 undo/redo 仍可用。
|
|||
|
|
- 输出:result.json、截图、console/network;不修改源码。
|
|||
|
|
|
|||
|
|
## 4. 验收命令
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
|||
|
|
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
|||
|
|
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
|||
|
|
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
|||
|
|
node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
|||
|
|
node scripts/task489-block-menu-delete-undo-smoke.js
|
|||
|
|
node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据。
|
|||
|
|
|
|||
|
|
## 5. 采纳规则
|
|||
|
|
|
|||
|
|
- Reasonix 结果必须先查 Hindsight `reasonix` recall,再读 `process-handoff.md/json`、`result.json`、diff 和验证证据。
|
|||
|
|
- 实现 worker 只能改允许范围;只读和 smoke worker 必须没有源码 diff。
|
|||
|
|
- `lib.rs` 不能新增附件/history/DOM bridge 大块逻辑。
|
|||
|
|
- 本文件只记录真实完成项;未验证项保持未勾选。
|
|||
|
|
|
|||
|
|
## 6. 本轮执行记录
|
|||
|
|
|
|||
|
|
- 2026-05-25:Codex 创建本续跑事实源。
|
|||
|
|
- 2026-05-25:Worker A 未继续派发;Codex 主控已在主工作区完成 `dom_selection.rs` 第一刀并提交 `c7ab4e56 refactor: extract editor dom selection runtime`。
|
|||
|
|
- 已迁函数:`node_is_within_root`、`active_editor_text_selection`、`has_active_text_selection`、`selection_summary`、`selection_has_rich_marks`。
|
|||
|
|
- 未迁:`SelectionPayload`、`selection_payload`、`send_selection_state*`、`selection_event_payload`,原因是仍依赖 bridge event、`HoveredBlockState` 和 runtime block id 边界。
|
|||
|
|
- 已验证:`cargo fmt --manifest-path rust/Cargo.toml --all --check`、`cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml`、wasm release build、`wasm-bindgen`、`task488`、`task489`、CodeGraph pending 0。
|
|||
|
|
- 2026-05-25:下一批只派发 Worker B(overlay / block menu 只读审计);Worker C/D 暂缓,避免超过每批最多 2 个 worker 的 goal 约束。
|