# 5-26 Resource Open Resolver Convergence Checklist v1 > 状态:done > > 日期:2026-05-21 > > Owner:resource open resolver / attachment and filetree open targets ## 1. 目标 继续参考 Sidex 的 editor input resolver 思路,把 MNote 正文附件、FileTree asset、side target、new-window 的资源打开策略收敛到更一致的 resolver 合同。 ## 2. 允许修改范围 - `rust/crates/mnote-web/src/ssr/pages/layout.rs` - `rust/crates/mnote-web/src/routes/web_shell.rs` 仅限提出 patch 建议,默认不直接修改,避免与 5-24/5-25 冲突。 - `scripts/task463-onlyoffice-resolver-smoke.js` ## 3. 禁止事项 - 不改变文件树当前已验证可用的 edit-mode active tab 行为。 - 不把 md/text/code 改成 OnlyOffice 或浏览器新窗口默认打开。 - 不把 resource kind 判断散回多个 UI 分支。 ## 4. Checklist - [x] 审查 `buildLocalOnlyOfficeOpenUrl`、`openEditorAttachmentEditTab`、`openConvexAssetFromFileTree` 与 `resolveResourceOpen` 的重复判断。 - [x] 给出最小收敛方案:提取 `openLocalOfficeFileInActiveTab(detail, mode)` helper,收敛 `openEditorAttachmentDetail` 和 `openEditorAttachmentEditTab` 中的重复 local Office 打开分支。 - [x] 只改 `layout.rs`:新增 helper + 简化两个调用方,不改 `task463`(当前 smoke 和 Rust 单测已覆盖分流行为)。 - [x] 补 smoke 或断言,覆盖正文附件 `弹窗编辑` 与 `新窗口编辑` 分流。 ## 5. 验收 - `cargo test -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1` - `node scripts/task463-onlyoffice-resolver-smoke.js` ## 6. 非目标 - 不引入新的 editor service 层。 - 不改 OnlyOffice callback 写回链路。 ## 7. 本轮执行记录 - 2026-05-21:Reasonix Worker C 对照了 `openConvexAssetFromFileTree`、`openEditorAttachmentDetail`、`openEditorAttachmentNewWindow`、`openEditorAttachmentEditTab` 的重复 local Office 打开分支,并提交了“新增 `openLocalOfficeFileInActiveTab` 辅助函数”的计划。 - 2026-05-21:Worker C 进程停留在计划提交阶段,没有生成 `final.md`,也没有实际修改 `layout.rs` / `task463`;本轮不把 5-26 checklist 标记为完成。 - 后续建议:若继续推进 5-26,应先用 Codex 本地复核 helper 边界,再小步改 `layout.rs`,重点保持“正文附件弹窗编辑进 main resource tab、正文附件新窗口编辑进浏览器窗口、md/text/code 继续走 tiptap”三条已验证行为不回退。 - 2026-05-22:Batch D Worker A 实际执行: 1. 在 `buildLocalOnlyOfficeOpenUrl` 之后新增 `openLocalOfficeFileInActiveTab(detail, mode)` async helper。 2. 简化 `openEditorAttachmentDetail` local Office 分支为 helper 调用。 3. 简化 `openEditorAttachmentEditTab` local Office 分支由 ~25 行缩减为 1 行 helper 调用。 4. 更新测试断言为检查 `openLocalOfficeFileInActiveTab(detail, 'edit')`。 5. `openConvexAssetFromFileTree` 保持不动(含 forceNewWindow/mindmap 等分支)。 - 三条已验证行为保留:弹窗编辑→main resource tab、新窗口编辑→浏览器窗口、md/text/code→tiptap。 - 2026-05-22:Codex 复核 `cargo test -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1` 与 `node scripts/task463-onlyoffice-resolver-smoke.js` 通过,确认正文附件 `弹窗编辑`、`新窗口编辑`、FileTree 资源打开与 `/onlyoffice` 分流保持一致,`5-26` 可归档为 done。