- wire SQLite control-plane access/session paths into Rust web local-folder routes - preserve local Markdown attachment semantics across upload, reload, and secondary-pane resource tabs - refresh design governance docs, Reasonix task templates, and bug records - retire root .mcp.json local MCP config
4.4 KiB
4.4 KiB
3-11 [done] Rust Web 3000 既有 Tree / Editor Runtime 重新接入清单 v1
更新时间:2026-04-29
纠偏来源:用户指出此前 3-10 的完成判断只证明了 API / 直达文档页 smoke,并没有证明用户打开
3000 /后能看到文件树、页面树,或从 UI 新建页面进入leptos-tiptap。参考主线:
/mnt/Data1T/mnote/design/04-tree-domain/done/4-11-tree-rust-family-final-renderer-and-host-thinning-checklist-v1.md/mnt/Data1T/mnote/design/05-editor-mainline/done/5-6-page-aggregate-alignment-checklist-v1.md/mnt/Data1T/mnote/design/03-rust-web/done/3-10-rust-web-3000-tree-editor-runtime-integration-checklist-v1.md
1. 根因确认
- 已确认
3000 /走的是gateway::root_entry -> HomePage -> PageLayout -> workspace_shell,不是/treedebug shell。 - 已确认既有完整 tree runtime 在
rust/crates/mnote-web/src/tree_shell/*与routes/tree.rs,不应再临时造一套简化树 UI。 - 已确认此前默认 sidebar 在
my_page_items非空时会优先渲染简化 row,绕开 Rust page tree renderer。 - 已确认
SIDEBAR_TREE_JS被嵌套成<script><script>...,导致 UI 新建点击逻辑没有执行。 - 已确认
leptos-tiptap文档页链路本身可用,真实缺口是从根页 UI 到树命令再到文档页的产品工作流未闭环。
2. 接入既有页面树 / 文件树
- 默认 workspace sidebar 优先嵌入 Rust
render_initial_page_tree_html输出的 page tree HTML。 - 默认 workspace sidebar 新增 Rust
render_initial_filetree_html输出的 file tree section。 - page tree row 保留 Rust renderer action 标记:
tree-node-open、tree-action-create、tree-action-rename。 - page tree row 同时保留
wolai-sidebar-row、data-node-id、data-parent-id、data-depth、data-active,兼容已有 smoke 和 active row 验收。 - 空工作区不再只显示静态“暂无页面”,而是显示 page tree / file tree 的 Rust renderer 空态,并保留新建入口。
3. 接入 UI 命令链路
- 左栏全局
+使用真实workspaceId调/api/tree/commands action=create。 - page tree row 的子页面
+使用当前 node 作为parentId调/api/tree/commands action=create。 - page tree row 的 open action 会进入
/documents/:id?workspaceId=...。 - page tree row 的 rename action 通过
/api/tree/commands action=rename回写,不再停留在纯静态按钮。 - 修复 sidebar JS 嵌套
<script>,确保浏览器真实执行点击逻辑。
4. 接入 leptos-tiptap 验证链路
- 从
3000 /点击新建页面后会进入/documents/:id?workspaceId=...。 - 文档页输出
__MNOTE_PAGE_AGGREGATE__和__MNOTE_EDITOR_BOOTSTRAP__。 - 文档页 mount root 为
data-testid="mnote-leptos-tiptap-island-editor-root"。 - 浏览器内
.editor-surface .ProseMirror[contenteditable="true"]可见。 - 输入保存后 reload 可读回。
5. 回归验证
cargo test -p mnote-web workspace_shellcargo test -p mnote-web root_entrycargo test -p mnote-web tree_shell_page_renderer_outputs_initial_html_contractcargo test -p mnote-web document_shellcargo test -p mnote-web page_aggregateMNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task122-rust-web-create-page-ui-smoke.jsMNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task120-rust-web-tree-integration-smoke.jsMNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task121-rust-web-editor-island-hydration-smoke.jsMNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task114-rust-web-gateway-entry-smoke.jsMNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task115-rust-web-document-shell-smoke.jsMNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task118-rust-web-wolai-ui-parity-smoke.jsMNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task119-rust-web-wolai-visual-regression-smoke.js
6. 完成判定
- 用户直接打开
http://127.0.0.1:3000/可以看到页面树 section。 - 用户直接打开
http://127.0.0.1:3000/可以看到文件树 section。 - 用户可以从根页左栏
+新建页面。 - 新建后能进入文档页并看到
leptos-tiptap主编辑区。 - 本轮没有把
/treedebug shell、iframe host 或简化静态 UI 当作默认完成口径。