refactor: extract block hover state types

This commit is contained in:
lix-2026
2026-05-25 02:34:01 +08:00
parent 6e8eacc929
commit 9d1ec75c6f
7 changed files with 63 additions and 39 deletions
@@ -103,4 +103,14 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 已验证:`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/task489-block-menu-delete-undo-smoke.js``node scripts/task488-local-attachment-link-delete-undo-smoke.js`
- 未完成:`sync_editor_overlay_state` / `try_sync_editor_overlay_state``HoveredBlockState` shared type、block menu signal 仍未拆出。
- 2026-05-25Batch E 计划继续采用独立 worktree 候选 patchWorker A 负责把 `HoveredBlockState``BlockMenuLayout``DropPlacement``DropIndicatorState` 迁入 `editor_runtime/block_hover_state.rs`,只做共享类型边界,不迁 DOM 查询、signal 编排或 block menu 行为。
- 2026-05-25Codex 独立复核并移植 Batch E Worker A 候选 diff:新增 `editor_runtime/block_hover_state.rs`,迁出 `HoveredBlockState``BlockMenuLayout``DropPlacement``DropIndicatorState``PendingDragState``lib.rs` 仍保留 DOM 查询、布局计算、signal 编排和 block menu 行为。
- Reasonix 协作证据:runner `reasonix-2026-05-24T18-25-26-836Z-aa546442` / `reasonix-2026-05-24T18-26-04-414Z-9476214d` 均仅产出 `prompt.md` / `memory-recall.json` / `reasonix-transcript.jsonl`,无 `final.md``result.json``process-handoff.md/json`;因此不作为完整 handoff 采纳。Codex 已查 Hindsight recall、核对 worktree diff,并拒绝移植 worktree 中未跟踪 `reference-code` symlink。
- 候选 worktree`/mnt/Data1T/mnote-worktrees/0525-e-worker-a-5-29-block-hover-state`
- 修改:`rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_hover_state.rs``rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs``rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_menu_document.rs``rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_menu_legacy_html.rs``rust/spikes/leptos-tiptap-spike/src/lib.rs`
- 已验证:`git diff --check``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/task489-block-menu-delete-undo-smoke.js``node scripts/task488-local-attachment-link-delete-undo-smoke.js`
- 未完成:`sync_editor_overlay_state` / `try_sync_editor_overlay_state`、block menu signal 编排、HTML 整文替换 legacy 路径仍未拆出。
- 2026-05-25Batch E 派发异常并终止:Worker A 任务被重复启动为两个 runner / ACP 进程(`reasonix-2026-05-24T18-25-26-836Z-aa546442``reasonix-2026-05-24T18-26-04-414Z-9476214d`),同一 worktree `/mnt/Data1T/mnote-worktrees/0525-e-worker-a-5-29-block-hover-state` 出现并发写入风险;Codex 已终止相关 Reasonix 进程,未读取到 `final.md``result.json``process-handoff.md/json`,该 diff 只保留为后续人工审计素材,不采纳。
- 2026-05-25Codex 独立复核并推进 block hover state 类型边界拆分:新增 `editor_runtime/block_hover_state.rs`,迁出 `HoveredBlockState``BlockMenuLayout``DropPlacement``DropIndicatorState``PendingDragState``lib.rs` 仍保留 DOM 查询、signal 编排、block menu 行为和拖拽逻辑。
- 修改:`rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_hover_state.rs``rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs``rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_menu_document.rs``rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_menu_legacy_html.rs``rust/spikes/leptos-tiptap-spike/src/lib.rs`、generated island wasm。
- 已验证:`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_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js``NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js`
- 未完成:`sync_editor_overlay_state` / `try_sync_editor_overlay_state`、block menu signal 和拖拽重排行为仍在 `lib.rs`,后续应继续按更窄 helper 拆分。