- 归档 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 .
68 lines
4.3 KiB
Markdown
68 lines
4.3 KiB
Markdown
# 5-40 ONLYOFFICE bridge 插件注入后噪音口径需复测
|
||
|
||
## 状态
|
||
|
||
- 状态:done
|
||
- Owner:05-editor-mainline / OnlyOffice preview-edit / browser smoke
|
||
- 发现时间:2026-05-31
|
||
|
||
## 现象
|
||
|
||
旧缺陷 `5-37` 的结论是当前代码没有注入 `plugins.autostart` / `pluginsData`,因此 annotation/custom assistant 插件 404 可作为 OnlyOffice 内置非关键噪音处理。但近期 ONLYOFFICE live bridge 已在 `onlyoffice.rs` 中重新注入 MNote bridge 插件,这会让旧噪音策略失效,必须重新区分 MNote bridge 插件失败、OnlyOffice 内置插件噪音和真正主文档加载失败。
|
||
|
||
## 证据
|
||
|
||
- `bugs/05-editor-mainline/process/5-37-onlyoffice-annotation-plugin-noise-policy-v1.md` 记录:“当前代码已无 autostart 注入,无需额外禁用”。
|
||
- `rust/crates/mnote-web/src/routes/onlyoffice.rs` 当前 `editorConfig.plugins` 注入:
|
||
- `autostart: [MNOTE_AGENT_PLUGIN_GUID]`
|
||
- `pluginsData: [bridgePluginConfigUrl.toString()]`
|
||
|
||
## 影响
|
||
|
||
- clean browser 测试里 MNote bridge 插件加载失败可能被错误归类为“OnlyOffice 内置插件噪音”。
|
||
- 相反,主 iframe 空白、`errorCode=-18`、DocumentServer WebSocket 失败也可能被泛化过滤掉。
|
||
- Office live agent 能力上线后,插件加载失败将不再是纯噪音,而是 AI Office 工具不可用。
|
||
|
||
## 最小复现建议
|
||
|
||
1. clean browser 打开 docx/xlsx/pptx。
|
||
2. 记录 console、pageerror、network 404/500、OnlyOffice iframe ready state。
|
||
3. 分别验证:
|
||
- MNote bridge 插件 config/index 是否成功加载。
|
||
- OnlyOffice 内置 annotation/custom assistant 缺资源是否仍为 non-critical。
|
||
- 主 iframe 空白、`errorCode=-18`、WebSocket 失败仍判定为失败。
|
||
|
||
## 修复建议
|
||
|
||
- 更新 `5-37` 或新 smoke 的错误分类规则:MNote bridge 插件错误不等同于内置插件噪音。
|
||
- 在 OnlyOffice smoke 中输出插件分类字段,例如 `mnoteBridgePluginOk`、`builtinPluginNoiseOnly`、`mainDocumentReady`。
|
||
- 对 bridge 插件 config/index 增加 route 单测和 browser smoke 断言。
|
||
|
||
## 本轮进展
|
||
|
||
- 2026-06-01:新增并通过 `scripts/task517-onlyoffice-bridge-plugin-direct-smoke.js`,在真实 Chromium 中 mock `Asc.plugin` 后直接加载 bridge plugin index,验证 session 注册、token 错误拒绝、`selection.get` / `document.insert_text` command 消费和 result 回传。
|
||
- 该 smoke 证明 MNote bridge plugin index / HTTP loop 自身可用,但不覆盖真实 ONLYOFFICE iframe / DocumentServer 的 autostart、内置插件噪音、主文档 ready 或 `errorCode=-18` 分类,因此本 bug 仍保留在 `process/`。
|
||
- 2026-06-01:新增并通过 `scripts/task518-onlyoffice-real-iframe-session-scope-smoke.js`,在真实 ONLYOFFICE iframe / DocumentServer 下验证 MNote bridge 插件可 autostart 注册并回收命令。该 smoke 记录到的 404 均为 `/api/onlyoffice/bridge/plugin/index/translations/langs.json` 与 `/api/onlyoffice/bridge/plugin/index/translations/zh-CN.json`,当前可归类为 bridge 插件翻译资源噪声;它没有阻断 session 注册、`selection.get` 或工具层授权 dry-run。
|
||
|
||
- 2026-06-01:增强并通过 `scripts/task518-onlyoffice-real-iframe-session-scope-smoke.js`,输出 `errorClassification`:
|
||
- `mnoteBridgePlugin.httpErrors=[]`
|
||
- `mnoteBridgePlugin.sessionsRegistered=true`
|
||
- `mnoteBridgePlugin.commandLoopOk=true`
|
||
- `bridgeTranslationNoise.count=6`,仅包含 `/api/onlyoffice/bridge/plugin/index/translations/langs.json` 和 `zh-CN.json` 404
|
||
- `builtinPluginNoise.count=0`
|
||
- `mainDocument.ready=true`
|
||
- `mainDocument.failures=[]`
|
||
- `mainDocument.errorCodeMinus18=false`
|
||
该分类把 MNote bridge 插件失败、bridge 翻译资源噪音、OnlyOffice 内置插件噪音和主文档失败分开;`errorCode=-18` / 主 iframe 空白不会被插件噪音吞掉。
|
||
|
||
## 验收
|
||
|
||
- [x] Clean browser smoke 能区分三类错误:MNote bridge 插件失败、OnlyOffice 内置插件噪音、主文档加载失败。
|
||
- [x] `errorCode=-18` / 主 iframe 空白不会被插件噪音过滤吞掉。
|
||
- [x] bridge 插件不可用时,Office 文档预览结论和 Office AI 工具可用性结论分开报告。
|
||
|
||
## 最终验证
|
||
|
||
- `node --check scripts/task518-onlyoffice-real-iframe-session-scope-smoke.js`
|
||
- `MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3301 node scripts/task518-onlyoffice-real-iframe-session-scope-smoke.js`
|