66 lines
4.4 KiB
Markdown
66 lines
4.4 KiB
Markdown
# 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/process/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. 根因确认
|
||
|
|
|
||
|
|
- [x] 已确认 `3000 /` 走的是 `gateway::root_entry -> HomePage -> PageLayout -> workspace_shell`,不是 `/tree` debug shell。
|
||
|
|
- [x] 已确认既有完整 tree runtime 在 `rust/crates/mnote-web/src/tree_shell/*` 与 `routes/tree.rs`,不应再临时造一套简化树 UI。
|
||
|
|
- [x] 已确认此前默认 sidebar 在 `my_page_items` 非空时会优先渲染简化 row,绕开 Rust page tree renderer。
|
||
|
|
- [x] 已确认 `SIDEBAR_TREE_JS` 被嵌套成 `<script><script>...`,导致 UI 新建点击逻辑没有执行。
|
||
|
|
- [x] 已确认 `leptos-tiptap` 文档页链路本身可用,真实缺口是从根页 UI 到树命令再到文档页的产品工作流未闭环。
|
||
|
|
|
||
|
|
## 2. 接入既有页面树 / 文件树
|
||
|
|
|
||
|
|
- [x] 默认 workspace sidebar 优先嵌入 Rust `render_initial_page_tree_html` 输出的 page tree HTML。
|
||
|
|
- [x] 默认 workspace sidebar 新增 Rust `render_initial_filetree_html` 输出的 file tree section。
|
||
|
|
- [x] page tree row 保留 Rust renderer action 标记:`tree-node-open`、`tree-action-create`、`tree-action-rename`。
|
||
|
|
- [x] page tree row 同时保留 `wolai-sidebar-row`、`data-node-id`、`data-parent-id`、`data-depth`、`data-active`,兼容已有 smoke 和 active row 验收。
|
||
|
|
- [x] 空工作区不再只显示静态“暂无页面”,而是显示 page tree / file tree 的 Rust renderer 空态,并保留新建入口。
|
||
|
|
|
||
|
|
## 3. 接入 UI 命令链路
|
||
|
|
|
||
|
|
- [x] 左栏全局 `+` 使用真实 `workspaceId` 调 `/api/tree/commands action=create`。
|
||
|
|
- [x] page tree row 的子页面 `+` 使用当前 node 作为 `parentId` 调 `/api/tree/commands action=create`。
|
||
|
|
- [x] page tree row 的 open action 会进入 `/documents/:id?workspaceId=...`。
|
||
|
|
- [x] page tree row 的 rename action 通过 `/api/tree/commands action=rename` 回写,不再停留在纯静态按钮。
|
||
|
|
- [x] 修复 sidebar JS 嵌套 `<script>`,确保浏览器真实执行点击逻辑。
|
||
|
|
|
||
|
|
## 4. 接入 `leptos-tiptap` 验证链路
|
||
|
|
|
||
|
|
- [x] 从 `3000 /` 点击新建页面后会进入 `/documents/:id?workspaceId=...`。
|
||
|
|
- [x] 文档页输出 `__MNOTE_PAGE_AGGREGATE__` 和 `__MNOTE_EDITOR_BOOTSTRAP__`。
|
||
|
|
- [x] 文档页 mount root 为 `data-testid="mnote-leptos-tiptap-island-editor-root"`。
|
||
|
|
- [x] 浏览器内 `.editor-surface .ProseMirror[contenteditable="true"]` 可见。
|
||
|
|
- [x] 输入保存后 reload 可读回。
|
||
|
|
|
||
|
|
## 5. 回归验证
|
||
|
|
|
||
|
|
- [x] `cargo test -p mnote-web workspace_shell`
|
||
|
|
- [x] `cargo test -p mnote-web root_entry`
|
||
|
|
- [x] `cargo test -p mnote-web tree_shell_page_renderer_outputs_initial_html_contract`
|
||
|
|
- [x] `cargo test -p mnote-web document_shell`
|
||
|
|
- [x] `cargo test -p mnote-web page_aggregate`
|
||
|
|
- [x] `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task122-rust-web-create-page-ui-smoke.js`
|
||
|
|
- [x] `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task120-rust-web-tree-integration-smoke.js`
|
||
|
|
- [x] `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task121-rust-web-editor-island-hydration-smoke.js`
|
||
|
|
- [x] `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task114-rust-web-gateway-entry-smoke.js`
|
||
|
|
- [x] `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task115-rust-web-document-shell-smoke.js`
|
||
|
|
- [x] `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task118-rust-web-wolai-ui-parity-smoke.js`
|
||
|
|
- [x] `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task119-rust-web-wolai-visual-regression-smoke.js`
|
||
|
|
|
||
|
|
## 6. 完成判定
|
||
|
|
|
||
|
|
- [x] 用户直接打开 `http://127.0.0.1:3000/` 可以看到页面树 section。
|
||
|
|
- [x] 用户直接打开 `http://127.0.0.1:3000/` 可以看到文件树 section。
|
||
|
|
- [x] 用户可以从根页左栏 `+` 新建页面。
|
||
|
|
- [x] 新建后能进入文档页并看到 `leptos-tiptap` 主编辑区。
|
||
|
|
- [x] 本轮没有把 `/tree` debug shell、iframe host 或简化静态 UI 当作默认完成口径。
|