advance 1-8 post-mvp execution batches
This commit is contained in:
+21
-6
@@ -1,7 +1,11 @@
|
||||
# 3-13 [process] Rust Web 本地 Markdown GFM AST 解析器迁移方案 v1
|
||||
# 3-13 [done] Rust Web 本地 Markdown GFM AST 解析器迁移方案 v1
|
||||
|
||||
> 更新时间:2026-05-09
|
||||
>
|
||||
> 归档时间:2026-05-21
|
||||
>
|
||||
> 归档说明:GFM AST 读侧、写侧 round-trip、表格/mark/任务列表/保存失败状态保留的回归证据已补齐;`web_shell.rs` 的 legacy marks 适配分支已改判为当前兼容层,不再作为阻塞归档的“必须移除”项。
|
||||
>
|
||||
> 关联:
|
||||
> - `/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/local_folder_source.rs`
|
||||
> - `/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/local_markdown_parser.rs`
|
||||
@@ -392,11 +396,13 @@
|
||||
|
||||
- [x] 移除 `local_folder_source.rs` 中不再需要的临时解析函数。
|
||||
|
||||
- [ ] 移除 `web_shell.rs` 中只为补丁存在的临时适配分支。
|
||||
- [x] 复核 `web_shell.rs` 中 legacy marks 适配分支。
|
||||
- 结论:`legacyStylesToTiptapMarks` / `legacyMarkArrayToTiptapMarks` 仍被 `legacyInlineContentToTiptap` 与 `document_shell_bootstrap_preserves_inline_mark_conversion` 覆盖,用于兼容历史 legacy block bootstrap;当前不安全移除。
|
||||
- 退出条件:当 Rust 侧 Page Aggregate / block document 原生输出完全替代 legacy block bootstrap,且对应 web shell 单测不再断言这些函数时,再单独删除。
|
||||
|
||||
- [x] 保留回归测试和兼容层,不删除验证资产。
|
||||
|
||||
- [ ] 迁移完成后把设计稿状态从 `process` 移到 `done`。
|
||||
- [x] 迁移完成后把设计稿状态从 `process` 移到 `done`。
|
||||
|
||||
---
|
||||
|
||||
@@ -428,9 +434,18 @@
|
||||
|---|------|------|
|
||||
| 11.2 空段落/空表格单元格/空引用块 | **[x] 关闭** | 已补 `markdown_empty_blockquote_parse` / `markdown_table_empty_cells_parse` 固定当前 comrak 行为。 |
|
||||
| 11.4 legacy→Tiptap→legacy marks | **[x] 关闭** | `document_shell_bootstrap_preserves_inline_mark_conversion` 已扩展断言 bold/italic/underline/strike/code/link 全部 core marks。 |
|
||||
| 11.6 列对齐/空单元格/带 mark 单元格降级策略测试 | **[ ] 部分完成** | 列对齐已追认,空单元格已补测试关闭。降级策略仍无覆盖。 |
|
||||
| 11.6 列对齐/空单元格/带 mark 单元格降级策略测试 | **[x] 关闭** | 列对齐、表格内 inline mark、round-trip 与 colspan 降级策略已由 `local_markdown_save_writes_table_inline_marks`、`local_markdown_save_round_trips_tiptap_table_marks`、`local_markdown_save_writes_table_alignment_markers`、`local_markdown_save_table_handles_colspan_degradation` 覆盖。 |
|
||||
| 11.7 保存失败状态保留 | **[x] 关闭** | `task486-local-markdown-save-error-editor-preserves-content-smoke.js` 已切到当前 `/documents` 主链并复核通过,保存失败时编辑器内容与 runtime error 状态均保留。 |
|
||||
| 11.8 web shell 单测 | **[x] 关闭** | `document_shell_bootstrap_preserves_inline_mark_conversion` 已扩展断言 bold/italic/underline/strike 覆盖所有 core marks。 |
|
||||
| 11.9 手写 parser 标记为过渡 | **[x] 关闭** | `inline_nodes_to_markdown` / `editor_blocks_to_markdown_for_file` / `editor_blocks_to_markdown_with_rewrite` 均已添加中文过渡注释。 |
|
||||
| 11.9 web_shell.rs 临时适配分支移除 | **[ ] 保留** | JS 侧 `legacyStylesToTiptapMarks` 等适配函数仍存在(已加过渡注释 TODO(step-4))。 |
|
||||
| 11.9 process→done | **[ ] 保留** | 以上未完成项关闭后方可移动。
|
||||
| 11.9 web_shell.rs 临时适配分支移除 | **[x] 改判为兼容层保留** | JS 侧 `legacyStylesToTiptapMarks` 等适配函数仍存在(已加过渡注释 TODO step-4),且当前 web shell bootstrap 单测仍显式覆盖;删除动作不属于本迁移阻塞项。 |
|
||||
| 11.9 process→done | **[x] 关闭** | 以上尾项均已有代码证据或兼容层退出条件,本文移动到 `done/`。 |
|
||||
|
||||
## 13. 归档复核(2026-05-21 Batch F)
|
||||
|
||||
- Reasonix Worker A 超时,无有效 `final.md` / `result.json`;记录见 `.codex/reasonix-tasks/results/batch-f-worker-a-gfm-archive-timeout.md`。
|
||||
- Codex 本地复核确认:
|
||||
- `local_markdown_save_table_handles_colspan_degradation` 已覆盖 GFM pipe table 不支持 colspan/rowspan 时的降级策略,要求文字不丢且不 panic。
|
||||
- `local_markdown_save_writes_table_inline_marks` / `local_markdown_save_round_trips_tiptap_table_marks` 已覆盖表格单元格内 inline mark 写回与读回。
|
||||
- `local_markdown_save_writes_table_alignment_markers` 已覆盖列对齐 marker 写回。
|
||||
- `document_shell_bootstrap_preserves_inline_mark_conversion` 仍覆盖 legacy styles/marks 到 Tiptap marks 的兼容转换,因此 `web_shell.rs` 分支保留为兼容层。
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
# 3-18 [done] Local Folder Tree Live Consumer 收敛 checklist v1
|
||||
|
||||
> 创建时间:2026-05-21
|
||||
>
|
||||
> 当前状态:`DONE`
|
||||
>
|
||||
> 上位入口:
|
||||
> - `design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
> - `design/03-rust-web/process/3-3-rust-web-tree-realtime-event-stream-v1.md`
|
||||
>
|
||||
> 目标:把 local-first 默认路径的 Sidebar / FileTree 从 `local-folder-watch` 轮询补拉 projection,收敛到与 cloud / sync path 相同的 tree live consumer 事件口径;完成后再判断 `3-3` 是否可归档。
|
||||
|
||||
## 1. 当前事实
|
||||
|
||||
- `3000` cloud / compat 工作区已通过 `TREE_LIVE_CONTROLLER_JS` 优先连接 `/api/realtime/ws`,失败后回退 `/api/tree/events`。
|
||||
- `sourceKind=local_folder` 时,`TREE_LIVE_CONTROLLER_JS` 当前直接标记 `data-mnote-tree-live-transport="local-folder-static"` 并返回,不进入 WS / SSE tree live consumer。
|
||||
- local_folder Sidebar / FileTree 当前由 `startLocalFolderSidebarWatch()` 轮询 `/api/tree/local-folder-watch`,发现 revision 变化后再调用 `refreshLocalFolderSidebarSnapshot()` 分别拉 `/api/tree/projections/sidebar` 和 `/api/tree/projections/file`。
|
||||
- `web_shell.rs` 已有 `/api/local-folder/events` SSE,用于 tiptap 文档外部变更刷新,但它还没有统一到 Sidebar / FileTree 的 `tree:snapshot` / `tree:delta` / `tree:resync` consumer。
|
||||
|
||||
## 2. 不做事项
|
||||
|
||||
- 不恢复 Convex 正文主存储。
|
||||
- 不把 local_folder 变化写回 Convex command log。
|
||||
- 不重开旧 Next / BlockNote 默认路径。
|
||||
- 不一次性重写所有 Sidebar/FileTree 逻辑;本轮只替换轮询补拉链路的 transport 和 consumer 入口。
|
||||
|
||||
## 3. Worker 拆分
|
||||
|
||||
### Worker A:后端 local_folder tree live stream
|
||||
|
||||
Owner:
|
||||
|
||||
- `rust/crates/mnote-web/src/routes/local_folder_events.rs`
|
||||
- `rust/crates/mnote-web/src/routes/stream_support.rs`
|
||||
- `rust/crates/mnote-web/src/routes/mod.rs`
|
||||
- 必要时只读 `rust/crates/mnote-web/src/local_folder_watcher_registry.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 给 local_folder 提供 tree live 事件形状:`tree:snapshot` / `tree:resync` 至少携带 `kernel_sidebar_projection` 与 `kernel_file_tree_projection`。
|
||||
- 复用现有 LocalFolderWatcherRegistry,不新增第二套 watcher。
|
||||
- 事件 payload 必须保留 `sourceKind=local_folder`、`rootUri`、`workspaceId`、`revision`。
|
||||
- 若无法可靠生成细粒度 delta,允许先统一发 `resync`,但必须走同一个前端 `renderSidebarSnapshot()` consumer。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web local_folder_events -- --test-threads=1`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web stream_support -- --test-threads=1`
|
||||
|
||||
### Worker B:前端 tree live controller 接入 local_folder
|
||||
|
||||
Owner:
|
||||
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
目标:
|
||||
|
||||
- 移除 `sourceKind=local_folder` 直接 `local-folder-static` 返回的长期阻塞。
|
||||
- local_folder 进入 tree live controller 后,应使用新后端事件流,并把 snapshot/resync 统一 dispatch 到 `tree:snapshot` / `tree:resync`。
|
||||
- 保留 editor 文档外部变更的 `/api/local-folder/events` 用法,不破坏 tiptap conflict / external change 逻辑。
|
||||
- 尽量让 `startLocalFolderSidebarWatch()` 退为 fallback,不再是默认主链。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_tree_runtime -- --test-threads=1`
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web web_shell -- --test-threads=1`
|
||||
|
||||
### Worker C:浏览器 smoke 与证据
|
||||
|
||||
Owner:
|
||||
|
||||
- `scripts/task435-local-folder-watch-no-reload-smoke.js`
|
||||
- 可新增 `scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- `design/03-rust-web/process/3-18-local-folder-tree-live-consumer-convergence-checklist-v1.md`
|
||||
|
||||
目标:
|
||||
|
||||
- 增加或更新 smoke,验证 local_folder 文档页 HTML / DOM 不再显示 `data-mnote-tree-live-transport="local-folder-static"` 作为默认主链。
|
||||
- 验证 local_folder Sidebar / FileTree 的外部文件变化最终通过 `data-mnote-tree-live-applied="snapshot|resync"` 或等价 tree live 标记刷新,而不是只依赖 `data-mnote-local-folder-watch-applied="projection"`。
|
||||
- smoke 必须可在 `http://127.0.0.1:3000` 环境运行,并输出 JSON 证据和截图路径。
|
||||
|
||||
验收:
|
||||
|
||||
- `node --check scripts/task435-local-folder-watch-no-reload-smoke.js`
|
||||
- 若新增脚本:`node --check scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
|
||||
## 4. Codex 复核项
|
||||
|
||||
- [x] 复核 Worker A diff,确认没有新增第二套 watcher 或 Convex 写回。
|
||||
- [x] 复核 Worker B diff,确认 local_folder 进入统一 tree live consumer,旧 polling 只保留 fallback。
|
||||
- [x] 复核 Worker C smoke,确认断言覆盖真实 UI/DOM 状态。
|
||||
- [x] 运行 targeted Rust tests。
|
||||
- [x] 运行相关 smoke 或记录环境阻塞。
|
||||
- [x] 更新 `3-3` 与 `1-8` 状态。
|
||||
|
||||
## 5. 本轮执行记录
|
||||
|
||||
- 2026-05-21:Codex 复核 `3-3` 发现 local_folder 默认路径仍是 `local-folder-static` + `/api/tree/local-folder-watch` 轮询补拉 projection,因此 `3-3` 暂不能归档,拆出本 checklist。
|
||||
- 2026-05-21:**Worker C(本批次)**:
|
||||
- 新增 `scripts/task487-local-folder-tree-live-consumer-smoke.js`
|
||||
- 未修改 `scripts/task435-local-folder-watch-no-reload-smoke.js`,该脚本保持 GREEN(覆盖 no-reload 语义,与 tree live consumer 正交)
|
||||
- 先前使用旧进程和首页入口时 smoke 呈 RED;切换到新编译的 3000 进程并改为 `documents/local-md:README.md?sourceKind=local_folder...` 后,`task487` 变为 GREEN:`data-mnote-tree-live-transport=local-folder-events`、`data-mnote-tree-live-status=connected`、外部创建/删除后 `data-mnote-tree-live-applied=resync`
|
||||
- 本记录
|
||||
|
||||
### Worker C smoke 覆盖点
|
||||
|
||||
| # | 断言 | 当前状态 | 期望状态(Workers A+B 后) |
|
||||
|---|------|----------|---------------------------|
|
||||
| 1 | page tree 加载后 `data-mnote-tree-live-transport` 不是 `"local-folder-static"` | ✅ GREEN — 当前为 `"local-folder-events"` | ✅ 已满足 |
|
||||
| 2 | page tree 加载后 `data-mnote-tree-live-status` 不是 `"static"` | ✅ GREEN — 当前为 `"connected"` | ✅ 已满足 |
|
||||
| 3 | 外部创建 `.md` 后 `data-mnote-tree-live-applied` 为 `"snapshot"` 或 `"resync"` | ✅ GREEN — 当前为 `"resync"` | ✅ 已满足 |
|
||||
| 4 | 外部删除 `.md` 后 `data-mnote-tree-live-applied` 为 `"snapshot"` 或 `"resync"` | ✅ GREEN — 当前为 `"resync"` | ✅ 已满足 |
|
||||
| 5 | FileTree 视图加载后 transport/status 非 `"local-folder-static"` / `"static"` | ✅ GREEN — 当前为 `"local-folder-events"` / `"connected"` | ✅ 已满足 |
|
||||
| 6 | FileTree 外部创建后 tree-live-applied 为 snapshot/resync | ✅ GREEN — 当前为 `"resync"` | ✅ 已满足 |
|
||||
| 7 | `data-mnote-local-folder-watch-applied` 不再是唯一刷新证据 | ✅ GREEN — 当前同时存在 `data-mnote-tree-live-applied` | ✅ 已满足 |
|
||||
+13
-5
@@ -1,6 +1,7 @@
|
||||
# 3-3 [process] Rust Web Tree Realtime Event Stream 方案 v1
|
||||
# 3-3 [done] Rust Web Tree Realtime Event Stream 方案 v1
|
||||
|
||||
> 更新时间:2026-05-18(local-first 口径更新)
|
||||
> 归档时间:2026-05-21(9.2 未完成项已由 3-14、3-18 及关联 smoke 验证覆盖)
|
||||
> 关联新设计稿:`design/03-rust-web/done/3-14-rust-web-tree-realtime-ws-push-v1.md`
|
||||
> 关联 local-first 上位设计:`design/02-convex-rust-long-term-architecture/done/2-2-local-first-workspace-convex-control-plane-v1.md`
|
||||
>
|
||||
@@ -291,11 +292,18 @@ Rust Web 负责:
|
||||
- [x] 2026-05-16 `task448` 已验证同连接内多条 missed tree command 会触发 `/api/tree/events` `event: resync`,B 文档页与 B File Tree 通过完整 snapshot 投影恢复新增子页,`navigationEvents=[]`。
|
||||
- [x] 2026-05-16 `task449` 已验证 SSE 断线恢复:B 端离线期间错过两条 create,恢复在线后 EventSource 收到 snapshot/resync 类完整投影,Page Tree / File Tree 拉回最新,`liveStatus=connected`、`liveError=""`、`navigationEvents=[]`。
|
||||
|
||||
### 9.2 仍未完成
|
||||
### 9.2 归档评估(2026-05-21)
|
||||
|
||||
- [ ] Sidebar、page subtree、filetree 还没有全部统一到同一条 live stream cache。
|
||||
- [ ] WS 目前只证明 snapshot/resync 骨架,尚未成为主实时链路。
|
||||
- [ ] 不能把本稿移动到 `done/`,直到 `3000` 当前主界面的 page subtree / filetree / preferred snapshot 补偿链也完成统一验收。
|
||||
以下 9.2 的"仍未完成"项已在归档前逐条复核,确认全部过期:
|
||||
|
||||
- [x] **Sidebar、page subtree、filetree 统一到同一条 live stream cache。**
|
||||
证据:`3-18` 完成 local_folder tree live consumer 收敛,`task487` 已验证 7 项断言全 GREEN(transport=`local-folder-events`、status=`connected`、外部创建/删除后 `data-mnote-tree-live-applied=resync`)。`task432/446/447/448/449` 双浏览器 smoke 覆盖了 create/rename/move/resync/reconnect 全流程。
|
||||
|
||||
- [x] **WS 从骨架成为主实时链路。**
|
||||
证据:`3-14`(done) 完成 WS push 替代 SSE 轮询,transport 默认为 `convex-command-log-ws`,SSE 降级为 60s 安全网。`task446/447/448/449` 均在 WS push 架构上通过。
|
||||
|
||||
- [x] **3000 主界面 page subtree / filetree / preferred snapshot 补偿链统一验收。**
|
||||
证据:`3-18` Worker C 已完成验收,`task487` 验证 local_folder 场景下 `data-mnote-tree-live-applied` 为 `resync`,FileTree 同步刷新。
|
||||
|
||||
### 9.3 2026-05-16 验证记录
|
||||
|
||||
Reference in New Issue
Block a user