refactor: extract block menu overlay close helper

This commit is contained in:
lix-2026
2026-05-25 03:41:19 +08:00
parent bf6cd19878
commit 3f8c7a1238
5 changed files with 36 additions and 29 deletions
@@ -134,7 +134,7 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 修改:`rust/spikes/leptos-tiptap-spike/src/lib.rs`、generated island `js/d.ts/wasm/wasm.d.ts`
- 已验证:在独立 worktree 中运行 `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` 均通过,结果分别位于 `/mnt/Data1T/mnote/tmp/task489-block-menu-delete-undo-smoke/result.json``/mnt/Data1T/mnote/tmp/task488-local-attachment-link-delete-undo-smoke/result.json`
- 未完成:`try_sync_editor_overlay_state``on_selection_change` overlay 同步、block menu signal 编排仍未迁出;本轮未扩大迁移边界。
- 2026-05-25:当前 goal 已收紧为每批最多 2 个 worker;后续 Batch 计划和 Reasonix 派发以 2 个为硬上限,历史记录中超过 2 个 worker 的批次只作为已发生事实保留,不作为后续口径
- 2026-05-25:当前 goal 明确为每批最多 2 个 worker;后续 Batch 计划和 Reasonix 派发以 2 个为硬上限,历史记录中超过 2 个 worker 的批次保留为异常记录
- 2026-05-25Batch K 只派发 1 个只读 Reasonix worker 审计 `close_editor_floating_overlays` 迁出边界,使用独立 worktree `/mnt/Data1T/mnote-worktrees/0525-k-5-29-close-overlays-readonly`run id `reasonix-2026-05-24T19-18-51-566Z-90f11977`,并显式使用 `--no-memory-recall` 降低任务串线风险。
- Codex 已读取 Hindsight recall、`process-handoff.md/json``result.json`,并核对 worktree `git status --short` / `git diff --stat` 为空。
- 审计结论:先把 `ImageToolbarAnchor``TableOverlayAnchor``TableSelectionKind``TableSelectionOverlayState` 迁入 `editor_runtime/overlays.rs`,再迁出纯 WriteSignal setter `close_editor_floating_overlays``close_editor_floating_overlays_if_escape``open_slash_menu_overlay``open_image_toolbar_overlay``open_block_menu_overlay``try_sync_editor_overlay_state``on_selection_change` overlay 同步继续留在 `lib.rs`
@@ -142,3 +142,7 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 修改:`rust/spikes/leptos-tiptap-spike/src/editor_runtime/overlays.rs``rust/spikes/leptos-tiptap-spike/src/lib.rs`、generated island `js/d.ts/wasm/wasm.d.ts`
- 已验证:`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`。主工作区 editor smoke 仍需复跑后再提交。
- 未完成:`try_sync_editor_overlay_state``on_selection_change` overlay 同步、block menu signal 编排、Escape 条件判断仍未迁出。
- 2026-05-25Batch L 派发 2 个只读 Reasonix workerWorker A `reasonix-2026-05-24T19-30-30-474Z-c3f28f20` 审计 5-29 overlay syncWorker B `reasonix-2026-05-24T19-30-30-509Z-18f62949` 审计 3-20 sidebar refresh;运行中又出现两个额外自动 runner,主控已终止,不采纳。
- Worker A handoff 出现任务串线迹象,final 同时讨论 3-20 和 5-29;Codex 只采纳其中由本地代码复核确认的 5-29 结论:`on_selection_change``try_sync_editor_overlay_state` 不能直接统一,因为 toolbar lock 语义不同。
- Codex 主控采纳最小机械切片:把 `try_close_block_menu_overlays` 迁入 `editor_runtime/overlays.rs``try_sync_editor_overlay_state``close_editor_floating_overlays_if_escape``on_selection_change` 仍留在 `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``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`