refactor: extract editor escape overlay close

This commit is contained in:
lix-2026
2026-05-25 03:48:58 +08:00
parent 3f8c7a1238
commit 50ed7456ca
5 changed files with 76 additions and 69 deletions
@@ -146,3 +146,9 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 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`
- 2026-05-25Batch M 按用户纠正尝试并行派发 3 个 Reasonix 实现 worker,均使用独立 worktreerun `reasonix-2026-05-24T19-40-19-806Z-81099224` 仅有 `prompt.md``memory-recall.json``reasonix-transcript.jsonl`,无 `final.md``result.json``process-handoff.md/json`,不采纳。
- 失败原因:Reasonix ACP 并发串线,transcript 出现读取非本 worker worktree 的行为;不满足 handoff 合同。
- 主控处置:不从 Batch M 合入任何 diff;改用 Batch N 的独立 worktree 子 agent worker 继续推进,仍由 Codex 复核 diff 和验证。
- 2026-05-25Batch N 继续收口 overlay escape 小切片:Codex 主控把 `close_editor_floating_overlays_if_escape` 机械迁入 `editor_runtime/overlays.rs``lib.rs` 仅保留调用和仍需壳层状态的 open / sync overlay 编排。
- 未迁:`try_sync_editor_overlay_state``on_selection_change``open_slash_menu_overlay` / `open_image_toolbar_overlay` / `open_block_menu_overlay`,原因是仍依赖 DOM event、toolbar lock、selection bridge 或 Leptos shell signal 编排。
- 已验证:`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`