Files
mnote/.codex/reasonix-tasks/2026-05-25-batch-a2-worker-b-5-29-block-menu-html-helpers.md
T

46 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Reasonix Batch A2 / Worker B5-29 block menu legacy HTML helpers 实现
Project root`/mnt/Data1T/mnote-worktrees/0525-a2-block-menu-current`
## 目标
在独立 worktree 中产出候选 patch:把 `rust/spikes/leptos-tiptap-spike/src/lib.rs` 中 block menu 仍使用 HTML 整文替换的 legacy helper 抽到独立 editor runtime 模块,降低 `lib.rs` 体积,为后续 history-safe command 替换做准备。本批只做同构迁移,不改变用户行为。
## 允许修改
- `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/block_menu_legacy_html.rs`
如编译必须,可把 `DropPlacement` 或必要小 helper 调整为 `pub(crate)`;不要扩大到其它模块。
## 候选函数
- `duplicate_top_level_block_html`
- `reorder_top_level_block_html`
可以一起迁移其仅服务这两个函数的小型 DOM helper;不要迁移 overlay state、Leptos signal、`apply_html_update` 或 Tiptap command。
## 禁止事项
- 不实现新交互,不修 unrelated bug。
- 不改 shell / `mnote-web`
- 不修改设计文档、AGENTS、git 状态或提交。
- 不把 legacy HTML helper 标成 history-safe;模块名和注释必须表达它只是过渡 legacy 路径。
## 验收命令
```bash
cargo fmt --manifest-path rust/Cargo.toml --all --check
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
```
## 输出要求
handoff 必须列出:
- 修改文件和迁移函数。
- 是否改变任何用户行为,预期应为否。
- 仍未解决的 history 风险。
- 验收命令和结果。