refactor: extract editor overlay helpers

This commit is contained in:
lix-2026
2026-05-25 01:06:37 +08:00
parent e1484f4cc0
commit 7975ce0997
7 changed files with 52 additions and 40 deletions
@@ -6,7 +6,7 @@
## 1. 目标
`3-19` 已归档的基础上,继续把仍留在 Rust inline / 主壳大 runtime 中的浏览器行为切成可审计模块。Codex 维护本文件作为事实源,Reasonix 只承接短批次审计、窄范围实现或浏览器 smoke;每批最多 4 个 worker。
`3-19` 已归档的基础上,继续把仍留在 Rust inline / 主壳大 runtime 中的浏览器行为切成可审计模块。Codex 维护本文件作为事实源,Reasonix 只承接短批次审计、窄范围实现或浏览器 smoke;每批最多 2 个 worker。
## 2. 本轮边界
@@ -67,7 +67,11 @@ UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据
- 已迁函数:`node_is_within_root``active_editor_text_selection``has_active_text_selection``selection_summary``selection_has_rich_marks`
- 未迁:`SelectionPayload``selection_payload``send_selection_state*``selection_event_payload`,原因是仍依赖 bridge event、`HoveredBlockState` 和 runtime block id 边界。
- 已验证:`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``task488``task489`、CodeGraph pending 0。
- 2026-05-25:执行口径修正:用户指出只读审计推进过慢,后续 B/C/D 应使用独立 worktree 产出候选 patch,而不是只读审计;每批最多 4 个 worker
- 2026-05-25:执行口径修正:继续遵循当前 goal 的“每批最多 2 个 worker”;Reasonix 后续必须使用独立 worktree 或明确只读任务,完成后由 Codex 读取 handoff 并复核
- 2026-05-25Reasonix runner 异常:后续实现 run 未写 `result.json``process-handoff.md/json`,部分 transcript 停在工具调用阶段;Codex 不采纳其文字结论,只复核实际 diff。
- 2026-05-25Reasonix overlay / block menu 只读审计尝试未产生 `result.json` / `process-handoff`,且运行期间出现额外 Batch A2 runner,主控已终止进程;该结果不作为正式 handoff 采纳。
- transcript 只显示探索过程,未形成函数归属表;下一次应改为更窄的单问题只读任务,例如只审计 `floating_toolbar_anchor_from_selection` / `sync_text_selection_overlay` 能否迁入 `overlays.rs`
- 2026-05-25Codex 主控直接完成 overlay 第一刀:新增 `editor_runtime/overlays.rs`,迁出 `FloatingToolbarAnchor``floating_toolbar_anchor_from_selection``sync_text_selection_overlay`
- 未迁:`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 未作为本批证据。