- 归档 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 .
2.6 KiB
2.6 KiB
7-56 Page AI runtime stop / close smoke 缺口
状态
- 状态:done
- Owner:07-ai / Page AI runtime
- 发现时间:2026-06-01
现象
7-53 已完成 Page AI runtime 拆分并把 sidebar-page-ai-runtime.js 降到 2500 行阈值以下,但停止运行与关闭抽屉的浏览器断言仍不完整。
证据
bugs/07-ai/done/7-53-page-ai-runtime-split-threshold-triggered-v1.md已记录拆分完成,但验收中仍保留 stop/close smoke 的[~]项。scripts/task490-runtime-surfaces-smoke.js会打开并点击关闭 Page AI 抽屉,但缺少明确的 drawer hidden / closed state 断言。- 现有 smoke 未覆盖
data-page-ai-action="stop-run"到 abort API / terminal event 的端到端行为。
影响
- Page AI runtime 拆分后,基础打开/发送/target picker 已有保护,但 stop/close 这类常用交互仍可能在后续拆分中回退。
7-53虽然可作为拆分阈值 bug 归档,但停止/关闭行为应继续作为独立 P2 测试缺口跟踪。
下一步
- 扩展现有
task490或新增窄 smoke,断言关闭后 Page AI drawer 进入隐藏状态,且页面根状态同步清除。 - 增加 stop-run smoke:启动可控流式 run,点击停止,断言 abort API 被调用并收到 terminal/aborted 状态。
- 将验证命令补入
scripts/TESTING_REFERENCE.md。
验收
- 浏览器 smoke 明确断言 Page AI drawer close 后不可见。
- 浏览器 smoke 覆盖 stop-run -> abort/terminal event。
node --check与对应 smoke 通过。
2026-06-01 修复记录
scripts/task490-runtime-surfaces-smoke.js已扩展 Page AI close 断言:关闭后 drawer 必须hidden=true,浮动 AI 按钮data-state=closed且aria-expanded=false。task490已新增可控 mock run:发送后等待 run 进入running,点击data-page-ai-action="stop-run",断言 abort API 被调用一次、请求 reason 为page_ai_user_stop,并等待 UI 进入aborted状态。- 修复 Page AI render helper 拆分漏注入:
sidebar-page-ai-render-runtime.js使用pageAiProviderLabel()渲染 provider card,但sidebar-page-ai-runtime.js未传入该 helper;已补 context 注入。 - 已通过:
node --check rust/crates/mnote-web/browser/sidebar-page-ai-runtime.jsnode --check rust/crates/mnote-web/browser/sidebar-page-ai-render-runtime.jsnode --check scripts/task490-runtime-surfaces-smoke.jsMNOTE_UI_BASE_URL=http://127.0.0.1:3301 MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3301 node scripts/task490-runtime-surfaces-smoke.js
截图:
tmp/task490-runtime-surfaces-smoke/02b-page-ai-stopped.png