Files
mnote/design/05-editor-mainline/process/5-29-editor-runtime-followup-checklist-v1.md
T

6.0 KiB
Raw Blame History

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 候选任务

  • Worker A:实现 dom_selection.rs 第一刀。
    • 允许修改:rust/spikes/leptos-tiptap-spike/src/lib.rsrust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs、新增 rust/spikes/leptos-tiptap-spike/src/editor_runtime/dom_selection.rs
    • 目标函数:active_editor_text_selectionselection_summaryhas_active_text_selectionselection_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_contentapply_html_updateapply_document_update 的用户触发链路,列出可迁 Tiptap command/transaction 的候选。
    • 输出:风险表和建议 RED smoke。
  • Worker D:浏览器 smoke 审计 editor runtime 基线。
    • 目标:只读运行或复核 task488task489task479,截图/结果证明附件删除和块菜单删除 undo/redo 仍可用。
    • 输出:result.json、截图、console/network;不修改源码。

4. 验收命令

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/jsonresult.json、diff 和验证证据。
  • 实现 worker 只能改允许范围;只读和 smoke worker 必须没有源码 diff。
  • lib.rs 不能新增附件/history/DOM bridge 大块逻辑。
  • 本文件只记录真实完成项;未验证项保持未勾选。

6. 本轮执行记录

  • 2026-05-25Codex 创建本续跑事实源。
  • 2026-05-25Worker A 未继续派发;Codex 主控已在主工作区完成 dom_selection.rs 第一刀并提交 c7ab4e56 refactor: extract editor dom selection runtime
    • 已迁函数:node_is_within_rootactive_editor_text_selectionhas_active_text_selectionselection_summaryselection_has_rich_marks
    • 未迁:SelectionPayloadselection_payloadsend_selection_state*selection_event_payload,原因是仍依赖 bridge event、HoveredBlockState 和 runtime block id 边界。
    • 已验证:cargo fmt --manifest-path rust/Cargo.toml --all --checkcargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml、wasm release build、wasm-bindgentask488task489、CodeGraph pending 0。
  • 2026-05-25:执行口径修正:继续遵循当前 goal 的“每批最多 2 个 worker”;Reasonix 后续必须使用独立 worktree 或明确只读任务,完成后由 Codex 读取 handoff 并复核。
  • 2026-05-25Reasonix runner 异常:后续实现 run 未写 result.jsonprocess-handoff.md/json,部分 transcript 停在工具调用阶段;Codex 不采纳其文字结论,只复核实际 diff。
  • 2026-05-25Reasonix overlay / block menu 只读审计尝试未产生 result.json / process-handoff,且运行期间出现额外 Batch A2 runner,主控已终止进程;该结果不作为正式 handoff 采纳。
    • transcript 只显示探索过程,未形成函数归属表;下一次应改为更窄的单问题只读任务,例如只审计 floating_toolbar_anchor_from_selection / sync_text_selection_overlay 能否迁入 overlays.rs
  • 2026-05-25Codex 主控直接完成 overlay 第一刀:新增 editor_runtime/overlays.rs,迁出 FloatingToolbarAnchorfloating_toolbar_anchor_from_selectionsync_text_selection_overlay
    • 未迁:sync_editor_overlay_state / try_sync_editor_overlay_state,原因是仍依赖 HoveredBlockState、slash/block menu signal 和 overlay 关闭策略。
    • 已验证:cargo fmt --manifest-path rust/Cargo.toml --all --checkcargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml、wasm release build、wasm-bindgennode scripts/task488-local-attachment-link-delete-undo-smoke.jsnode scripts/task489-block-menu-delete-undo-smoke.js
    • 运行中再次出现额外 Batch A2 Reasonix runner,主控已终止;这些 runner 未作为本批证据。