# Batch C Worker A:Resource Open Resolver 最小收敛 项目根目录:`/mnt/Data1T/mnote` 你不是单独在代码库里工作,可能有其他 worker 并行执行。不要回滚、覆盖或格式化与你任务无关的文件;不要提交 git。 ## 背景 Batch B 中 `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md` 仍未完成。当前重复判断主要涉及: - `rust/crates/mnote-web/src/ssr/pages/layout.rs` - `buildLocalOnlyOfficeOpenUrl` - `openEditorAttachmentEditTab` - `openEditorAttachmentNewWindow` - `openConvexAssetFromFileTree` - `rust/crates/mnote-web/src/routes/web_shell.rs` - `resolveResourceOpen` 本次优先只改 `layout.rs` 和 `scripts/task463-onlyoffice-resolver-smoke.js`,不要大重构。 ## 目标 1. 审查正文附件和 FileTree asset 打开 office/resource 时的重复判断。 2. 如果安全,抽出最小 helper,使正文附件“弹窗编辑”与 FileTree active tab 打开共用同一套 local Office URL 构造或打开目标判断。 3. 保持现有行为: - 正文附件“弹窗编辑”进入主编辑器 resource tab。 - 正文附件“新窗口编辑”进入浏览器新窗口。 - md/text/code 继续走 tiptap/text/code 渲染路径,不改成 OnlyOffice 或新窗口默认打开。 4. 更新 `5-26` checklist 的执行记录;通过后可勾选已完成项。 ## 允许修改范围 - `rust/crates/mnote-web/src/ssr/pages/layout.rs` - `scripts/task463-onlyoffice-resolver-smoke.js` - `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md` - 可新增 `.codex/reasonix-tasks/results/batch-c-worker-a-resource-open-resolver.md` 禁止修改: - OnlyOffice callback / 保存链路 - `rust/crates/mnote-web/src/routes/web_shell.rs`,除非只改测试断言注释且非常必要 - 其它 worker ownership 文件 ## 验收命令 ```bash cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1 node --check scripts/task463-onlyoffice-resolver-smoke.js ``` 如果 `http://127.0.0.1:3000` 可用,再运行: ```bash node scripts/task463-onlyoffice-resolver-smoke.js ``` ## 输出要求 最终写入 `.codex/reasonix-tasks/results/batch-c-worker-a-resource-open-resolver.md`,包含: - 修改文件列表。 - 实际收敛了哪些重复判断。 - 验证命令和结果。 - 未完成项和风险。