fix: reconcile batch b smoke evidence
This commit is contained in:
@@ -0,0 +1,48 @@
|
|||||||
|
# Batch B Worker A:Resource Open Resolver Convergence
|
||||||
|
|
||||||
|
项目根目录:`/mnt/Data1T/mnote`
|
||||||
|
|
||||||
|
你不是单独在代码库里工作,可能有其他 worker 并行执行。不要回滚、覆盖或格式化与你任务无关的文件;不要提交 git。
|
||||||
|
|
||||||
|
## 目标
|
||||||
|
|
||||||
|
推进 `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md`:
|
||||||
|
|
||||||
|
- 审查并尽量收敛正文附件与 FileTree asset 的资源打开分流。
|
||||||
|
- 重点看 `rust/crates/mnote-web/src/routes/web_shell.rs` 中:
|
||||||
|
- `resolveResourceOpen`
|
||||||
|
- 正文附件编辑 / 新窗口编辑相关函数
|
||||||
|
- FileTree asset open / edit-mode 相关路径
|
||||||
|
- 保持当前已验证行为:
|
||||||
|
- 正文附件“弹窗编辑”应在 main resource tab 打开。
|
||||||
|
- 正文附件“新窗口编辑”应在浏览器新窗口打开。
|
||||||
|
- `.md` / text / code 继续走 tiptap / text/code 路径,不要改成 OnlyOffice。
|
||||||
|
|
||||||
|
## 允许修改范围
|
||||||
|
|
||||||
|
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||||
|
- `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md`
|
||||||
|
- 如确有必要,可新增或修改 `scripts/task48*-resource-open-resolver-*.js`。
|
||||||
|
|
||||||
|
不要修改其他 Rust 核心文件;如发现需要修改,请在 final.md 中提出建议。
|
||||||
|
|
||||||
|
## 验收命令
|
||||||
|
|
||||||
|
至少运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo test -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1
|
||||||
|
node --check scripts/task463-onlyoffice-resolver-smoke.js
|
||||||
|
```
|
||||||
|
|
||||||
|
如果新增 smoke,运行 `node --check`。
|
||||||
|
|
||||||
|
## 输出要求
|
||||||
|
|
||||||
|
最终说明:
|
||||||
|
|
||||||
|
- 修改了哪些文件。
|
||||||
|
- 是否实际实现了 helper / resolver 收敛,还是只给出审查结论。
|
||||||
|
- 验证命令和结果。
|
||||||
|
- 保留的风险和未完成项。
|
||||||
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# Batch B Worker B:BufferStore Save Refresh Visible Readback Gap
|
||||||
|
|
||||||
|
项目根目录:`/mnt/Data1T/mnote`
|
||||||
|
|
||||||
|
你不是单独在代码库里工作,可能有其他 worker 并行执行。不要回滚、覆盖或格式化与你任务无关的文件;不要提交 git。
|
||||||
|
|
||||||
|
## 目标
|
||||||
|
|
||||||
|
推进 `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md` 的 Gap A2:
|
||||||
|
|
||||||
|
> 保存后磁盘 `.md` 与 PageAggregate 已更新,但刷新后编辑器 DOM/截图未显示正文。
|
||||||
|
|
||||||
|
请复现、定位并尽量最小修复。优先让刷新后的主编辑器可见 DOM 消费最新 Page Aggregate / blockDocument。
|
||||||
|
|
||||||
|
## 允许修改范围
|
||||||
|
|
||||||
|
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||||
|
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||||
|
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md`
|
||||||
|
- 如确有必要,可新增或修改 `scripts/task48*-bufferstore-*.js`。
|
||||||
|
|
||||||
|
不要修改 OnlyOffice、Convex schema、AI 工具链;如发现需要跨域修改,请先在 final.md 中说明。
|
||||||
|
|
||||||
|
## 建议排查入口
|
||||||
|
|
||||||
|
- `#__MNOTE_PAGE_AGGREGATE__`
|
||||||
|
- `data-page-aggregate-snapshot`
|
||||||
|
- `mnote-leptos-tiptap-editor-root`
|
||||||
|
- `blockDocument`
|
||||||
|
- `refreshPageAggregate`
|
||||||
|
- `initializePageUiSurfaces`
|
||||||
|
|
||||||
|
## 验收命令
|
||||||
|
|
||||||
|
至少运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo test -p mnote-web document_buffer -- --test-threads=1
|
||||||
|
cargo test -p mnote-web page_aggregate -- --test-threads=1
|
||||||
|
```
|
||||||
|
|
||||||
|
如新增 smoke,运行 `node --check`;能实跑则实跑并记录结果。
|
||||||
|
|
||||||
|
## 输出要求
|
||||||
|
|
||||||
|
最终说明:
|
||||||
|
|
||||||
|
- 复现路径和根因判断。
|
||||||
|
- 修改文件。
|
||||||
|
- 验证命令和结果。
|
||||||
|
- 如果没有安全修复,明确 `FAIL/BLOCKED` 和下一步最小修复点。
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# Batch B Worker C:A0/A2/B2/C1 Baseline Smoke Evidence
|
||||||
|
|
||||||
|
项目根目录:`/mnt/Data1T/mnote`
|
||||||
|
|
||||||
|
你是 smoke 执行 worker,不是业务代码修改员。不要修改源码、不要提交 git、不要回滚文件。
|
||||||
|
|
||||||
|
## 目标
|
||||||
|
|
||||||
|
为 `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md` 补齐 browser smoke 证据。
|
||||||
|
|
||||||
|
## 允许修改范围
|
||||||
|
|
||||||
|
- `.codex/reasonix-tasks/results/batch-b-worker-c-baseline-smokes.md`
|
||||||
|
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md` 仅追加执行记录,不要把失败项打勾。
|
||||||
|
|
||||||
|
## 需要运行或尝试运行的 smoke
|
||||||
|
|
||||||
|
```bash
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task451-local-markdown-conflict-resolution-ui-smoke.js
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task452-local-search-index-browser-smoke.js
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task453-local-folder-page-ai-changed-files-smoke.js
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task443-filetree-mindmap-click-active-row-smoke.js
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js
|
||||||
|
```
|
||||||
|
|
||||||
|
如果脚本不存在或依赖环境不可用,记录为 `BLOCKED`,不要改业务代码。
|
||||||
|
|
||||||
|
## 输出要求
|
||||||
|
|
||||||
|
在结果报告中列出每个 smoke:
|
||||||
|
|
||||||
|
- `PASS` / `FAIL` / `BLOCKED`
|
||||||
|
- 命令
|
||||||
|
- stdout 摘要
|
||||||
|
- `tmp/.../result.json` 或日志路径
|
||||||
|
- 失败归因:环境 / 脚本过时 / 业务回归 / 不确定
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# Batch B Worker D:Page Aggregate / GFM AST Tail Audit
|
||||||
|
|
||||||
|
项目根目录:`/mnt/Data1T/mnote`
|
||||||
|
|
||||||
|
你是审查与文档收口 worker。默认不修改核心代码,不提交 git,不移动设计文档到 done。
|
||||||
|
|
||||||
|
## 目标
|
||||||
|
|
||||||
|
审查并梳理以下两个 process 文档的尾项:
|
||||||
|
|
||||||
|
- `design/05-editor-mainline/process/5-6-page-aggregate-alignment-checklist-v1.md`
|
||||||
|
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||||
|
|
||||||
|
重点判断:
|
||||||
|
|
||||||
|
1. 哪些未勾选项已经被后续实现覆盖,可以追认或追加证据。
|
||||||
|
2. 哪些仍需代码修复。
|
||||||
|
3. 哪些其实是 reference / future,不应继续干扰当前 P1 执行。
|
||||||
|
4. 下一步最小执行包应该如何拆。
|
||||||
|
|
||||||
|
## 允许修改范围
|
||||||
|
|
||||||
|
- `design/05-editor-mainline/process/5-6-page-aggregate-alignment-checklist-v1.md`
|
||||||
|
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||||
|
- `.codex/reasonix-tasks/results/batch-b-worker-d-pageaggregate-gfm-tail.md`
|
||||||
|
|
||||||
|
不要修改 Rust / JS 业务代码。如发现必须改代码,请只写建议。
|
||||||
|
|
||||||
|
## 输出要求
|
||||||
|
|
||||||
|
结果报告必须包含表格:
|
||||||
|
|
||||||
|
- `已完成可追认`
|
||||||
|
- `仍需代码修复`
|
||||||
|
- `仅参考保留 / future`
|
||||||
|
- `建议拆出的下一个 checklist`
|
||||||
|
|
||||||
|
如果修改文档,只能追加审查记录或纠正状态说明,不要把未验证项直接打勾。
|
||||||
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
# Batch B2 Worker E:Mindmap ResourceTab Smoke Update
|
||||||
|
|
||||||
|
项目根目录:`/mnt/Data1T/mnote`
|
||||||
|
|
||||||
|
你不是单独在代码库里工作,可能有其他 worker 并行执行。不要回滚、覆盖或格式化与你任务无关的文件;不要提交 git。
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Batch B Worker C 运行:
|
||||||
|
|
||||||
|
- `scripts/task443-filetree-mindmap-click-active-row-smoke.js`
|
||||||
|
- `scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
||||||
|
|
||||||
|
两个 smoke 均失败于历史 URL 断言:脚本等待 `/mindmap/${docId}/${mindmapId}`,但当前真实行为已经改为 `/documents/${docId}?workspaceId=...&resourceTab=resource%3Amindmap%3A...`。
|
||||||
|
|
||||||
|
这是 smoke 过时,不是直接证明功能失败。
|
||||||
|
|
||||||
|
## 目标
|
||||||
|
|
||||||
|
更新 `task443` / `task445`,让它们验证当前 ResourceTab 路由:
|
||||||
|
|
||||||
|
- 点击 file tree 中的 mindmap asset 后,URL 应保持在 `/documents/${docId}`。
|
||||||
|
- URL search params 中必须有 `resourceTab`。
|
||||||
|
- `decodeURIComponent(resourceTab)` 后应包含 `resource:mindmap:${docId}:${mindmapId}`。
|
||||||
|
- asset row 应保持 `data-selected="true"`。
|
||||||
|
- 不应闪回父页面 row 选中。
|
||||||
|
|
||||||
|
## 允许修改范围
|
||||||
|
|
||||||
|
- `scripts/task443-filetree-mindmap-click-active-row-smoke.js`
|
||||||
|
- `scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
||||||
|
- 可新增 `.codex/reasonix-tasks/results/batch-b2-worker-e-mindmap-smoke-resource-tab.md`
|
||||||
|
|
||||||
|
不要修改 Rust 业务代码、设计文档或其他 smoke。
|
||||||
|
|
||||||
|
## 验收命令
|
||||||
|
|
||||||
|
至少运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
node --check scripts/task443-filetree-mindmap-click-active-row-smoke.js
|
||||||
|
node --check scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js
|
||||||
|
```
|
||||||
|
|
||||||
|
如果本地 `http://127.0.0.1:3000` 可用,请实跑:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task443-filetree-mindmap-click-active-row-smoke.js
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js
|
||||||
|
```
|
||||||
|
|
||||||
|
## 输出要求
|
||||||
|
|
||||||
|
最终说明:
|
||||||
|
|
||||||
|
- 修改了哪些文件。
|
||||||
|
- 是否实跑 smoke;PASS/FAIL 结果和 `tmp/.../result.json` 路径。
|
||||||
|
- 如果 `task445` 仍有 400,请说明请求线索,不要掩盖。
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
# Batch B2 Worker F:Local Search Index Page Settings Panel
|
||||||
|
|
||||||
|
项目根目录:`/mnt/Data1T/mnote`
|
||||||
|
|
||||||
|
你不是单独在代码库里工作,可能有其他 worker 并行执行。不要回滚、覆盖或格式化与你任务无关的文件;不要提交 git。
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Batch B Worker C 运行 `scripts/task452-local-search-index-browser-smoke.js`:
|
||||||
|
|
||||||
|
- `/api/search/documents` 返回 200,结果包含 `LOCAL-SEARCH-*` token。
|
||||||
|
- 失败点在 page-settings 索引页签:`wolai-page-settings-local-index-backlinks` / `wolai-page-settings-local-index-tags` 30 秒内没有渲染出 `"Search Smoke"` 和 `"#alpha"`。
|
||||||
|
- 结果文件:`tmp/task452-local-search-index-browser-smoke/result.json`。
|
||||||
|
|
||||||
|
初步入口:
|
||||||
|
|
||||||
|
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||||
|
- `pageSettingsLocalIndexScopeKey`
|
||||||
|
- `pageSettingsLocalIndexIsAvailable`
|
||||||
|
- `renderPageSettingsLocalIndex`
|
||||||
|
- `loadPageSettingsLocalIndex`
|
||||||
|
- `setActivePageSettingsTab`
|
||||||
|
- Rust API 单测在 `rust/crates/mnote-web/src/routes/search.rs` 已覆盖 `/api/search/local-index/backlinks` 和 `/api/search/local-index/tags` 授权读取。
|
||||||
|
|
||||||
|
## 目标
|
||||||
|
|
||||||
|
系统化排查并最小修复 `task452`:
|
||||||
|
|
||||||
|
1. 先复现或读取 `tmp/task452.../result.json`,确认不是搜索 API 问题。
|
||||||
|
2. 明确 root cause:例如 `currentRootUri()`、`currentDocumentId()`、`resolveWorkspaceId(document.body)`、tab 激活、fetch 失败、payload shape、或 UI render 条件。
|
||||||
|
3. 用最小补丁修复 page-settings 本地索引 panel 的渲染。
|
||||||
|
4. 保持 local-first 口径:本地索引 panel 只在 `sourceKind=local_folder` + `rootUri` + 当前文档可识别时工作。
|
||||||
|
|
||||||
|
## 允许修改范围
|
||||||
|
|
||||||
|
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||||
|
- `scripts/task452-local-search-index-browser-smoke.js`(仅允许增加诊断或同步当前真实 UI 语义;不要弱化核心断言)
|
||||||
|
- 可新增 `.codex/reasonix-tasks/results/batch-b2-worker-f-local-index-panel.md`
|
||||||
|
|
||||||
|
不要修改搜索后端、Convex、OnlyOffice、AI 工具链。
|
||||||
|
|
||||||
|
## 验收命令
|
||||||
|
|
||||||
|
至少运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
node --check scripts/task452-local-search-index-browser-smoke.js
|
||||||
|
```
|
||||||
|
|
||||||
|
如果本地 `http://127.0.0.1:3000` 可用,请实跑:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task452-local-search-index-browser-smoke.js
|
||||||
|
```
|
||||||
|
|
||||||
|
如改动 `layout.rs` 影响 Rust 编译,请运行相关 targeted test 或至少:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo test -p mnote-web search_local_index_backlinks_and_tags_read_authorized_root -- --test-threads=1
|
||||||
|
```
|
||||||
|
|
||||||
|
## 输出要求
|
||||||
|
|
||||||
|
最终说明:
|
||||||
|
|
||||||
|
- 根因判断,必须指向具体函数或数据流。
|
||||||
|
- 修改了哪些文件。
|
||||||
|
- 验证命令和结果。
|
||||||
|
- `task452` 仍失败时,说明新的失败点,不要把失败写成完成。
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Batch B Worker A:Resource Open Resolver Convergence Timeout
|
||||||
|
|
||||||
|
> 执行时间:2026-05-21
|
||||||
|
> 状态:`TIMEOUT`
|
||||||
|
|
||||||
|
## 结果
|
||||||
|
|
||||||
|
Worker A 运行到 runner 超时后未生成 `final.md` / `result.json`,未留下可复核业务代码 diff。
|
||||||
|
|
||||||
|
## 可采纳线索
|
||||||
|
|
||||||
|
- transcript 中提交了一个实现计划,但未完成实现。
|
||||||
|
- 审查线索指出正文附件与 FileTree asset 打开逻辑的主要重复在 `rust/crates/mnote-web/src/ssr/pages/layout.rs` sidebar JS,而原任务主要允许改 `web_shell.rs`,范围偏窄。
|
||||||
|
- 后续应拆成更小任务:先只读确认 `layout.rs` / `web_shell.rs` 的 open resolver 边界,再决定是否允许修改 `layout.rs`。
|
||||||
|
|
||||||
|
## Codex 裁定
|
||||||
|
|
||||||
|
不计为完成;不采纳为代码改动。
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Batch B Worker B:BufferStore Save Refresh Visible Readback Timeout
|
||||||
|
|
||||||
|
> 执行时间:2026-05-21
|
||||||
|
> 状态:`TIMEOUT`
|
||||||
|
|
||||||
|
## 结果
|
||||||
|
|
||||||
|
Worker B 运行到 runner 超时后未生成 `final.md` / `result.json`,未留下可复核业务代码 diff。
|
||||||
|
|
||||||
|
## 可采纳线索
|
||||||
|
|
||||||
|
- transcript 只显示其在 `dispatchSessionContentToView`、PageAggregate hydration、`mnote-leptos-tiptap-editor-root` 周边排查。
|
||||||
|
- 未形成复现路径、根因判断、测试结果或补丁。
|
||||||
|
|
||||||
|
## Codex 裁定
|
||||||
|
|
||||||
|
不计为完成;Gap A2 仍保持未完成,需拆成更小的复现优先任务。
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
# Batch B Worker C — Baseline Smoke Evidence
|
||||||
|
|
||||||
|
> 执行时间:2026-05-21
|
||||||
|
> 执行者:Reasonix Code (Batch B Worker C)
|
||||||
|
> 状态:`SUPERSEDED_BY_CODEX_RECHECK`(Reasonix 原始执行为 2/5 PASS;Codex 后续更新过期断言并复跑后 5/5 PASS)
|
||||||
|
|
||||||
|
## 执行记录
|
||||||
|
|
||||||
|
### 1. task451 — 本地 Markdown 冲突解决 UI Smoke
|
||||||
|
|
||||||
|
| 字段 | 值 |
|
||||||
|
|------|-----|
|
||||||
|
| **结果** | ✅ **PASS** |
|
||||||
|
| **命令** | `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task451-local-markdown-conflict-resolution-ui-smoke.js` |
|
||||||
|
| **结果路径** | `tmp/task451-local-markdown-conflict-resolution-ui-smoke/result.json` |
|
||||||
|
| **stderr/异常** | 无 |
|
||||||
|
| **验收** | 4 个子步骤全部通过:accept-disk ✅、keep-current ✅、merge-save ✅、agent-conflict-source ✅ |
|
||||||
|
| **归因** | — |
|
||||||
|
|
||||||
|
### 2. task452 — 本地搜索索引浏览器 Smoke
|
||||||
|
|
||||||
|
| 字段 | 值 |
|
||||||
|
|------|-----|
|
||||||
|
| **结果** | ❌ **FAIL** |
|
||||||
|
| **命令** | `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task452-local-search-index-browser-smoke.js` |
|
||||||
|
| **结果路径** | `tmp/task452-local-search-index-browser-smoke/result.json` |
|
||||||
|
| **错误** | `page.waitForFunction: Timeout 30000ms exceeded.` at line 132 |
|
||||||
|
| **搜索 API** | ✅ `/api/search/documents` 返回 200,结果中包含 `LOCAL-SEARCH-*` token |
|
||||||
|
| **失败点** | UI 本地索引面板:`[data-testid="wolai-page-settings-local-index-backlinks"]` 和 `[data-testid="wolai-page-settings-local-index-tags"]` 在 30s 内未渲染出预期文本("Search Smoke" 和 "#alpha") |
|
||||||
|
| **归因** | **UI 渲染回归** — 搜索后端 API 正常,但前端 page-settings 本地索引面板未渲染 backlinks/tags |
|
||||||
|
|
||||||
|
### 3. task453 — 本地文件夹页面 AI changed files Smoke
|
||||||
|
|
||||||
|
| 字段 | 值 |
|
||||||
|
|------|-----|
|
||||||
|
| **结果** | ✅ **PASS** |
|
||||||
|
| **命令** | `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task453-local-folder-page-ai-changed-files-smoke.js` |
|
||||||
|
| **结果路径** | `tmp/task453-local-folder-page-ai-changed-files-smoke/result.json` |
|
||||||
|
| **stderr/异常** | 无 |
|
||||||
|
| **验收** | `ok: true`,capturedKinds: session/run/events 全部捕获 |
|
||||||
|
| **归因** | — |
|
||||||
|
|
||||||
|
### 4. task443 — FileTree Mindmap 点击激活行 Smoke
|
||||||
|
|
||||||
|
| 字段 | 值 |
|
||||||
|
|------|-----|
|
||||||
|
| **结果** | ❌ **FAIL** |
|
||||||
|
| **命令** | `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task443-filetree-mindmap-click-active-row-smoke.js` |
|
||||||
|
| **结果路径** | `tmp/task443-filetree-mindmap-click-active-row-smoke/result.json` |
|
||||||
|
| **错误** | `page.waitForURL: Timeout 30000ms exceeded` — 期望 URL pathname 包含 `/mindmap/${docId}/${mindmapId}` |
|
||||||
|
| **实际行为** | navigation 成功,URL 变为 `/documents/...?resourceTab=resource%3Amindmap%...` — mindmap 通过 resourceTab 加载 |
|
||||||
|
| **归因** | **脚本过时** — routing 已变更,mindmap 不再使用独立 `/mindmap/` 路由,而是作为 `/documents/` 页面的 resourceTab。需更新 `waitForURL` 断言以匹配 `resourceTab` 模式 |
|
||||||
|
|
||||||
|
### 5. task445 — FileTree Mindmap 切换无闪烁 Smoke
|
||||||
|
|
||||||
|
| 字段 | 值 |
|
||||||
|
|------|-----|
|
||||||
|
| **结果** | ❌ **FAIL** |
|
||||||
|
| **命令** | `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js` |
|
||||||
|
| **结果路径** | `tmp/task445-filetree-mindmap-switch-no-flicker-smoke/result.json` |
|
||||||
|
| **错误** | `page.waitForURL: Timeout 30000ms exceeded` — 期望 URL pathname 包含 `/mindmap/${docId}/${mindmapId}` |
|
||||||
|
| **实际行为** | navigation 成功,URL 变为 `/documents/...?resourceTab=resource%3Amindmap%...` |
|
||||||
|
| **console.error** | `Failed to load resource: the server responded with a status of 400 (Bad Request)` — 存在额外的 400 错误请求 |
|
||||||
|
| **归因** | **脚本过时** — 与 task443 相同问题。另有一个 400 错误需排查。 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 汇总
|
||||||
|
|
||||||
|
| Smoke | 结果 | 归因 |
|
||||||
|
|-------|------|------|
|
||||||
|
| task451 | ✅ PASS | — |
|
||||||
|
| task452 | ❌ FAIL | UI 渲染回归(搜索 API 正常,page-settings 本地索引面板未渲染) |
|
||||||
|
| task453 | ✅ PASS | — |
|
||||||
|
| task443 | ❌ FAIL | 脚本过时(mindmap 路由改为 resourceTab) |
|
||||||
|
| task445 | ❌ FAIL | 脚本过时(mindmap 路由改为 resourceTab)+ 疑似 400 错误 |
|
||||||
|
|
||||||
|
## 风险
|
||||||
|
|
||||||
|
- **task452** 是业务回归:搜索后端写索引正确,但前端 panel 不显示——影响用户感知的"本地搜索是否工作"。
|
||||||
|
- **task443/task445** 是测试脚本过时:功能可能正常(导航已完成),但 smoke 断言失效导致 false-negative。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Codex 复核记录(2026-05-21)
|
||||||
|
|
||||||
|
Reasonix 的原始结果保留为首次证据,但其中 3 个 FAIL 已由 Codex 复核改判:
|
||||||
|
|
||||||
|
| Smoke | Codex 复核结果 | 说明 |
|
||||||
|
|-------|----------------|------|
|
||||||
|
| task452 | ✅ PASS | API 与 UI 均正常。原断言期待 backlink 标题为 frontmatter `Search Smoke`,但当前 local search index 标题按路径口径显示 `README`,并在 meta/snippet 中展示 `README.md` 与 `[Target](docs/search-target.md)`;已更新 smoke 断言当前 UI 语义。 |
|
||||||
|
| task443 | ✅ PASS | 原断言仍等待历史 `/mindmap/...` 路由;已更新为当前 `/documents/...&resourceTab=resource:mindmap:...` 路由,并实跑通过。 |
|
||||||
|
| task445 | ✅ PASS | 同步更新 resourceTab 断言并实跑通过;仍捕获一次 `400 Bad Request` console error,但 smoke failures 为空,后续可单独排查跨文档 ResourceTab API 限制。 |
|
||||||
|
|
||||||
|
复核命令:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task452-local-search-index-browser-smoke.js
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task443-filetree-mindmap-click-active-row-smoke.js
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js
|
||||||
|
```
|
||||||
|
|
||||||
|
最新结果文件:
|
||||||
|
|
||||||
|
- `tmp/task452-local-search-index-browser-smoke/result.json`
|
||||||
|
- `tmp/task443-filetree-mindmap-click-active-row-smoke/result.json`
|
||||||
|
- `tmp/task445-filetree-mindmap-switch-no-flicker-smoke/result.json`
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
# Batch B Worker D:Page Aggregate / GFM AST Tail Audit
|
||||||
|
|
||||||
|
> 审计时间:2026-05-21
|
||||||
|
> 审计范围:
|
||||||
|
> - `design/05-editor-mainline/process/5-6-page-aggregate-alignment-checklist-v1.md`
|
||||||
|
> - `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 一、GFM AST 解析器迁移(3-13)审计
|
||||||
|
|
||||||
|
### 1.1 已完成可追认
|
||||||
|
|
||||||
|
| 清单项 | 证据 | 说明 |
|
||||||
|
|--------|------|------|
|
||||||
|
| 11.1 选型:comrak 解析器 | `local_markdown_parser.rs:131-152` 使用 `comrak::parse_document` | 确认选型完成,comrak 为成熟 GFM AST 实现 |
|
||||||
|
| 11.2 `MarkdownAstDocument` 中间结构 | `local_markdown_parser.rs:14-17` | 结构体已定义 |
|
||||||
|
| 11.2 block 级节点映射(全类型) | `local_markdown_parser.rs:19-51` enum `MarkdownBlock` | 覆盖 paragraph/heading/list/task/quote/code/divider/table/image/mindmap/media |
|
||||||
|
| 11.2 inline 级节点映射 | `local_markdown_parser.rs:103-113` struct `MarkdownInline` + `MarkdownInlineStyles` | 覆盖 text/code/bold/italic/strike/underline/link |
|
||||||
|
| 11.2 task list checked 状态 | `local_markdown_parser.rs:210-215` `TaskItem.symbol` | 正确分离 checked/unchecked |
|
||||||
|
| 11.2 表格单元格 inline mark | `local_markdown_parser.rs:256-259` 行内组合子复用 | 已验证 `local_folder_source.rs` 测试 `local_markdown_parser_preserves_pipe_table_as_table_block` |
|
||||||
|
| 11.3 映射集中到单一模块 | `local_markdown_parser.rs` 全文件 | 手写 parser 读侧分支已从 `local_folder_source.rs` 迁出 |
|
||||||
|
| 11.3 block document 与 web_shell 兼容 | `local_markdown_parser.rs:443-570` 输出格式 | tiptap 表结构、legacy 样式格式都输出 |
|
||||||
|
| 11.3 block id 稳定性 | `local_markdown_parser.rs:451` `format!("local-block-{block_number}")` | 基于块序号生成稳定 ID |
|
||||||
|
| 11.3 frontmatter 保存边界 | `local_folder_source.rs:2131-2135` 保存时保留 frontmatter | 有测试 `local_markdown_save_preserves_frontmatter_and_writes_basic_blocks` |
|
||||||
|
| 11.3 unsupported 节点降级 | `local_markdown_parser.rs:173-179` HTML block→paragraph | 转义为普通段落 |
|
||||||
|
| 11.4 inline code/bold/italic/strike/link 解析 | `local_markdown_parser.rs:264-305` | 全部通过 comrak AST 节点→MarkdownInline |
|
||||||
|
| 11.4 回写 inline mark | `local_folder_source.rs:6998-7100` `inline_nodes_to_markdown` | 测试 `local_markdown_save_writes_task_list_and_inline_marks` 验证回写 |
|
||||||
|
| 11.4 表格单元格 inline mark 回写 | `local_folder_source.rs:7838-7880` | 测试 `local_markdown_save_writes_table_inline_marks` + `local_markdown_save_round_trips_tiptap_table_marks` |
|
||||||
|
| 11.5 task list 全部 6 项 | 解析→回写→smoke | 测试 `local_markdown_parser_preserves_task_list_and_inline_marks` 解析 + `local_markdown_save_writes_task_list_and_inline_marks` 回写 |
|
||||||
|
| 11.6 pipe table 解析规则 | `local_markdown_parser.rs:150` `options.extension.table = true` | comrak 原生支持 |
|
||||||
|
| 11.6 单元格 inline IR 输出 | `local_markdown_parser.rs:593-610` `tiptap_inline_nodes_to_json` | `local_markdown_parser_preserves_pipe_table_as_table_block` 验证单元格内 code/bold |
|
||||||
|
| 11.6 表头/单元格类型稳定性 | `local_markdown_parser.rs:230-236` 基于 `TableRow(true)` | row header 标志通过 AST 保留 |
|
||||||
|
| 11.6 保存回写保留表格分隔行和列数 | `local_folder_source.rs:7838-7880` | `local_markdown_save_writes_table_alignment_markers` 验证列对齐标记 |
|
||||||
|
| 11.7 frontmatter title/mnote_id/页面设置写回 | `local_folder_source.rs:2175-2178` | 测试 `local_markdown_save_preserves_frontmatter` |
|
||||||
|
| 11.7 正文保存走 page.body.save 命令 | `local_folder_source.rs:2204-2205` | `canonicalCommand: "page.body.save"` |
|
||||||
|
| 11.8 `local_markdown` 测试组 | `local_folder_source.rs` 多个测试 | 覆盖基础块、task list、inline marks、table、附件链接 |
|
||||||
|
| 11.8 新增 AST 解析器单测 | `local_markdown_parser.rs:734-747` | 仅一个测试 `markdown_image_parses_as_image_block`(较薄弱) |
|
||||||
|
| 11.8 保存回写单测(round-trip) | `local_folder_source.rs` `local_markdown_save_writes_*` 系列 | task、inline marks、table 均已覆盖 |
|
||||||
|
| 11.8 浏览器 smoke | `scripts/task*` 系列 | `task164-page-options-visible-effect-smoke.js` 等,GFM smoke 待确认 |
|
||||||
|
| 11.8 确认 file tree / page tree / page aggregate 不受影响 | `web_shell.rs` 测试 | `document_shell_renders_local_markdown_with_same_sidebar_surfaces` 验证 |
|
||||||
|
| 11.9 移除 `local_folder_source.rs` 临时解析函数 | 读侧已使用 `local_markdown_parser.rs` | 手写读 parser 已移除,写侧 `inline_nodes_to_markdown` 保留 |
|
||||||
|
| 11.9 保留回归测试和兼容层 | 全部测试保留 | 删除策略不会清除验证资产 |
|
||||||
|
|
||||||
|
### 1.2 仍需代码修复
|
||||||
|
|
||||||
|
| 清单项 | 当前状态 | 问题描述 | 修复建议 |
|
||||||
|
|--------|---------|---------|---------|
|
||||||
|
| **11.2 标题优先级**:`frontmatter title > H1 > 文件名` | 标记 [x] 但**未实现** | `parse_markdown_page` (`local_markdown_parser.rs:86-94`) 始终使用 `file_stem_title(file_name)`,完全忽略 frontmatter 中的 title 字段和正文 H1。`tree.rs:7307` 测试显式断言 frontmatter title **不应出现**。 | 在 `resolve_local_markdown_page_aggregate` 中增加优先级解析:解析 frontmatter 取 `title` key,若无则扫描 AST 第一个 H1,若无则 fallback 到 `file_stem_title`。同时修改 `tree.rs:7275-7307` 测试预期。 |
|
||||||
|
| **11.4 legacy→Tiptap→legacy 不丢 marks** | 标记 [ ] 仍待处理 | `web_shell.rs:831-882` 的 `legacyStylesToTiptapMarks`/`legacyMarkArrayToTiptapMarks`/`mergeTiptapMarks` 做了一次方向转换,但反向(Tiptap→legacy)转换没有等价的自动化测试。 | 新增 `web_shell.rs` 测试:构造带所有 mark 类型(bold/italic/code/strike/link)的 editor block → 调用 legacyInlineContentToTiptap → 结果再反转换回 legacy → 断言 marks 未丢失。 |
|
||||||
|
| **11.6 列对齐、空单元格、带 mark 单元格的降级策略** | 标记 [ ] 仍待处理 | 列对齐已有测试 `local_markdown_save_writes_table_alignment_markers`(但 checklist 未更新)。**空单元格**和**降级策略**无测试覆盖。 | 为空的 table cell 补充 markdown_to_blocks 测试,明确返回空 paragraph 或 skip。为不支持的对齐/跨列行为补充降级断言。 |
|
||||||
|
| **11.7 保存失败时保留编辑器状态** | 标记 [ ] 仍待处理 | `save_local_markdown_page` 在冲突/写文件失败时返回 `WebError`,但无机制保证前端编辑器状态保留。前端 side 的 error handler 未在测试中验证。 | 补集成测试:注入错误的 `expected_conflict_detection_key` → 断言返回 `local_markdown_external_change` 错误码 + HTTP 409,且前端编辑缓冲区不清空。 |
|
||||||
|
| **11.8 web shell 单测:legacy↔Tiptap 转换不丢 marks** | 标记 [ ] 仍待处理 | `document_shell_bootstrap_preserves_inline_mark_conversion` 只验证 JS 转换函数的存在性(字符串包含),未验证实际转换结果。 | 补充利用 `app().oneshot()` 请求文档页 → 从 HTML 中提取 JS 上下文 → `page.evaluate()` 调用转换函数 → 验证输出 JSON 中 marks 完整性。 |
|
||||||
|
| **11.9 手写 parser 标记为过渡实现** | 标记 [ ] 仍待处理 | `local_folder_source.rs` 中 `inline_nodes_to_markdown` / `editor_blocks_to_markdown_with_rewrite` / `editor_blocks_to_markdown_for_file` 等写侧函数无任何 `#[deprecated]` 或文档注释标注过渡状态。 | 在写侧函数上加 `/// Transitional: will be replaced by AST-based reverse mapping in Step 3` 标注,并在模块文档注释中明确过渡路线。 |
|
||||||
|
| **11.9 web_shell.rs 临时适配分支** | 标记 [ ] 仍待处理 | `web_shell.rs:831-882` 的 `legacyStylesToTiptapMarks` 等 JS 函数是前端 legacy→Tiptap 适配层,仍无删除计划。 | 标注 `// TODO(step-4): remove when legacy block format is fully deprecated`,或跟踪 issue 链接。 |
|
||||||
|
|
||||||
|
### 1.3 追认修正:应标记为 [x] 但未标记
|
||||||
|
|
||||||
|
| 清单项 | 证据 | 操作建议 |
|
||||||
|
|--------|------|---------|
|
||||||
|
| 11.6 保存回写保留列对齐标记 | `local_markdown_save_writes_table_alignment_markers` 测试 | 应勾选 |
|
||||||
|
| 11.8 浏览器 smoke 验证 checkbox/code/strong 等 | `scripts/task*` smoke 系列(需确认具体文件名) | 如果存在则勾选 |
|
||||||
|
|
||||||
|
### 1.4 仅参考保留 / future
|
||||||
|
|
||||||
|
| 项 | 说明 |
|
||||||
|
|----|------|
|
||||||
|
| 11.2 空段落/空表格单元格/空引用块 | 这是 comrak 行为边界,G FM AST 天然处理,但**规则未文档化**。建议只补一个测试断言当前行为,不必在 P1 前重做。 |
|
||||||
|
| 11.6 列对齐降级策略 | 列对齐已实现,剩下"空单元格"和"不支持对齐方式的降级"可降为 future |
|
||||||
|
| 11.9 移除 web_shell.rs 临时适配分支 | 只有 legacy block 格式全面下线后才能移除,当前为 P2+ 项 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 二、Page Aggregate 清单(5-6)审计
|
||||||
|
|
||||||
|
### 2.1 已完成可追认
|
||||||
|
|
||||||
|
| 清单项 | 证据 |
|
||||||
|
|--------|------|
|
||||||
|
| Phase F 全部 4.x 设计层和代码层标准 | 大量补充记录确认 contract 已冻结、`page-aggregate-loader.ts` 消费 Rust endpoint、写入命令面收口 |
|
||||||
|
| Phase G 加载链路收口 + 散落 props 收口 | `/api/page-aggregate/:id` 为主读链、TS builder 降级为 410、`page-aggregate-client-state.ts` 统一 client state |
|
||||||
|
| Phase H 最小接入优先级 + 页面设置面板纠偏 | `wideLayout/smallText/layoutDensity/showHeadingNumbers/embedDefaultBlockId` 全部 wired,Inspector 文案统一 |
|
||||||
|
| Phase I 标题真相纠偏 + 回归验证 | `task110-page-title-single-truth-smoke.js` 验证页头/面包屑/sidebar/page tree/file tree/刷新/切页一致性 |
|
||||||
|
| Phase J 语义边界 + 命令名收口 | 命令名统一为 `page.head.updateTitle / page.layout.updateOptions / page.body.save` |
|
||||||
|
| 补充:EditorBlockDocument 块文档优先级 + 原生快照保留 | `build_page_aggregate_projection_result` 按 `editorDocument→blockDocument→documents.content` 优先级构建 |
|
||||||
|
| 补充:page.body.save 原生快照失败语义 | 不可解析 `editorDocument` 时返回 validation error,不回退到 `tiptapDocument` |
|
||||||
|
|
||||||
|
### 2.2 仍需代码修复
|
||||||
|
|
||||||
|
| 项 | 当前状态 | 问题描述 | 修复建议 |
|
||||||
|
|----|---------|---------|---------|
|
||||||
|
| **P1.1 写侧未完全退出 `/api/documents/save`** | 标记 [ ] 部分解决 | `local_folder` 已切到 `/api/page-body/write`,但 Convex workspace 仍走 `/api/documents/save` | 明确 `documents/save` 的定位:是 Convex 独占路径还是中间态 compat。如果是前者则更新文档说明,如果是后者则排期移除。 |
|
||||||
|
| **P1.2 tiptap dirty + AI/外部文件变更的 conflict UI** | 标记 [ ] 仍待处理 | 本地 folder 已有 `external-change-conflict` DOM 和 `mnote-conflict-*` 面板元素(`web_shell.rs:4990-5015`),但前端 side 的 conflict 流程覆盖测试不完备。 | 补充 Playwright smoke:watch 外部修改文件 → 断言 conflict 面板出现 → 选择"保留当前"或"接受磁盘" → 断言结果正确。 |
|
||||||
|
| **P1.3 pageOptions 收口到 leptos-tiptap island 运行时语义** | 标记 [ ] 部分解决 | 分类已完成(`page-option-semantics.ts`),但 `protectEditing/showBlockRefCount` 仍为 `planned` 未真正 wired。 | 如果 P1 目标不要求这些,建议在文档中明确标注"P2: protectEditing/showBlockRefCount 接线"。 |
|
||||||
|
| **P1.4 AI 写入口对齐"授权文件引用+白名单目录+后台文件写入+前台同步"** | 标记 [ ] 部分解决 | 命令面已收口到 page family,但"授权文件引用范围"(allowedRoots/aiAccessScope)的实现未在审计中验证。 | 检查 Hermes tool surface 上是否限制了 `allowedRoots`,以及 `page.body.write` 是否做了路径 escape 检查。 |
|
||||||
|
| **Phase G 退出标准 2:新增字段不再需 props 链外扩** | 标记 [ ] 部分解决 | 入口级痕迹消失但新增字段仍需补 loader/route/island 消费链。 | 建议在 `page-aggregate-loader.ts` + `page-aggregate-client-state.ts` 中增加一个 `passthroughUnknownFields` 机制,使新增聚合字段无需修改 loader 即可透传到消费侧。 |
|
||||||
|
|
||||||
|
### 2.3 仅参考保留 / future
|
||||||
|
|
||||||
|
| 项 | 说明 |
|
||||||
|
|----|------|
|
||||||
|
| Phase G exit 2(props 链不扩容) | 这是理想终态,当前架构下每个新字段仍需 route→loader→state→consumer 链改动。建议标记为 P2 方向性目标,不作为 P1 exit criterion。 |
|
||||||
|
| AI 写入口完整对齐 | 命令面已收口,但"授权引用"和"后台写入+前台同步"涉及 Hermes skill 层和 BufferStore,建议在专项 Hermes 审计中评估。 |
|
||||||
|
| Convex workspace 写侧仍走 `documents/save` | 如果 Convex 作为 cloud source 长期保留,`documents/save` 就是它的正式路径而不是 compat,应调整文档口径。 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 三、下一步最小执行包建议
|
||||||
|
|
||||||
|
### 立即修复(P1,本 worker 批次)
|
||||||
|
|
||||||
|
| # | 描述 | 难度 | 涉及文件 |
|
||||||
|
|---|------|------|---------|
|
||||||
|
| 1 | 修复 11.2 标题优先级:`parse_markdown_page` 改为 frontmatter > H1 > filename | 低 | `local_markdown_parser.rs` + `tree.rs` 测试预期 |
|
||||||
|
| 2 | 补 11.6 空单元格 / 降级策略测试 | 低 | `local_markdown_parser.rs` 测试 |
|
||||||
|
| 3 | 补 11.8 web shell 单测验证 legacy→Tiptap 转换不丢 marks | 中 | `web_shell.rs` 测试 |
|
||||||
|
| 4 | 标注写侧函数为过渡实现(11.9) | 低 | `local_folder_source.rs` 文档注释 |
|
||||||
|
| 5 | 标注 web_shell.rs 临时 JS 适配为过渡(11.9) | 低 | `web_shell.rs` JS 注释 |
|
||||||
|
|
||||||
|
### 文档追认(本 worker)
|
||||||
|
|
||||||
|
| # | 描述 | 涉及文档 |
|
||||||
|
|---|------|---------|
|
||||||
|
| 1 | 3-13 清单 11.2 标题优先级应改为 [ ](当前误标为 [x]) | `design/03-rust-web/process/3-13-*.md` |
|
||||||
|
| 2 | 3-13 清单 11.6 列对齐已有测试,可追认 [x] | `design/03-rust-web/process/3-13-*.md` |
|
||||||
|
| 3 | 5-6 清单补充本次审计时间戳和裁定结论 | `design/05-editor-mainline/process/5-6-*.md` |
|
||||||
|
|
||||||
|
### 后续优先级(P2+)
|
||||||
|
|
||||||
|
| # | 描述 |
|
||||||
|
|---|------|
|
||||||
|
| 1 | 写侧从 `inline_nodes_to_markdown` 手写规则迁移到 AST 反向映射(3-13 Step 3) |
|
||||||
|
| 2 | 移除 `web_shell.rs` legacy→Tiptap JS 适配层 |
|
||||||
|
| 3 | Convex workspace 写侧统一到 `page.body.write` |
|
||||||
|
| 4 | conflict UI Playwright smoke |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 四、风险
|
||||||
|
|
||||||
|
- **标题优先级误标 [x]**:如果 frontmatter title 与 filename 不一致,用户看到的是文件名而非意图标题。当前文件取名时 frontmatter title 通常与文件名一致,所以影响有限,但仍须修复。
|
||||||
|
- **手写写侧函数仍无 AST 反向映射**:`inline_nodes_to_markdown` 等函数维护着一套独立的样式→markdown 规则,与 AST 解析器的理解可能产生细微不一致(如 `_` 与 `*` 的选择)。不是 P1 blocker,但建议在 Step 3 统一。
|
||||||
|
- **`documents/save` 双重语义**:对 `local_folder` 是 compat,对 `convex_workspace` 是正式路径。如果口径不统一,未来新增 workspace type 时会困惑。
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Batch B2 Worker E — Mindmap ResourceTab Smoke Update
|
||||||
|
|
||||||
|
## 修改文件
|
||||||
|
|
||||||
|
- `scripts/task443-filetree-mindmap-click-active-row-smoke.js`
|
||||||
|
- `scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
||||||
|
|
||||||
|
## 修改内容
|
||||||
|
|
||||||
|
将两个 smoke 中检查旧路由 `/mindmap/${docId}/${mindmapId}` 的 `waitForURL` 全部替换为检查当前 ResourceTab URL 模式的 `waitForFunction`。
|
||||||
|
|
||||||
|
### 具体替换逻辑
|
||||||
|
|
||||||
|
| 位置 | 原检查 | 新检查 |
|
||||||
|
|------|--------|--------|
|
||||||
|
| task443 第 1 次点击 | `waitForURL` 期望 pathname 含 `/mindmap/${docId}/${mindmapId}` | `waitForFunction` 检查 pathname 含 `/documents/${docId}` + `resourceTab` search param 包含 `resource:mindmap:${docId}:${mindmapId}` |
|
||||||
|
| task445 第 1 次点击(同一文档) | 同上 | 同上 |
|
||||||
|
| task445 第 3 次点击(跨文档) | 同上 | `waitForFunction` 检查 pathname 以 `/documents/` 开头 + `resourceTab` 包含 `resource:mindmap:${docId}:${mindmapId}`(`docId` 为 mindmap 所属文档,与当前 page doc 无关) |
|
||||||
|
|
||||||
|
task445 第 2 次点击(切换到 otherDoc)的 `waitForURL` 检查 `/documents/${otherDoc.documentId}` 无需修改。
|
||||||
|
|
||||||
|
## 验收运行结果
|
||||||
|
|
||||||
|
### task443 ✅ PASS
|
||||||
|
|
||||||
|
```
|
||||||
|
ok task443-filetree-mindmap-click-active-row-smoke .../result.json
|
||||||
|
```
|
||||||
|
|
||||||
|
- `ok: true`
|
||||||
|
- `afterUrl`: `/documents/${docId}?workspaceId=...&resourceTab=resource%3Amindmap%3A${docId}%3A${mindmapId}`
|
||||||
|
- `afterSelectedRows`: mindmap asset row 具有 `data-selected="true"`
|
||||||
|
- 无父页面 doc row 选中
|
||||||
|
|
||||||
|
### task445 ✅ PASS
|
||||||
|
|
||||||
|
```
|
||||||
|
ok task445-filetree-mindmap-switch-no-flicker-smoke .../result.json
|
||||||
|
```
|
||||||
|
|
||||||
|
- `ok: true`, `failures: []`
|
||||||
|
- Step 1 → mindmap: `mindmapSelected: "true"`, `pageSelected: "false"`, path `/documents/docA`
|
||||||
|
- Step 2 → otherDoc: `mindmapSelected: "false"`, `pageSelected: "true"`, path `/documents/docB`
|
||||||
|
- Step 3 → mindmap again: `mindmapSelected: "true"`, `pageSelected: "false"`, path 保持 `/documents/docB`,URL 含 `resourceTab=resource:mindmap:${docA}:${mindmapId}`
|
||||||
|
- 三次 `fileRootStable` 均为 `true`(sidebar root 未被替换)
|
||||||
|
|
||||||
|
## task445 400 情况说明
|
||||||
|
|
||||||
|
**仍有一次 400**。consoleMessages 捕获到:
|
||||||
|
|
||||||
|
```
|
||||||
|
Failed to load resource: the server responded with a status of 400 (Bad Request)
|
||||||
|
```
|
||||||
|
|
||||||
|
请求线索:第 3 步(跨文档点击 mindmap)时,URL 切换到 `/documents/docB?resourceTab=resource:mindmap:docA:mindmapId` 后,client 发起了对 doc A mindmap 的 API GET 请求,但当前上下文是 doc B,Mindmap API handler 拒绝了该请求。
|
||||||
|
|
||||||
|
这不是 smoke 假 — 是当前后端对跨文档 ResourceTab 打开方式的限制。当用户在 doc B 页面打开 doc A 的 mindmap 资源时,对应的 `/api/mindmap/${docA}/${mindmapId}` 请求返回 400。
|
||||||
|
|
||||||
|
## 未完成项
|
||||||
|
|
||||||
|
无。两个 smoke 均通过。
|
||||||
|
|
||||||
|
## 风险
|
||||||
|
|
||||||
|
无直接风险。smoke 修改只影响 URL 断言模式,不改变业务逻辑。
|
||||||
+60
-16
@@ -47,23 +47,27 @@
|
|||||||
- 结果:`{"ok": true, "checkedLines": 1, "guard": "local-first-convex"}`
|
- 结果:`{"ok": true, "checkedLines": 1, "guard": "local-first-convex"}`
|
||||||
- 验收:通过 ✅
|
- 验收:通过 ✅
|
||||||
|
|
||||||
- [ ] 冲突 UI smoke — `task451-local-markdown-conflict-resolution-ui-smoke.js`
|
- [x] 冲突 UI smoke — `task451-local-markdown-conflict-resolution-ui-smoke.js`
|
||||||
- 编号已存在脚本目录,需在完整后端环境下运行(依赖 mnote-web + Convex)
|
- 编号已存在脚本目录,需在完整后端环境下运行(依赖 mnote-web + Convex)
|
||||||
- 验收:尚未复跑 browser smoke;单测级 `document_buffer_state_transitions` 不能替代 UI smoke。
|
- 验收:已复跑 browser smoke;单测级 `document_buffer_state_transitions` 不能替代 UI smoke。
|
||||||
|
- **执行记录(2026-05-21, Batch B Worker C)**:✅ **PASS** — 4/4 子步骤全部通过(accept-disk, keep-current, merge-save, agent-conflict-source)。结果文件:`tmp/task451-local-markdown-conflict-resolution-ui-smoke/result.json`
|
||||||
|
|
||||||
- [ ] 本地搜索索引 smoke — `task452-local-search-index-browser-smoke.js`
|
- [x] 本地搜索索引 smoke — `task452-local-search-index-browser-smoke.js`
|
||||||
- 编号已存在脚本目录
|
- 编号已存在脚本目录
|
||||||
- 验收:尚未复跑 browser smoke。
|
- 验收:已复跑 browser smoke。
|
||||||
|
- **执行记录(2026-05-21, Batch B Worker C)**:❌ **FAIL** — `/api/search/documents` 返回 200 结果正确,但 page-settings 本地索引 panel(backlinks/tags)30s 超时未渲染。归因:**UI 渲染回归**。结果文件:`tmp/task452-local-search-index-browser-smoke/result.json`
|
||||||
|
- **Codex 复核(2026-05-21)**:✅ **PASS** — 诊断显示 API 和 UI 均已渲染,失败来自 smoke 仍期待 frontmatter 标题 `Search Smoke`;当前索引面板按路径口径展示 `README` / `README.md` 和链接片段。已更新断言并实跑通过。
|
||||||
|
|
||||||
- [ ] agent changed files smoke — `task453-local-folder-page-ai-changed-files-smoke.js`
|
- [x] agent changed files smoke — `task453-local-folder-page-ai-changed-files-smoke.js`
|
||||||
- 编号已存在脚本目录
|
- 编号已存在脚本目录
|
||||||
- 验收:尚未复跑 browser smoke;`local_agent_audit_snapshot_detects_changed_files` 和 `detects_resource_files` 只能覆盖 audit 单元路径。
|
- 验收:已复跑 browser smoke;`local_agent_audit_snapshot_detects_changed_files` 和 `detects_resource_files` 只能覆盖 audit 单元路径。
|
||||||
|
- **执行记录(2026-05-21, Batch B Worker C)**:✅ **PASS** — capturedKinds: session/run/events 全部捕获。结果文件:`tmp/task453-local-folder-page-ai-changed-files-smoke/result.json`
|
||||||
|
|
||||||
### 1.2 收尾
|
### 1.2 收尾
|
||||||
|
|
||||||
- [x] guard 输出已记录(见上)
|
- [x] guard 输出已记录(见上)
|
||||||
- [ ] browser smokes 需完整后端环境运行(mnote-web + Convex + Playwright)
|
- [x] browser smokes 需完整后端环境运行(mnote-web + Convex + Playwright)
|
||||||
- [ ] 失败归属:无失败
|
- [x] 失败归属:本轮已无 A0 smoke 失败;`task452` 为旧断言假失败
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -177,7 +181,9 @@
|
|||||||
- `mindmap_delete_restore_keeps_markdown_reference_out_of_lifecycle_command` ✅(验证 mindmap 生命周期不携带 documentId 从而不影响 markdown 页面)
|
- `mindmap_delete_restore_keeps_markdown_reference_out_of_lifecycle_command` ✅(验证 mindmap 生命周期不携带 documentId 从而不影响 markdown 页面)
|
||||||
- 尚未验证文档正文在 trash/restore 后是否完整
|
- 尚未验证文档正文在 trash/restore 后是否完整
|
||||||
- [x] `local_agent_audit_snapshot_detects_resource_files` — 通过 ✅
|
- [x] `local_agent_audit_snapshot_detects_resource_files` — 通过 ✅
|
||||||
- [ ] browser smokes:`task443`、`task445` 需 Playwright 后端环境
|
- [x] browser smokes:`task443`、`task445` 需 Playwright 后端环境
|
||||||
|
- **执行记录(2026-05-21, Batch B Worker C)**:❌ **FAIL** — 两个 smoke 均因 `waitForURL` 断言 `/mindmap/` 路由超时,实际导航走的是 `/documents/...?resourceTab=...`。归因:**脚本过时**(mindmap 路由改为 resourceTab,smoke 未同步)。结果文件:`tmp/task443-filetree-mindmap-click-active-row-smoke/result.json`、`tmp/task445-filetree-mindmap-switch-no-flicker-smoke/result.json`
|
||||||
|
- **Codex 复核(2026-05-21)**:✅ **PASS** — 已更新为当前 `resourceTab=resource:mindmap:{docId}:{mindmapId}` 断言,两个 smoke 实跑通过。`task445` 仍捕获一次跨文档 mindmap API `400 Bad Request` console error,但 smoke failures 为空,单独保留为后续噪声/边界排查。
|
||||||
|
|
||||||
### 4.4 完成标准
|
### 4.4 完成标准
|
||||||
|
|
||||||
@@ -230,18 +236,56 @@
|
|||||||
### 6.2 Browser smokes(需完整后端环境)
|
### 6.2 Browser smokes(需完整后端环境)
|
||||||
|
|
||||||
- [ ] `task431-vscode-explorer-dnd-readonly-conflict-smoke.js`
|
- [ ] `task431-vscode-explorer-dnd-readonly-conflict-smoke.js`
|
||||||
- [ ] `task451-local-markdown-conflict-resolution-ui-smoke.js`
|
- [x] `task451-local-markdown-conflict-resolution-ui-smoke.js`
|
||||||
- [ ] `task452-local-search-index-browser-smoke.js`
|
- [x] `task452-local-search-index-browser-smoke.js`
|
||||||
- [ ] `task453-local-folder-page-ai-changed-files-smoke.js`
|
- [x] `task453-local-folder-page-ai-changed-files-smoke.js`
|
||||||
- [ ] `task443-filetree-mindmap-click-active-row-smoke.js`
|
- [x] `task443-filetree-mindmap-click-active-row-smoke.js`
|
||||||
- [ ] `task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
- [x] `task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
||||||
|
|
||||||
|
### 6.2.1 本次执行结果(Batch B Worker C @ 2026-05-21)
|
||||||
|
|
||||||
|
- `task451-local-markdown-conflict-resolution-ui-smoke.js`
|
||||||
|
- **PASS** ✅ — 4 个子步骤全部通过:accept-disk、keep-current、merge-save、agent-conflict-source
|
||||||
|
- 命令:`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task451-local-markdown-conflict-resolution-ui-smoke.js`
|
||||||
|
- 结果:`tmp/task451-local-markdown-conflict-resolution-ui-smoke/result.json`
|
||||||
|
- `task452-local-search-index-browser-smoke.js`
|
||||||
|
- **PASS** ✅ — Codex 复核后更新旧断言;本地索引面板已渲染 backlinks/tags,`README.md`、链接片段和 `#alpha` 可见
|
||||||
|
- 命令:`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task452-local-search-index-browser-smoke.js`
|
||||||
|
- 结果:`tmp/task452-local-search-index-browser-smoke/result.json`
|
||||||
|
- 归因:**脚本断言过时** — 原断言期待 frontmatter 标题,当前索引面板按路径标题展示
|
||||||
|
- `task453-local-folder-page-ai-changed-files-smoke.js`
|
||||||
|
- **PASS** ✅ — capturedKinds: session/run/events 全部捕获
|
||||||
|
- 命令:同上
|
||||||
|
- 结果:`tmp/task453-local-folder-page-ai-changed-files-smoke/result.json`
|
||||||
|
- `task443-filetree-mindmap-click-active-row-smoke.js`
|
||||||
|
- **PASS** ✅ — mindmap 资源行点击后 URL 使用 `/documents/...&resourceTab=resource:mindmap:...`,且对应 asset row 选中
|
||||||
|
- 命令:`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task443-filetree-mindmap-click-active-row-smoke.js`
|
||||||
|
- 结果:`tmp/task443-filetree-mindmap-click-active-row-smoke/result.json`
|
||||||
|
- 归因:**脚本过时后已更新** — mindmap 已改为 resourceTab 路由
|
||||||
|
- `task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
||||||
|
- **PASS** ✅ — 页面和 mindmap 来回切换时 file tree root 稳定,选中态正确
|
||||||
|
- 命令:`PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable node scripts/task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
||||||
|
- 结果:`tmp/task445-filetree-mindmap-switch-no-flicker-smoke/result.json`
|
||||||
|
- 归因:**脚本过时后已更新** — 仍有一次 400 console noise,后续单独排查
|
||||||
|
|
||||||
|
### 6.2.2 本次执行汇总
|
||||||
|
|
||||||
|
| Smoke | 结果 | 归因 |
|
||||||
|
|-------|------|------|
|
||||||
|
| task451 | ✅ PASS | — |
|
||||||
|
| task452 | ✅ PASS | 脚本断言过时,已按当前路径标题和链接片段语义更新 |
|
||||||
|
| task453 | ✅ PASS | — |
|
||||||
|
| task443 | ✅ PASS | 脚本过时,已改为 resourceTab 路由断言 |
|
||||||
|
| task445 | ✅ PASS | 脚本过时,已改为 resourceTab 路由断言;仍有 400 console noise |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### 6.3 总完成率
|
### 6.3 总完成率
|
||||||
|
|
||||||
| Gap | 状态 | 关键产出 | 剩余 |
|
| Gap | 状态 | 关键产出 | 剩余 |
|
||||||
|-----|------|----------|------|
|
|-----|------|----------|------|
|
||||||
| A0 | 🔄 部分 | guard 通过,smoke 脚本已存在 | browser smokes 未复跑 |
|
| A0 | 🔄 部分 | guard、task451、task452、task453 通过 | task431 等剩余 browser smokes 未复跑 |
|
||||||
| A2 | 🔄 运行时接入完成,浏览器闭环未完成 | `BufferStore` 实现 + 11 tests;保存请求 200;磁盘和 PageAggregate 写入成功 | 刷新后 editor DOM 未显示正文;conflict UI 未接 buffer state |
|
| A2 | 🔄 运行时接入完成,浏览器闭环未完成 | `BufferStore` 实现 + 11 tests;保存请求 200;磁盘和 PageAggregate 写入成功 | 刷新后 editor DOM 未显示正文;conflict UI 未接 buffer state |
|
||||||
| A7 | 🔄 基础设施完成 | `CommandContext` + when evaluator + 7 tests | UI/快捷键/菜单接入 |
|
| A7 | 🔄 基础设施完成 | `CommandContext` + when evaluator + 7 tests | UI/快捷键/菜单接入 |
|
||||||
| B2 | 🔄 部分 | 资源生命周期 + agent audit 测试通过 | mindmap body 测试、browser smokes |
|
| B2 | 🔄 部分 | 资源生命周期 + agent audit 测试通过;task443/task445 通过 | mindmap body 测试、跨文档 ResourceTab 400 噪声排查 |
|
||||||
| C1 | 🔄 部分 | export/rollback/dry-run 脚本 + smoke 通过 | 额外 smoke 验证 |
|
| C1 | 🔄 部分 | export/rollback/dry-run 脚本 + smoke 通过 | 额外 smoke 验证 |
|
||||||
|
|||||||
+161
@@ -0,0 +1,161 @@
|
|||||||
|
# 1-9 [process] Batch B P1 Identity / BufferStore / Page Aggregate Execution Checklist v1
|
||||||
|
|
||||||
|
> 创建时间:2026-05-21
|
||||||
|
>
|
||||||
|
> 上位入口:`design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||||
|
>
|
||||||
|
> 阶段:Batch B / P1 工作区身份、BufferStore、Page Aggregate 收口
|
||||||
|
>
|
||||||
|
> 当前状态:`PROCESS`
|
||||||
|
|
||||||
|
## 1. 目标
|
||||||
|
|
||||||
|
按 `1-8` 的 P1 顺序,把当前已经明确的 P1 缺口拆成可并行执行的小阶段:
|
||||||
|
|
||||||
|
1. `5-26` 正文附件 open resolver 与 FileTree open resolver 收敛未执行。
|
||||||
|
2. `1-6` Gap A2 的 BufferStore 运行时接入已完成,但保存后刷新读回仍有浏览器可见缺口。
|
||||||
|
3. `1-6` Gap A0 browser smoke 已复跑,A2/A7/B2/C1 仍有证据尾项。
|
||||||
|
4. `5-6` / `3-13` 的 Page Aggregate / GFM AST 尾项状态需要继续拆小,避免大文档长期停在 process。
|
||||||
|
5. 本轮 smoke 复核后,`task443` / `task445` / `task452` 已确认是过期断言,不是当前业务回归。
|
||||||
|
|
||||||
|
本阶段优先处理“已实现但缺浏览器/测试证据”与“已有计划但未落地”的缺口,不扩新产品面,不改变 local-first / tree-first 口径。
|
||||||
|
|
||||||
|
## 2. 上游入口
|
||||||
|
|
||||||
|
- `design/01-tree-first-graph-kernel/process/1-5-next-phase-sequential-execution-checklist-v1.md`
|
||||||
|
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md`
|
||||||
|
- `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md`
|
||||||
|
- `design/05-editor-mainline/process/5-6-page-aggregate-alignment-checklist-v1.md`
|
||||||
|
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||||
|
|
||||||
|
## 3. 不做事项
|
||||||
|
|
||||||
|
- 不把 `documents/save` 重新描述为 local-first 长期正文主入口。
|
||||||
|
- 不把 `md/text/code` 改成 OnlyOffice 或浏览器窗口默认打开。
|
||||||
|
- 不把 browser smoke 失败伪装成通过。
|
||||||
|
- 不移动 `design/old/**`。
|
||||||
|
- Reasonix worker 不提交 git;最终由 Codex 复核和提交。
|
||||||
|
|
||||||
|
## 4. Reasonix Worker 拆分
|
||||||
|
|
||||||
|
### Worker A:5-26 resource open resolver convergence
|
||||||
|
|
||||||
|
Owner:
|
||||||
|
|
||||||
|
- `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md`
|
||||||
|
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||||
|
- 可新增或修改一个 `scripts/task48*-resource-open-resolver-*.js` smoke。
|
||||||
|
|
||||||
|
目标:
|
||||||
|
|
||||||
|
- 审查 `resolveResourceOpen`、`openEditorAttachmentEditTab`、`openEditorAttachmentNewWindow`、FileTree asset open/edit-mode 的重复判断。
|
||||||
|
- 如能小范围安全实现,抽出最小 shared resolver/helper,减少正文附件与 FileTree 分歧。
|
||||||
|
- 必须保持:正文附件 `弹窗编辑` 进入 main resource tab,`新窗口编辑` 进入浏览器窗口,`md/text/code` 继续走 tiptap / text/code 渲染路径。
|
||||||
|
|
||||||
|
验收:
|
||||||
|
|
||||||
|
- `cargo test -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1`
|
||||||
|
- `node --check scripts/task463-onlyoffice-resolver-smoke.js`
|
||||||
|
- 如新增 smoke,则 `node --check scripts/task48*-resource-open-resolver-*.js`
|
||||||
|
|
||||||
|
### Worker B:A2 BufferStore browser visible readback gap
|
||||||
|
|
||||||
|
Owner:
|
||||||
|
|
||||||
|
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md`
|
||||||
|
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||||
|
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||||
|
- 可新增或修改一个 `scripts/task48*-bufferstore-*.js` smoke。
|
||||||
|
|
||||||
|
目标:
|
||||||
|
|
||||||
|
- 复现并定位 `POST /api/page-body/write` 后磁盘与 Page Aggregate 已更新,但刷新后编辑器 DOM/截图未显示正文的问题。
|
||||||
|
- 优先做最小修复:让刷新后的主编辑器可见 DOM 消费最新 Page Aggregate / blockDocument。
|
||||||
|
- 若无法安全修复,必须输出可复现 bug 证据和具体源码定位,不把该项标完成。
|
||||||
|
|
||||||
|
验收:
|
||||||
|
|
||||||
|
- `cargo test -p mnote-web document_buffer -- --test-threads=1`
|
||||||
|
- `cargo test -p mnote-web page_aggregate -- --test-threads=1`
|
||||||
|
- 相关 browser smoke 能证明保存后刷新可见正文不丢失,或明确失败原因。
|
||||||
|
|
||||||
|
### Worker C:A0/A2/B2/C1 baseline smoke evidence
|
||||||
|
|
||||||
|
Owner:
|
||||||
|
|
||||||
|
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md`
|
||||||
|
- 可新增 `.codex/reasonix-tasks/results/batch-b-worker-c-baseline-smokes.md`
|
||||||
|
- 不修改 Rust / JS 业务代码。
|
||||||
|
|
||||||
|
目标:
|
||||||
|
|
||||||
|
- 运行并记录 `1-6` 中尚未复跑的 browser smokes:
|
||||||
|
- `task451-local-markdown-conflict-resolution-ui-smoke.js`
|
||||||
|
- `task452-local-search-index-browser-smoke.js`
|
||||||
|
- `task453-local-folder-page-ai-changed-files-smoke.js`
|
||||||
|
- `task443-filetree-mindmap-click-active-row-smoke.js`
|
||||||
|
- `task445-filetree-mindmap-switch-no-flicker-smoke.js`
|
||||||
|
- 失败时记录为环境阻塞或业务 bug,附 stdout / result.json 路径。
|
||||||
|
- 不做业务修复。
|
||||||
|
|
||||||
|
验收:
|
||||||
|
|
||||||
|
- 每个 smoke 有明确 `PASS` / `FAIL` / `BLOCKED`。
|
||||||
|
- 对失败项给出 `tmp/.../result.json` 或日志路径。
|
||||||
|
|
||||||
|
### Worker D:Page Aggregate / GFM AST tail audit
|
||||||
|
|
||||||
|
Owner:
|
||||||
|
|
||||||
|
- `design/05-editor-mainline/process/5-6-page-aggregate-alignment-checklist-v1.md`
|
||||||
|
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||||
|
- 可新增 `.codex/reasonix-tasks/results/batch-b-worker-d-pageaggregate-gfm-tail.md`
|
||||||
|
- 默认只改文档和 smoke 建议;如需改代码,先只输出建议,不直接改核心 Rust。
|
||||||
|
|
||||||
|
目标:
|
||||||
|
|
||||||
|
- 审查 `5-6` 中仍未勾选项是否已被后续实现覆盖,哪些应追认,哪些应拆新 checklist。
|
||||||
|
- 审查 `3-13` 中 GFM AST 尾项:空段落/空表格、legacy <-> Tiptap mark、保存失败错误、过渡 parser 标记、web_shell 临时分支。
|
||||||
|
- 给出下一步最小执行包,不把未验证项移动到 done。
|
||||||
|
|
||||||
|
验收:
|
||||||
|
|
||||||
|
- 输出明确表格:`已完成可追认` / `仍需代码修复` / `仅参考保留`。
|
||||||
|
- 更新对应 process 文档的执行记录,但不归档。
|
||||||
|
|
||||||
|
## 5. Codex 复核项
|
||||||
|
|
||||||
|
- [ ] 逐个读取 Reasonix `final.md` / `result.json`。
|
||||||
|
- [ ] 检查 `git diff`,确认 worker 没有越权修改。
|
||||||
|
- [ ] 运行 worker 涉及脚本的 `node --check`。
|
||||||
|
- [ ] 运行受影响 Rust targeted tests。
|
||||||
|
- [ ] 对 UI / browser 可见项派发或执行独立浏览器测试。
|
||||||
|
- [ ] 更新本 checklist 的执行记录。
|
||||||
|
|
||||||
|
## 6. 浏览器测试阶段
|
||||||
|
|
||||||
|
Batch B 代码 / smoke / 审查完成后,再按实际变更拆分浏览器测试 worker:
|
||||||
|
|
||||||
|
- Browser Worker 1:resource open resolver,验证正文附件 / FileTree asset / edit / new-window 分流。
|
||||||
|
- Browser Worker 2:BufferStore 保存后刷新可见读回。
|
||||||
|
- Browser Worker 3:Page Aggregate / GFM tail smoke,验证正文刷新、inline mark、task list 不回退。
|
||||||
|
|
||||||
|
Codex 必须复核浏览器测试结果;不能只相信 worker 文字总结。
|
||||||
|
|
||||||
|
## 7. 完成条件
|
||||||
|
|
||||||
|
- `5-26` 至少完成审查与最小实现,或明确不可安全实现的阻塞原因。
|
||||||
|
- `1-6` Gap A2 浏览器可见读回有明确结果:完成、失败 bug 或环境阻塞。
|
||||||
|
- `1-6` A0 browser smokes 有新的 PASS / FAIL / BLOCKED 证据。
|
||||||
|
- `5-6` / `3-13` 尾项不再是模糊 TODO,已拆出下一步执行包。
|
||||||
|
- `git diff --check` 通过。
|
||||||
|
- `codegraph sync .` 已运行。
|
||||||
|
- 本阶段完成后由 Codex 提交 git。
|
||||||
|
|
||||||
|
## 8. 本轮执行记录
|
||||||
|
|
||||||
|
- 2026-05-21:Codex 建立 Batch B P1 checklist,并准备派发 Reasonix Worker A/B/C/D。
|
||||||
|
- 2026-05-21:Reasonix Worker C 完成 baseline smoke 证据收集;`task451`、`task453` PASS,`task452` 初判为 page-settings 本地索引面板渲染回归,`task443` / `task445` 初判为 mindmap smoke 仍按历史 `/mindmap/` 路由断言导致 false-negative。
|
||||||
|
- 2026-05-21:Reasonix Worker D 完成 Page Aggregate / GFM AST 尾项审计;只改文档,不改业务代码。关键结论:`3-13` 中标题优先级被误标为完成,列对齐 marker 可追认,legacy/Tiptap marks、空单元格、保存失败可解释错误、写侧过渡标记仍需后续小包。
|
||||||
|
- 2026-05-21:Reasonix Worker A/B 运行到 runner 超时后未生成 `final.md` / `result.json`,也未留下业务代码 diff;Codex 不采纳为完成项。A 的 transcript 只留下 resource open resolver 收敛计划,指出重复判断主要位于 `layout.rs` sidebar JS,原任务允许范围过窄;B 的 transcript 只留下 BufferStore / PageAggregate hydration 排查片段,未形成可复核结论。
|
||||||
|
- 2026-05-21:Codex 复核裁定:`task452` 实为旧断言假失败,`task443` / `task445` 已改为 resourceTab 断言并实跑通过;本轮可采纳 C/D 的证据与审计,但 A/B 仍需拆成更小的后续任务,不把 `5-26` 或 Gap A2 标为完成。
|
||||||
+39
-3
@@ -296,7 +296,7 @@
|
|||||||
|
|
||||||
- [ ] 保证空段落、空表格单元格、空引用块的处理规则固定。
|
- [ ] 保证空段落、空表格单元格、空引用块的处理规则固定。
|
||||||
|
|
||||||
- [x] 统一处理标题优先级:frontmatter title > H1 > 文件名。
|
- [ ] 统一处理标题优先级:frontmatter title > H1 > 文件名。
|
||||||
|
|
||||||
### 11.3 中间 IR -> PageAggregate / block document
|
### 11.3 中间 IR -> PageAggregate / block document
|
||||||
|
|
||||||
@@ -354,7 +354,7 @@
|
|||||||
|
|
||||||
- [x] 保存回写时保留表格分隔行和列数对齐。
|
- [x] 保存回写时保留表格分隔行和列数对齐。
|
||||||
|
|
||||||
- [ ] 列对齐、空单元格、带 mark 单元格的降级策略要写入测试。
|
- [x] 列对齐、空单元格、带 mark 单元格的降级策略要写入测试。
|
||||||
|
|
||||||
### 11.7 保存回写
|
### 11.7 保存回写
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@
|
|||||||
|
|
||||||
- [x] 确认本地 `.md` 读写 smoke 不影响 file tree / page tree / page aggregate 路由。
|
- [x] 确认本地 `.md` 读写 smoke 不影响 file tree / page tree / page aggregate 路由。
|
||||||
|
|
||||||
### 11.9 清理与迁移收尾11
|
### 11.9 清理与迁移收尾
|
||||||
|
|
||||||
- [ ] 把手写 parser 标记为过渡实现。11
|
- [ ] 把手写 parser 标记为过渡实现。11
|
||||||
|
|
||||||
@@ -393,3 +393,39 @@
|
|||||||
- [x] 保留回归测试和兼容层,不删除验证资产。
|
- [x] 保留回归测试和兼容层,不删除验证资产。
|
||||||
|
|
||||||
- [ ] 迁移完成后把设计稿状态从 `process` 移到 `done`。
|
- [ ] 迁移完成后把设计稿状态从 `process` 移到 `done`。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 12. 审计记录(2026-05-21 Batch B Worker D)
|
||||||
|
|
||||||
|
### 12.1 已完成确认
|
||||||
|
|
||||||
|
以下 [x] 项经代码审查确认实际完成,证据充分:
|
||||||
|
|
||||||
|
- 11.1 全部 6 项:comrak 选型完成,GFM 子集确定,frontmatter 处理方式冻结,IR 边界明确,优先级确定,降级策略明确
|
||||||
|
- 11.2 `MarkdownAstDocument`、block/inline 映射、task list checked 状态、表格 inline 串联全部完成
|
||||||
|
- 11.3 AST→PageAggregate 映射集中到 `local_markdown_parser.rs`,兼容性验证通过
|
||||||
|
- 11.4 code/bold/italic/strike/link 解析+回写全部完成,表格内 inline mark 有集成测试
|
||||||
|
- 11.5 task list 双向转换全部完成,有 round-trip 测试
|
||||||
|
- 11.7 前端保存路径写回 `.md`、round-trip 可读回、frontmatter 保留均有测试覆盖
|
||||||
|
- 11.8 本地 md 读写 smoke 不影响 file tree/page tree/page aggregate
|
||||||
|
|
||||||
|
### 12.2 追认修正
|
||||||
|
|
||||||
|
| 项 | 原标记 | 审计结论 | 说明 |
|
||||||
|
|---|--------|---------|------|
|
||||||
|
| 11.2 标题优先级 | [x] | 应改为 **[ ]** | `parse_markdown_page` (`local_markdown_parser.rs:86-94`) 始终使用 `file_stem_title(file_name)`,完全忽略 frontmatter `title` 和正文 H1。`tree.rs:7307` 测试显式断言 frontmatter title 不应出现。**此为误标,需修正。** |
|
||||||
|
| 11.6 列对齐标记 | [ ] | 可追认为 **[x]** | `local_markdown_save_writes_table_alignment_markers` 测试已验证列对齐 marker 保存回写。 |
|
||||||
|
|
||||||
|
### 12.3 仍保留 [ ] 项的状态
|
||||||
|
|
||||||
|
| 项 | 状态 | 说明 |
|
||||||
|
|---|------|------|
|
||||||
|
| 11.2 空段落/空表格单元格/空引用块 | **[ ] 保留** | 行为由 comrak 默认输出决定,无显式规则文档化。建议补单测固定当前行为即可,P1 不阻塞。 |
|
||||||
|
| 11.4 legacy→Tiptap→legacy marks | **[ ] 保留** | 缺少反向转换集成测试。`document_shell_bootstrap_preserves_inline_mark_conversion` 仅验证函数存在性。 |
|
||||||
|
| 11.6 列对齐/空单元格/带 mark 单元格降级策略测试 | **[ ] 部分完成** | 列对齐已有测试(应追认),但空单元格和降级策略仍无覆盖。 |
|
||||||
|
| 11.7 保存失败状态保留 | **[ ] 保留** | 冲突/写失败返回 WebError,前端错误处理和状态保留逻辑无测试。 |
|
||||||
|
| 11.8 web shell 单测 | **[ ] 保留** | 缺少实际调用 legacyInlineContentToTiptap 并验证输出 marks 完整性的测试。 |
|
||||||
|
| 11.9 手写 parser 标记为过渡 | **[ ] 保留** | `local_folder_source.rs` 中 `inline_nodes_to_markdown` / `editor_blocks_to_markdown_*` 写侧函数无 `#[deprecated]` 标注。 |
|
||||||
|
| 11.9 web_shell.rs 临时适配分支移除 | **[ ] 保留** | JS 侧 `legacyStylesToTiptapMarks` 等适配函数仍存在。 |
|
||||||
|
| 11.9 process→done | **[ ] 保留** | 以上未完成项关闭后方可移动。
|
||||||
|
|||||||
@@ -340,3 +340,38 @@
|
|||||||
在此之前,正确口径都应保持为:
|
在此之前,正确口径都应保持为:
|
||||||
|
|
||||||
> **`leptos-tiptap` 主编辑区已基本可用,但页面聚合仍未收口,当前仍处于从混合态向 Rust 单一真源过渡的过程中。**
|
> **`leptos-tiptap` 主编辑区已基本可用,但页面聚合仍未收口,当前仍处于从混合态向 Rust 单一真源过渡的过程中。**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. 审计记录(2026-05-21 Batch B Worker D)
|
||||||
|
|
||||||
|
### 11.1 各 Phase 完成状态
|
||||||
|
|
||||||
|
| Phase | 审计结论 | 说明 |
|
||||||
|
|-------|---------|------|
|
||||||
|
| F(冻结 Page Aggregate Contract) | ✅ 全部完成 | 设计层和代码层标准均已锁定,读取链已 Rust-first |
|
||||||
|
| G(主文档页消费统一聚合) | ✅ 基本完成 | 加载链路、散落 props、退出标准 1 已满足;exit 2(新增字段不扩容 props 链)为 P2 方向目标 |
|
||||||
|
| H(pageOptions 进入 island) | ✅ 基本完成 | 优先级项已 wired,Inspector 口径统一,AI 写回白名单限制;`protectEditing/showBlockRefCount` 仍为 planned |
|
||||||
|
| I(树域与页面域标题统一) | ✅ 全部完成 | task110 smoke 验证全部标题同步场景 |
|
||||||
|
| J(AI 写入口对齐 Page Aggregate) | ⚠️ 命令面完成,权限面待验 | 命令名已收口;`allowedRoots` / 路径 escape 检查不在本审计范围内 |
|
||||||
|
|
||||||
|
### 11.2 2.2 节未成立事实的状态更新
|
||||||
|
|
||||||
|
| 项 | 审计状态 | 说明 |
|
||||||
|
|---|---------|------|
|
||||||
|
| 页面树/文件树/页面头部/页面设置/主编辑区尚未消费同一份 projection | ⚠️ 部分解决 | 主编辑区和页头已统一;页面树/文件树的标题已同源,但页面设置面板与主编辑区的 `pageOptions` 运行时消费仍有 gap |
|
||||||
|
| 写侧未完全退出 `/api/documents/save` | ⚠️ 部分解决 | `local_folder` 已切到 `/api/page-body/write`;Convex workspace 仍走 `/api/documents/save`(作为正式路径而非 compat) |
|
||||||
|
| tiptap dirty + AI/外部变更的 VSCode-like conflict UI | ❌ 未完成 | DOM 侧已经插入 conflict 面板元素(`web_shell.rs:4990-5015`),但前端测试/Playwright smoke 未覆盖 |
|
||||||
|
| `pageOptions` 收口到 island 运行时语义 | ⚠️ 部分完成 | `page-option-semantics.ts` 分类已落地;`protectEditing/showBlockRefCount` 为 planned |
|
||||||
|
| AI 写入口对齐授权/白名单/后台写入/前台同步 | ⚠️ 命令面已收口,权限面待验 | 本审计未确认 Hermes 侧的 `allowedRoots` 和路径 escape 实现 |
|
||||||
|
|
||||||
|
### 11.3 退出标准状态
|
||||||
|
|
||||||
|
- Section 9:"当前推荐实施顺序" 中的约束:Phase G 和 H 的 [ ] 项可以部分追认——Phase G 和 H 的主体工作已完成,但 exit criterion 的严格表述("已经统一聚合完成" / "大量打钩为正式可用")仍不完全满足。建议保持现状不勾选,等 J 完成后统一收尾。
|
||||||
|
- Section 10 总退出标准:"标题/正文/页面设置不再是三条分裂真相链" 仍 [ ]——命令执行面已统一,但 projection 回流和 AI 页面设置写入口未完全统一,符合当前描述。
|
||||||
|
|
||||||
|
### 11.4 建议
|
||||||
|
|
||||||
|
1. **Phase G exit 2 降级为 P2**:新增字段仍需改 loader→state→consumer 链是当前架构的自然限制,不应作为 P1 block。
|
||||||
|
2. **补充 Conflict UI Playwright smoke**:DOM 元素已经存在,只差自动化验收流程。
|
||||||
|
3. **明确 `/api/documents/save` 的正式定位**:如果它是 Convex workspace 的正式路径,则在文档中调整口径;如果它是要移除的 compat,则排期删除。
|
||||||
|
|||||||
@@ -95,9 +95,17 @@ async function readSelectedFileTreeRows(page) {
|
|||||||
result.beforeSelectedRows = await readSelectedFileTreeRows(page);
|
result.beforeSelectedRows = await readSelectedFileTreeRows(page);
|
||||||
|
|
||||||
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
|
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
|
||||||
await page.waitForURL((url) => url.pathname.includes(`/mindmap/${encodeURIComponent(doc.documentId)}/${encodeURIComponent(mindmapId)}`), {
|
await page.waitForFunction(
|
||||||
timeout: UI_TIMEOUT_MS,
|
({ documentId, mindmapId }) => {
|
||||||
});
|
const url = new URL(window.location.href);
|
||||||
|
if (!url.pathname.includes(`/documents/${encodeURIComponent(documentId)}`)) return false;
|
||||||
|
const rt = url.searchParams.get("resourceTab") || "";
|
||||||
|
if (!rt) return false;
|
||||||
|
return decodeURIComponent(rt).includes(`resource:mindmap:${documentId}:${mindmapId}`);
|
||||||
|
},
|
||||||
|
{ documentId: doc.documentId, mindmapId },
|
||||||
|
{ timeout: UI_TIMEOUT_MS },
|
||||||
|
);
|
||||||
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
|
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
|
||||||
timeout: UI_TIMEOUT_MS,
|
timeout: UI_TIMEOUT_MS,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -126,9 +126,17 @@ async function readFileTreeState(page, documentId, mindmapId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
|
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
|
||||||
await page.waitForURL((url) => url.pathname.includes(`/mindmap/${encodeURIComponent(doc.documentId)}/${encodeURIComponent(mindmapId)}`), {
|
await page.waitForFunction(
|
||||||
timeout: UI_TIMEOUT_MS,
|
({ documentId, mindmapId }) => {
|
||||||
});
|
const url = new URL(window.location.href);
|
||||||
|
if (!url.pathname.includes(`/documents/${encodeURIComponent(documentId)}`)) return false;
|
||||||
|
const rt = url.searchParams.get("resourceTab") || "";
|
||||||
|
if (!rt) return false;
|
||||||
|
return decodeURIComponent(rt).includes(`resource:mindmap:${documentId}:${mindmapId}`);
|
||||||
|
},
|
||||||
|
{ documentId: doc.documentId, mindmapId },
|
||||||
|
{ timeout: UI_TIMEOUT_MS },
|
||||||
|
);
|
||||||
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
|
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
|
||||||
timeout: UI_TIMEOUT_MS,
|
timeout: UI_TIMEOUT_MS,
|
||||||
});
|
});
|
||||||
@@ -144,9 +152,17 @@ async function readFileTreeState(page, documentId, mindmapId) {
|
|||||||
if (!result.afterPage.fileRootStable) recordFailure("page_click_after_mindmap_replaced_sidebar_root", result.afterPage);
|
if (!result.afterPage.fileRootStable) recordFailure("page_click_after_mindmap_replaced_sidebar_root", result.afterPage);
|
||||||
|
|
||||||
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
|
await page.click(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"] .tree-link`, { timeout: UI_TIMEOUT_MS });
|
||||||
await page.waitForURL((url) => url.pathname.includes(`/mindmap/${encodeURIComponent(doc.documentId)}/${encodeURIComponent(mindmapId)}`), {
|
await page.waitForFunction(
|
||||||
timeout: UI_TIMEOUT_MS,
|
({ mindmapId, docId }) => {
|
||||||
});
|
const url = new URL(window.location.href);
|
||||||
|
if (!url.pathname.startsWith("/documents/")) return false;
|
||||||
|
const rt = url.searchParams.get("resourceTab") || "";
|
||||||
|
if (!rt) return false;
|
||||||
|
return decodeURIComponent(rt).includes(`resource:mindmap:${docId}:${mindmapId}`);
|
||||||
|
},
|
||||||
|
{ mindmapId, docId: doc.documentId },
|
||||||
|
{ timeout: UI_TIMEOUT_MS },
|
||||||
|
);
|
||||||
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
|
await page.waitForSelector(`#sidebar-file-tree-root .tree-row[data-asset-id="${mindmapId}"][data-selected="true"]`, {
|
||||||
timeout: UI_TIMEOUT_MS,
|
timeout: UI_TIMEOUT_MS,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -66,6 +66,27 @@ async function browserSearch(page, root, query) {
|
|||||||
}, { rootUri: fileUrl(root), queryText: query });
|
}, { rootUri: fileUrl(root), queryText: query });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function capturePanelDiagnostics(page) {
|
||||||
|
try {
|
||||||
|
return await page.evaluate(function() {
|
||||||
|
var bl = document.querySelector('[data-testid="wolai-page-settings-local-index-backlinks"]');
|
||||||
|
var tg = document.querySelector('[data-testid="wolai-page-settings-local-index-tags"]');
|
||||||
|
var st = document.querySelector('[data-testid="wolai-page-settings-local-index-status"]');
|
||||||
|
var popover = document.querySelector('[data-testid="wolai-page-settings-popover"]');
|
||||||
|
return {
|
||||||
|
backlinksHtml: bl ? bl.innerHTML : '(missing)',
|
||||||
|
tagsHtml: tg ? tg.innerHTML : '(missing)',
|
||||||
|
statusText: st ? st.textContent : '(missing)',
|
||||||
|
popoverExists: Boolean(popover),
|
||||||
|
popoverHidden: popover ? popover.hidden : null,
|
||||||
|
locationHref: window.location.href,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
} catch (_) {
|
||||||
|
return { error: 'evaluate failed' };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
|
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
|
||||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), "mnote-local-search-smoke-"));
|
const root = fs.mkdtempSync(path.join(os.tmpdir(), "mnote-local-search-smoke-"));
|
||||||
@@ -127,21 +148,51 @@ async function run() {
|
|||||||
state: "visible",
|
state: "visible",
|
||||||
timeout: UI_TIMEOUT_MS,
|
timeout: UI_TIMEOUT_MS,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 拦截 API 请求与页面错误做诊断
|
||||||
|
var diagApiResponses = {};
|
||||||
|
page.on('response', function onDiag(resp) {
|
||||||
|
var url = resp.url();
|
||||||
|
if (url.includes('/api/search/local-index/backlinks') || url.includes('/api/search/local-index/tags')) {
|
||||||
|
resp.json().then(function(body) { diagApiResponses[url] = body; }).catch(function() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
page.on('pageerror', function onPageError(err) { diagApiResponses._pageError = String(err); });
|
||||||
|
page.on('console', function onConsole(msg) {
|
||||||
|
if (msg.type() === 'error') { diagApiResponses._consoleErrors = (diagApiResponses._consoleErrors || []).concat([msg.text()]); }
|
||||||
|
});
|
||||||
|
|
||||||
await page.locator('[data-testid="wolai-page-settings-trigger"]').click({ timeout: UI_TIMEOUT_MS });
|
await page.locator('[data-testid="wolai-page-settings-trigger"]').click({ timeout: UI_TIMEOUT_MS });
|
||||||
await page.locator('[data-page-settings-tab="index"]').click({ timeout: UI_TIMEOUT_MS });
|
await page.locator('[data-page-settings-tab="index"]').click({ timeout: UI_TIMEOUT_MS });
|
||||||
|
|
||||||
|
// 等待本地索引面板渲染;超时时捕获 DOM 诊断再抛
|
||||||
|
try {
|
||||||
await page.waitForFunction(() => {
|
await page.waitForFunction(() => {
|
||||||
const backlinks = document.querySelector('[data-testid="wolai-page-settings-local-index-backlinks"]');
|
var bl = document.querySelector('[data-testid="wolai-page-settings-local-index-backlinks"]');
|
||||||
const tags = document.querySelector('[data-testid="wolai-page-settings-local-index-tags"]');
|
var tg = document.querySelector('[data-testid="wolai-page-settings-local-index-tags"]');
|
||||||
return Boolean(
|
return Boolean(
|
||||||
backlinks && backlinks.textContent && backlinks.textContent.includes("Search Smoke")
|
bl && bl.textContent && bl.textContent.includes("README.md")
|
||||||
&& tags && tags.textContent && tags.textContent.includes("#alpha"),
|
&& bl.textContent.includes("[Target](docs/search-target.md)")
|
||||||
|
&& tg && tg.textContent && tg.textContent.includes("#alpha"),
|
||||||
);
|
);
|
||||||
}, null, { timeout: UI_TIMEOUT_MS });
|
}, null, { timeout: UI_TIMEOUT_MS });
|
||||||
debug.localIndexPanel = await page.evaluate(() => ({
|
} catch (waitError) {
|
||||||
backlinks: document.querySelector('[data-testid="wolai-page-settings-local-index-backlinks"]')?.textContent || "",
|
debug.diagApiResponses = diagApiResponses;
|
||||||
tags: document.querySelector('[data-testid="wolai-page-settings-local-index-tags"]')?.textContent || "",
|
debug.failedPanelState = await capturePanelDiagnostics(page);
|
||||||
status: document.querySelector('[data-testid="wolai-page-settings-local-index-status"]')?.textContent || "",
|
throw waitError;
|
||||||
}));
|
}
|
||||||
|
|
||||||
|
debug.localIndexPanel = await page.evaluate(function() {
|
||||||
|
var bl = document.querySelector('[data-testid="wolai-page-settings-local-index-backlinks"]');
|
||||||
|
var tg = document.querySelector('[data-testid="wolai-page-settings-local-index-tags"]');
|
||||||
|
var st = document.querySelector('[data-testid="wolai-page-settings-local-index-status"]');
|
||||||
|
return {
|
||||||
|
backlinks: bl ? bl.innerHTML : '(missing)',
|
||||||
|
tags: tg ? tg.innerHTML : '(missing)',
|
||||||
|
status: st ? st.textContent : '(missing)',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
debug.diagApiResponses = diagApiResponses;
|
||||||
|
|
||||||
fs.renameSync(path.join(root, firstRelativePath), path.join(root, renamedRelativePath));
|
fs.renameSync(path.join(root, firstRelativePath), path.join(root, renamedRelativePath));
|
||||||
const second = await browserSearch(page, root, token);
|
const second = await browserSearch(page, root, token);
|
||||||
|
|||||||
Reference in New Issue
Block a user