2026-05-25 00:51:52 +08:00
|
|
|
|
# 3-20 Browser Runtime 后续收口 Checklist v1
|
|
|
|
|
|
|
|
|
|
|
|
> 创建时间:2026-05-25
|
|
|
|
|
|
> 状态:`process`
|
|
|
|
|
|
> 来源:承接 `design/03-rust-web/done/3-19-rust-web-browser-runtime-module-extraction-v1.md` 的后续未专项完成项。
|
|
|
|
|
|
|
|
|
|
|
|
## 1. 目标
|
|
|
|
|
|
|
2026-05-25 01:06:37 +08:00
|
|
|
|
在 `3-19` 已归档的基础上,继续把仍留在 Rust inline / 主壳大 runtime 中的浏览器行为切成可审计模块。Codex 维护本文件作为事实源,Reasonix 只承接短批次审计、窄范围实现或浏览器 smoke;每批最多 2 个 worker。
|
2026-05-25 00:51:52 +08:00
|
|
|
|
|
|
|
|
|
|
## 2. 本轮边界
|
|
|
|
|
|
|
|
|
|
|
|
本轮优先处理:
|
|
|
|
|
|
|
|
|
|
|
|
- 主壳 filetree keyboard / clipboard / DND / context menu DOM 后续切片。
|
|
|
|
|
|
- document pane host adapter / document session / conflict panel runtime 只读审计。
|
|
|
|
|
|
- 本地上传主流程剩余边界审计,包括 `uploadFileToMediaAsset`、`uploadFilesWithResolvedTarget`、`insertUploadedAssetIntoEditor`。
|
|
|
|
|
|
- WS / SSE tree live 浏览器回归 smoke。
|
|
|
|
|
|
|
|
|
|
|
|
本轮不处理:
|
|
|
|
|
|
|
|
|
|
|
|
- Tiptap 编辑器内部命令、history、selection overlay;这些归 `5-29`。
|
|
|
|
|
|
- Rust kernel tree command 语义重写。
|
|
|
|
|
|
- Page AI panel 外置化;需要另起 `07-ai` 设计。
|
|
|
|
|
|
|
|
|
|
|
|
## 3. Batch A 候选任务
|
|
|
|
|
|
|
|
|
|
|
|
- [ ] Worker A:只读审计 document pane host adapter。
|
|
|
|
|
|
- 目标:列出 `web_shell.rs` 中 document pane host / session / conflict panel 可迁模块、风险和 smoke。
|
|
|
|
|
|
- 输出:候选模块表、禁止迁入 editor runtime 的边界、下一刀建议。
|
|
|
|
|
|
- [ ] Worker B:只读审计 local upload 主流程。
|
|
|
|
|
|
- 目标:复核上传主流程剩余函数是否可从 `SIDEBAR_TREE_JS` 拆入 `local-upload-runtime.js`,不得改变资源归属语义。
|
|
|
|
|
|
- 输出:函数归属表、不可迁项、必须保留的 smoke。
|
|
|
|
|
|
- [ ] Worker C:只读审计 filetree keyboard / clipboard / DND。
|
|
|
|
|
|
- 目标:基于已落地 `filetree-runtime.js` / `filetree-selection-runtime.js` / `filetree-context-menu-runtime.js`,给出下一刀最小实现范围。
|
|
|
|
|
|
- 输出:建议只迁纯 helper 还是 DOM listener,列出冲突文件。
|
|
|
|
|
|
- [ ] Worker D:浏览器 smoke 审计 WS / SSE tree live。
|
|
|
|
|
|
- 目标:只读验证主壳 tree live 外置 runtime 在浏览器中仍加载,记录 WS 正常路径和 SSE fallback 的可测性。
|
|
|
|
|
|
- 输出:截图、console/network、result.json;不修改源码。
|
|
|
|
|
|
|
|
|
|
|
|
## 4. 验收命令
|
|
|
|
|
|
|
|
|
|
|
|
按具体切片选择:
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
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 filetree
|
|
|
|
|
|
cargo test --manifest-path rust/Cargo.toml -p mnote-web runtime
|
|
|
|
|
|
node scripts/task487-local-folder-tree-live-consumer-smoke.js
|
|
|
|
|
|
node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
UI / 浏览器可见项必须有真实浏览器截图或结构化 smoke 证据。
|
|
|
|
|
|
|
|
|
|
|
|
## 5. 采纳规则
|
|
|
|
|
|
|
|
|
|
|
|
- Reasonix 结果必须先查 Hindsight `reasonix` recall,再读 `process-handoff.md/json`、`result.json`、diff 和验证证据。
|
|
|
|
|
|
- 只采纳限定文件范围内的最小 diff;越界重构、回滚用户改动、修改 git 状态的一律拒绝。
|
|
|
|
|
|
- browser smoke worker 必须 `modified_files=[]`。
|
|
|
|
|
|
- 本文件只记录真实完成项;未验证项保持未勾选。
|
|
|
|
|
|
|
|
|
|
|
|
## 6. 本轮执行记录
|
|
|
|
|
|
|
|
|
|
|
|
- 2026-05-25:Codex 创建本续跑事实源。
|
2026-05-25 01:22:26 +08:00
|
|
|
|
- 2026-05-25:修正执行约束:本文件遵循当前 goal 的“每批最多 2 个 worker”;实现 worker 必须在独立 worktree 产出候选 patch,Codex 复核后再选择性合入。
|
2026-05-25 00:51:52 +08:00
|
|
|
|
- 2026-05-25:下一批只派发 Worker B(local upload / filetree 下一刀只读审计);Worker A/C/D 暂缓。
|
2026-05-25 00:57:52 +08:00
|
|
|
|
- 2026-05-25:Reasonix local upload / filetree 只读审计尝试未产生 `result.json` / `process-handoff`,且运行期间出现额外 Batch A2 runner,主控已终止进程;该结果不作为正式 handoff 采纳。
|
|
|
|
|
|
- 可参考的 transcript 结论:`fetchWithTimeout` 是低风险纯工具函数,可先迁入 `local-upload-runtime.js`;`uploadFileToMediaAsset` / `uploadFilesWithResolvedTarget` / `insertUploadedAssetIntoEditor` 仍与 API、editor 插入和 snapshot refresh 耦合,暂不迁。
|
|
|
|
|
|
- 2026-05-25:Codex 主控直接完成低风险切片:`local-upload-runtime.js` 新增并导出 `fetchWithTimeout`,`layout.rs` 的 inline `fetchWithTimeout` 先委托 runtime,保留原 fallback。
|
|
|
|
|
|
- 修改:`rust/crates/mnote-web/browser/local-upload-runtime.js`、`rust/crates/mnote-web/src/ssr/pages/layout.rs`。
|
|
|
|
|
|
- 已验证:`node --check rust/crates/mnote-web/browser/local-upload-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`、`cargo test --manifest-path rust/Cargo.toml -p mnote-web local_upload_runtime_contains_editor_upload_context_helpers -- --test-threads=1`。
|
|
|
|
|
|
- 未完成:`insertUploadedAssetIntoEditor`、`uploadFileToMediaAsset`、`uploadFilesWithResolvedTarget` 仍未迁出。
|
2026-05-25 01:13:08 +08:00
|
|
|
|
- 2026-05-25:Codex 主控继续完成 local upload API 小切片:`local-upload-runtime.js` 新增并导出 `uploadLocalFolderAsset`,承接本地上传 FormData 构造、`/api/local-folder/assets/upload` 请求和响应解析;`layout.rs` 仍负责 editor 插入、sidebar snapshot refresh 和 `wolai:local-assets-changed` 事件。
|
|
|
|
|
|
- 修改:`rust/crates/mnote-web/browser/local-upload-runtime.js`、`rust/crates/mnote-web/src/ssr/pages/layout.rs`。
|
|
|
|
|
|
- 已验证:`node --check rust/crates/mnote-web/browser/local-upload-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 local_upload_runtime_contains_editor_upload_context_helpers -- --test-threads=1`、`cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_upload_runtime_routes_local_markdown_assets_to_local_folder -- --test-threads=1`、`node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js`。
|
|
|
|
|
|
- 未完成:`insertUploadedAssetIntoEditor`、`uploadFileToMediaAsset` 编排壳、`uploadFilesWithResolvedTarget` 仍未迁出。
|
|
|
|
|
|
- 2026-05-25:采纳并复核额外 Reasonix 候选 patch:新增 `document-conflict-panel-runtime.js`,把 document session conflict panel 的纯 DOM 清理 helper `clearSessionConflictSurface` 外置;inline adapter 保留 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`。
|
|
|
|
|
|
- 已验证:`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`。
|
|
|
|
|
|
- 未完成:conflict merge / accept / keep 业务逻辑、document session lifecycle、secondary pane conflict smoke 仍未迁出。
|
2026-05-25 01:22:26 +08:00
|
|
|
|
- 2026-05-25:Worker D(`insertUploadedAssetIntoEditor` 外置)两次在独立 worktree `/mnt/Data1T/mnote-worktrees/0525-a2-upload-insert-current` 重新派发,均未产出可采纳 diff。
|
|
|
|
|
|
- `reasonix-2026-05-24T17-07-59-638Z-29274a46` 产生 handoff,但内容串到 Worker B 的 block menu 任务,worktree 无 diff,拒绝采纳。
|
|
|
|
|
|
- `reasonix-2026-05-24T17-12-41-044Z-25b9d5d7` 仅产生 `prompt.md` / `memory-recall.json` / `reasonix-transcript.jsonl`,无 `final.md`、`result.json`、`process-handoff.md/json`,worktree 无 diff,拒绝采纳。
|
|
|
|
|
|
- 该项保持未完成;下一刀应进一步缩窄为只迁 editor 插入 DOM 拼接中的一个纯 helper,或由 Codex 本地实现后再交 Reasonix 做浏览器 smoke。
|
2026-05-25 01:28:15 +08:00
|
|
|
|
- 2026-05-25:Codex 主控完成 `insertUploadedAssetIntoEditor` 外置切片:`local-upload-runtime.js` 新增并导出 `insertUploadedAssetIntoEditor(asset, targetRoot, deps)`,`layout.rs` 优先委托 runtime,保留完整 inline fallback。
|
|
|
|
|
|
- 修改:`rust/crates/mnote-web/browser/local-upload-runtime.js`、`rust/crates/mnote-web/src/ssr/pages/layout.rs`。
|
|
|
|
|
|
- 已验证:`node --check rust/crates/mnote-web/browser/local-upload-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 local_upload_runtime_contains_editor_upload_context_helpers -- --test-threads=1`、`cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_upload_runtime_routes_local_markdown_assets_to_local_folder -- --test-threads=1`、`node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js`。
|
|
|
|
|
|
- 未完成:`uploadFileToMediaAsset` 编排壳、`uploadFilesWithResolvedTarget`、conflict merge / accept / keep 业务逻辑、secondary pane conflict smoke 仍未迁出。
|
2026-05-25 01:48:38 +08:00
|
|
|
|
- 过程说明:Worker D3(`reasonix-2026-05-24T17-22-29-925Z-9b7b6dd4`)未产出可采纳 handoff 或 diff;最终由 Codex 独立实现、验证通过后合入。
|
2026-05-25 01:35:19 +08:00
|
|
|
|
- 2026-05-25:Codex 主控完成 document conflict panel 第二刀:`document-conflict-panel-runtime.js` 新增并导出 `createSessionConflictPanel(session, message, deps)`,只负责冲突面板 DOM 创建和按钮回调 wiring;`web_shell.rs` 仍持有 `acceptDiskVersion`、`keepCurrentEditorVersion`、`openConflictDiffPanel` 等业务逻辑,并保留完整 inline fallback。
|
|
|
|
|
|
- 修改:`rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`、`rust/crates/mnote-web/src/routes/web_shell.rs`。
|
|
|
|
|
|
- 已验证:`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 document_conflict_panel_runtime_contains_dom_helpers -- --test-threads=1`、`cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1`。
|
|
|
|
|
|
- 未完成:conflict merge / accept / keep 业务逻辑、document session lifecycle、secondary pane conflict smoke 仍未迁出;本轮未声称真实冲突 UI 全链路完成。
|
2026-05-25 01:48:38 +08:00
|
|
|
|
- 2026-05-25:根据用户纠正,后续实现 worker 不能在主工作区直接修改;每批最多 2 个 worker,且必须采用独立 worktree 候选 patch或明确只读任务。Codex 读取 Hindsight recall、`process-handoff.md/json`、`result.json`、diff 与验证证据后再选择性合入。
|