Files
mnote/design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md
T

47 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 5-26 Resource Open Resolver Convergence Checklist v1
> 状态:process
>
> 日期:2026-05-21
>
> Ownerresource 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
- [ ] 审查 `buildLocalOnlyOfficeOpenUrl``openEditorAttachmentEditTab``openConvexAssetFromFileTree``resolveResourceOpen` 的重复判断。
- [ ] 给出最小收敛方案,优先减少正文附件与 FileTree 的分歧。
- [ ] 若可安全实现,只改 `layout.rs` / `task463` 内重复逻辑。
- [ ] 补 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-21Reasonix Worker C 对照了 `openConvexAssetFromFileTree``openEditorAttachmentDetail``openEditorAttachmentNewWindow``openEditorAttachmentEditTab` 的重复 local Office 打开分支,并提交了“新增 `openLocalOfficeFileInActiveTab` 辅助函数”的计划。
- 2026-05-21Worker C 进程停留在计划提交阶段,没有生成 `final.md`,也没有实际修改 `layout.rs` / `task463`;本轮不把 5-26 checklist 标记为完成。
- 后续建议:若继续推进 5-26,应先用 Codex 本地复核 helper 边界,再小步改 `layout.rs`,重点保持“正文附件弹窗编辑进 main resource tab、正文附件新窗口编辑进浏览器窗口、md/text/code 继续走 tiptap”三条已验证行为不回退。