refactor: extract block menu html helpers

This commit is contained in:
lix-2026
2026-05-25 01:22:26 +08:00
parent ac15424328
commit a4e50c1d19
7 changed files with 136 additions and 94 deletions
@@ -63,7 +63,7 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
## 6. 本轮执行记录
- 2026-05-25Codex 创建本续跑事实源。
- 2026-05-25:修正执行约束:本文件遵循当前 goal 的“每批最多 2 个 worker”,不再沿用早期草稿中的 4 worker 并行方案
- 2026-05-25:修正执行约束:本文件遵循当前 goal 的“每批最多 2 个 worker”;实现 worker 必须在独立 worktree 产出候选 patchCodex 复核后再选择性合入
- 2026-05-25:下一批只派发 Worker Blocal upload / filetree 下一刀只读审计);Worker A/C/D 暂缓。
- 2026-05-25Reasonix local upload / filetree 只读审计尝试未产生 `result.json` / `process-handoff`,且运行期间出现额外 Batch A2 runner,主控已终止进程;该结果不作为正式 handoff 采纳。
- 可参考的 transcript 结论:`fetchWithTimeout` 是低风险纯工具函数,可先迁入 `local-upload-runtime.js``uploadFileToMediaAsset` / `uploadFilesWithResolvedTarget` / `insertUploadedAssetIntoEditor` 仍与 API、editor 插入和 snapshot refresh 耦合,暂不迁。
@@ -79,3 +79,7 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 修改:`rust/crates/mnote-web/browser/document-conflict-panel-runtime.js``rust/crates/mnote-web/src/routes/web_shell.rs``rust/crates/mnote-web/src/routes/mod.rs`
- 已验证:`node --check rust/crates/mnote-web/browser/document-conflict-panel-runtime.js``cargo fmt --manifest-path rust/Cargo.toml --all --check``cargo check --manifest-path rust/Cargo.toml -p mnote-web``cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1`
- 未完成:conflict merge / accept / keep 业务逻辑、document session lifecycle、secondary pane conflict smoke 仍未迁出。
- 2026-05-25Worker D`insertUploadedAssetIntoEditor` 外置)两次在独立 worktree `/mnt/Data1T/mnote-worktrees/0525-a2-upload-insert-current` 重新派发,均未产出可采纳 diff。
- `reasonix-2026-05-24T17-07-59-638Z-29274a46` 产生 handoff,但内容串到 Worker B 的 block menu 任务,worktree 无 diff,拒绝采纳。
- `reasonix-2026-05-24T17-12-41-044Z-25b9d5d7` 仅产生 `prompt.md` / `memory-recall.json` / `reasonix-transcript.jsonl`,无 `final.md``result.json``process-handoff.md/json`worktree 无 diff,拒绝采纳。
- 该项保持未完成;下一刀应进一步缩窄为只迁 editor 插入 DOM 拼接中的一个纯 helper,或由 Codex 本地实现后再交 Reasonix 做浏览器 smoke。
@@ -75,3 +75,8 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 未迁:`sync_editor_overlay_state` / `try_sync_editor_overlay_state`,原因是仍依赖 `HoveredBlockState`、slash/block menu signal 和 overlay 关闭策略。
- 已验证:`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``node scripts/task488-local-attachment-link-delete-undo-smoke.js``node scripts/task489-block-menu-delete-undo-smoke.js`
- 运行中再次出现额外 Batch A2 Reasonix runner,主控已终止;这些 runner 未作为本批证据。
- 2026-05-25:采纳并复核 Worker B 候选 patch:新增 `editor_runtime/block_menu_legacy_html.rs`,迁出 `duplicate_top_level_block_html``reorder_top_level_block_html``lib.rs` 仅保留调用点和 `DropPlacement``pub(crate)` 可见性。
- Reasonix run`reasonix-2026-05-24T17-07-59-603Z-bfe72d77`,已读取 Hindsight recall、`process-handoff.md/json`、diff,并由 Codex 独立复核。
- Codex 合入时保持实现逻辑同构,仅收口模块边界和 checklist 事实记录。
- 已验证:`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``node scripts/task488-local-attachment-link-delete-undo-smoke.js``node scripts/task489-block-menu-delete-undo-smoke.js`
- 未完成:HTML 整文替换仍是 legacy 路径,后续要用 history-safe Tiptap command 替换;`sync_editor_overlay_state`、block menu signal 仍未拆出。