# Reasonix Batch A2 / Worker C:3-20 document conflict panel runtime 第一刀 Project root:`/mnt/Data1T/mnote-worktrees/0525-a2-conflict-runtime-current` ## 目标 在独立 worktree 中产出候选 patch:新增 document conflict panel browser runtime 的第一刀,把 `clearSessionConflictSurface` 这类纯 DOM 清理 helper 外置到 `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`,并让 `web_shell.rs` 优先委托该 runtime,保留 inline fallback。 ## 允许修改 - `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js` - `rust/crates/mnote-web/src/routes/web_shell.rs` - `rust/crates/mnote-web/src/routes/mod.rs` 必要时只新增/调整 `web_shell.rs` 或 `routes/mod.rs` 中的字符串断言测试。 ## 实现要求 - 新增固定 asset route:`GET /api/mnote-browser-runtime/document-conflict-panel-runtime.js`,返回 `application/javascript; charset=utf-8`。 - 在 document shell 页面加载该 module,且不影响现有 editor island adapter inline module。 - `web_shell.rs` 中 `clearSessionConflictSurface(session)` 优先调用 `window.__mnoteDocumentConflictPanelRuntime.clearSessionConflictSurface(session, deps)`;runtime 不存在时执行原 inline fallback。 - 外置 runtime 只做 DOM 清理,不处理 conflict merge / accept / keep current 业务。 ## 禁止事项 - 不迁 Tiptap editor 内部命令。 - 不迁 Page AI panel。 - 不改变 conflict 状态机、保存接口、local-folder event channel。 - 不修改设计文档、AGENTS、git 状态或提交。 ## 验收命令 ```bash node --check rust/crates/mnote-web/browser/document-conflict-panel-runtime.js cargo fmt --manifest-path rust/Cargo.toml --all --check cargo check --manifest-path rust/Cargo.toml -p mnote-web cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1 ``` ## 输出要求 handoff 必须列出: - 修改文件。 - 新 route 和注入位置。 - 保留的 fallback。 - 验收命令和结果。 - 未覆盖风险。