Files
mnote/bugs/05-editor-mainline/done/5-29-onlyoffice-docx-upload-open-freeze-v1.md
lix-2026 eba1010191 fix local office resource editing
- add local-folder OnlyOffice sign/callback writeback and edit-tab handling

- align main resource tabs, attachment edit menu, slash isolation, and filetree context behavior

- record Sidex/Hermes gap reviews and Reasonix task checklists
2026-05-21 05:40:06 +08:00

43 lines
2.0 KiB
Markdown
Raw Permalink 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.
# Checklist: OnlyOffice Docx Upload Open Freeze
## 目标
上传 docx 后点击打开不应卡死;本地 docx 应能在主编辑器 resource tab 中打开 OnlyOffice,失败时显示非阻塞错误。
## 允许修改
- `rust/crates/mnote-web/src/routes/onlyoffice.rs`
- `rust/crates/mnote-web/src/routes/local_folder_source.rs`
- `rust/crates/mnote-web/src/routes/web_shell.rs`
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
- OnlyOffice / local upload 相关测试
## 禁止事项
- 不绕开 local-first rootUri 授权。
- 不把 docx 改成浏览器下载兜底作为唯一行为。
- 不引入新外部服务。
## 待办
- [x] 复现并定位上传后卡死发生在上传、插入附件 UI、resource tab iframe、OnlyOffice DocumentServer 回源哪一层。
- [x] 确保 local docx 打开 URL 走 `/api/local-folder/files/open` 且 content-type 正确。
- [x] 主 tab iframe 打开 OnlyOffice 时设置清晰 loading/error 状态,超时不阻塞主页面。
- [x] Convex / local office 行为尽量统一到 resource tab;新窗口只作为“在新窗口打开”动作。
- [x] 补充 docx 上传/打开 targeted smoke 或 Rust 字符串测试。
## 本轮执行记录
- 代码:`onlyoffice.rs` 为 API 加载和初始化增加超时错误;`layout.rs` 让 office 资源优先进入主 resource tab。
- 浏览器验证:使用真实文件 `/mnt/Data1T/research/DHA_cosmetics/progress/DHA美黑化妆品监管综述_2026-05-16.docx` 上传并打开,结果在 `tmp/bug-20260521-workbench-browser-verify/result-title-docx-menu.json`,截图 `02-real-docx-resource-tab.png`
- Smoke`node scripts/task463-onlyoffice-resolver-smoke.js` 已通过。
## 验收命令
```bash
cd /mnt/Data1T/mnote/rust
cargo test -p mnote-web local_file_open_sets_pdf_and_office_content_type -- --test-threads=1
cargo test -p mnote-web onlyoffice_page_exposes_documentserver_fetch_base_for_local_files -- --test-threads=1
cargo test -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1
```