- 归档 OnlyOffice live bridge、Page AI、mindmap、design governance 与相关 bug 条目 - 补齐 MinerU OCR 后端 runtime 合同与 smoke/test 基线 - 收口 ChatOnly/Doubao、ObjectIdentity、Page Aggregate compat 与 runtime owner 文档口径 验证: - cargo test --manifest-path rust/Cargo.toml -p mnote-web local_ocr -- --test-threads=1 - cargo test --manifest-path rust/Cargo.toml -p mnote-web onlyoffice_bridge -- --test-threads=1 - git diff --check - git diff --cached --check - codegraph index . --force && codegraph status . - codegraph sync . && codegraph status .
54 lines
4.1 KiB
Markdown
54 lines
4.1 KiB
Markdown
# 5-37 OnlyOffice annotation 插件噪音策略
|
||
|
||
> 2026-06-01 复核:本文是 2026-05-21 旧口径。后续 `5-40-onlyoffice-bridge-plugin-noise-regression-v1` 引入了新的 OnlyOffice bridge/plugin 注入口径,已覆盖“当前代码无 autostart 注入”的结论。本文仅保留 annotation/custom assistant 内置插件噪音分类;主文档失败分类、`errorCode=-18`、iframe 空白和 bridge plugin 噪音治理以 `5-40` 的最终分类为准。`5-40` 已通过 `task518-onlyoffice-real-iframe-session-scope-smoke.js` 的 `errorClassification` 验收,本文不再作为活跃 process 缺陷。
|
||
|
||
## 目标
|
||
|
||
定位 OnlyOffice annotation / custom assistant 插件 404 或 pageerror 来源,并把它从主打开失败中剥离:能禁用则禁用,不能禁用则在测试和日志中明确为 non-critical。
|
||
|
||
## 原因
|
||
|
||
ONLYOFFICE 插件通过 `editorConfig.plugins.autostart` 和 `pluginsData` 注入。缺失插件资源会产生 404/pageerror,但不应影响主文档渲染、WebSocket 或只读预览。
|
||
|
||
## 允许修改
|
||
|
||
- `rust/crates/mnote-web/src/routes/onlyoffice.rs`
|
||
- `src/components/onlyoffice/` 下与自定义插件配置直接相关的文件
|
||
- 相关测试和 smoke 断言
|
||
|
||
## 禁止事项
|
||
|
||
- 不删除 OnlyOffice 主静态资源。
|
||
- 不把所有 console error 都静默吞掉。
|
||
- 不把主文档渲染失败降级为插件噪音。
|
||
|
||
## Checklist
|
||
|
||
- [x] 找到 annotation/custom assistant 插件配置或请求来源。
|
||
- [x] 若 MNote 当前不依赖该插件,禁用无效 autostart / pluginsData。(确认当前代码已无 autostart 注入,无需额外禁用)
|
||
- [x] 若属于 OnlyOffice 内置可选插件缺资源,记录为 non-critical,并更新浏览器测试过滤口径。
|
||
- [x] 补测试或文档,确保 `errorCode=-18` / WebSocket 失败仍被视为失败,不被插件噪音掩盖。(由 `5-40` / `task518-onlyoffice-real-iframe-session-scope-smoke.js` 的 `errorClassification.mainDocument` 覆盖)
|
||
|
||
## 验收
|
||
|
||
- `cargo test -p mnote-web onlyoffice -- --test-threads=1`
|
||
- Reasonix clean browser 测试的 console/network 摘要能区分插件 404 与主打开失败。
|
||
|
||
## 本轮执行记录
|
||
|
||
- 2026-05-21:Reasonix worker D 分析完成。
|
||
- **来源确认**:MNote 后端代码(`onlyoffice.rs`)**没有**在 `editorConfig` 中设置 `plugins.autostart` 或 `plugins.pluginsData`。`MNOTE_AGENT_PLUGIN_GUID` 常量虽定义但未被任何配置引用。
|
||
- 旧的 `recycle/wolai-frontend/` 中存在设置 `autostart: [MNOTE_AGENT_PLUGIN_GUID]` 和 `pluginsData: [pluginConfigUrl]` 的代码,但那是已废弃的前端实现。
|
||
- 当前 `onlyoffice.rs` 的 `page()` 函数生成的 JS 中 `editorConfig` 无 `plugins` 字段。
|
||
- `src/components/onlyoffice/onlyoffice-plugins/` 下有 OnlyOffice 内置的 annotation / custom-assistant 插件静态文件(GUID `{9DC93CDB-B576-4F0C-B55E-FCC9C48DD007}`),但这些是 OnlyOffice 服务端自带的插件发现机制,非 MNote 注入。
|
||
- **处理策略**:
|
||
1. 404/pageerror 属于 OnlyOffice DocumentServer 内置可选插件自动发现的非关键链路,不影响主文档渲染。
|
||
2. 不需要禁用代码层面的 `autostart`——因为当前代码已不注入任何插件。
|
||
3. 在浏览器测试和日志分析中,将 annotation/custom-assistant 相关 404 标记为 non-critical noise,**不**等同于文档打开失败。
|
||
4. 保持 `errorCode=-18`(WebSocket 连接失败)和主 iframe 空白仍视为真正失败。
|
||
- 未修改代码文件。
|
||
- 2026-05-21:Reasonix 与 Codex 浏览器复核一致。
|
||
- Reasonix 结果:`tmp/reasonix-office-view-edit-plugin-2026-05-21/result.json` 中插件 404 / `CustomAssistantManager is not defined` 存在,但 Office iframe 默认 view 可打开。
|
||
- Codex 结果:`tmp/codex-office-view-edit-plugin-2026-05-21/result.json` 中同样捕获 `/sdkjs-plugins/{9DC93CDB-B576-4F0C-B55E-FCC9C48DD007}/...` 404;默认 view 与显式 edit 的主 iframe 均可建立。
|
||
- 当前结论保持:该类插件错误作为 non-critical noise 记录;不应掩盖 `errorCode=-18`、主 iframe 空白、文档加载失败等真正失败。
|