refactor: extract block dnd handle predicate

This commit is contained in:
lix-2026
2026-05-25 06:09:42 +08:00
parent 4d08b69d2e
commit 6017a0ad7c
6 changed files with 70 additions and 13 deletions
@@ -206,3 +206,9 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 修改:`rust/spikes/leptos-tiptap-spike/src/lib.rs`、generated island wasm。
- 当前执行约束同步修正:`3-20` / `5-29` checklist 均保持“当前 goal 下每批最多 2 个 worker”。
- 已验证:`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``MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3001 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js``MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3001 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js``MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3001 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js``codegraph sync .``codegraph status . --json` pending 0。
- 2026-05-25Batch X 计划只派发 1 个只读 Reasonix worker 审计 block DnD DOM 边界,任务书 `.codex/reasonix-tasks/2026-05-25-batch-x-worker-a-5-29-dnd-dom-readonly.md`worktree `/mnt/Data1T/mnote-worktrees/0525-x-worker-a-5-29-dnd-dom-readonly`
- 派发异常:启动本只读 worker 后,又出现未由主控批准的 Worker A/B/C/D runner 与 ACP 进程,超过当前 goal 的“每批最多 2 个 worker”;主控已终止全部 `reasonix-coding-runner` / `reasonix acp` / `reasonix/dist/cli/index.js acp` 进程,本批不采纳任何 Reasonix 输出。
- Codex 主控改为本地最小机械切片:`editor_runtime/block_dnd.rs` 新增 `element_within_handle_shell(element, handle_selector)`,只封装 handle-shell DOM predicate`lib.rs``hovered_block_from_target`、editor stage click / mousemove / dragover 调用点改为委托该 helper。
- 未迁:`hovered_block_from_target``drop_indicator_from_target``drop_indicator_from_point`、拖拽 listener、block reorder 行为和 DOM -> block 状态解析链仍留在 `lib.rs`
- 修改:`rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_dnd.rs``rust/spikes/leptos-tiptap-spike/src/lib.rs`
- 已验证:`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``MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3001 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js``MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3001 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js``MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3001 NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js``git diff --check``codegraph sync .``codegraph status . --json` pending 0。