Files
mnote/design/old/04-tree-domain/done/4-19-tree-domain-final-status-and-rust-dom-shell-cutover-v1.md
T
Agent Board b798f628ee chore: land tree view-state, vault, Pi module split, and repo hygiene
Persist PageTree expand state via control-plane view-state and align
chevron/DOM with restored expansion; keep Sidex-style shallow page-tree
scan and drop the unused recursive scanner that only added cargo noise.

Add password vault workbench routes/runtime/skill/CLI, split page_ai_pi
into a module package, and retire Hermes/ACP/OpenHub recycle + root
harness evidence from the index while gitignoring recycle and local
diag dumps.

Archive superseded design/bugs docs under old/, point architecture at
ARCHITECTURE.md, and refresh smokes for Pi S1–S7, vault, and editor
regressions so the working tree can stay clean.
2026-07-21 05:13:05 +08:00

34 lines
4.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# [recycle] 4-19 [done] 树域 final status 与 Rust DOM shell 切换记录 v1
> 更新时间:2026-04-28
>
> 本文由 `process/1.md` 归档而来,用于记录 `design/04-tree-domain` 当前代码已完成的最终树域收口状态。
>
> 收口更新(2026-05-16):旧 `TreeShellIframeHost` 与对应测试已移动到 `recycle/``NEXT_PUBLIC_TREE_SHELL_LEGACY_IFRAME_HOST` 入口已删除。当前 active source 不再保留 iframe/srcDoc legacy/debug host。
## 执行状态(2026-04-28
- [x] 口径收口:`task-001``task-009` 完成的是 Rust/WASM reducer runtime、runtime artifact、route thinning 与 projection hardening`task-010``task-013` 才是 `4-18-tree-final-dom-shell-cutover-hard-gate-v1.md` 定义的 final DOM shell 默认路径切换。
- [x] 默认 host 已从历史 `rust_runtime_artifact_host + iframe_srcdoc` 切到 `rust_wasm_dom_shell_host + dom_wasm``rust_runtime_artifact_host` 与 active `data-tree-browser-bridge="iframe_srcdoc"` 已退出 active source。
- [x] `TreeShellHost``rust_family + workspaceId` 下默认且唯一挂载 `TreeShellRustDomShellHost`;旧 `TreeShellIframeHost` 已移动到 `recycle/`
- [x] 默认 DOM host 不再调用 `LOCAL_TREE_SHELL_TEMPLATE``buildInlinePageTreeHtml``buildInlineFileTreeHtml``buildInlinePickerHtml`,也不再把 `srcDoc` inline DOM shell 当作成功路径。
- [x] 默认 page / filetree / picker DOM host 标注 `data-tree-runtime-artifact-host="rust_tree_shell_runtime_artifact_v1"``data-tree-browser-bridge="dom_wasm"`
- [x] 默认 DOM host 的 page focus / keyboard / expand / collapse / open / context / create / rename / dropfiletree selection / open / context / internal drop / external drop / drop target,以及 picker keyboard / focus / pick,均通过 `TreeShellRuntimeRequest/Result` 消费 WASM artifact 或同源 Rust HTTP seam 返回的 state、hostEvents、commandEvents。
- [x] 旧 JS DOM renderer、inline template、fallback reducer/state machine 已从 active source 移到 `recycle/`,不再作为短期排障面。
- [x] 默认主路径负向测试已覆盖:`tree-shell-host.test.tsx``tree-shell-surface.test.tsx``move-embed-picker-dialog.test.tsx` 均断言默认路径不得出现 `iframe_srcdoc` / `rust-iframe`
- [x] `task112-tree-rust-family-regression-smoke.js``task113-picker-keyboard-regression-smoke.js` 默认验证 `dom_wasm` DOM hostlegacy iframe 不再作为兼容验收路径。
## 历史 runtime 阶段保留记录
- Rust/WASM reducer runtime artifact 已落地:`rust/crates/tree-shell-runtime-wasm` 通过 wasm-bindgen 导出 `reduceTreeShellRuntime`3000 同源 `/api/tree-shell-runtime/*` 发布 `mnote-tree-shell-runtime.js``mnote-tree-shell-runtime_bg.wasm`
- `mnote-web` 与 3000 同源均保留 `POST /api/tree/runtime/reduce` seam;默认 DOM host 优先调用 WASM artifactHTTP seam 作为同源 Rust fallback/debug。
- 历史 `TreeShellIframeHost` 已完成过 page/filetree/picker reducer result 回放、hostEvent/commandEvent 回放、page drop target runtime 收口、picker runtime-first、filetree drop hardening 等切片;这些能力只作为历史记录保留,不再对应 active legacy/debug host。
## 当前保留边界
- `normalizedMove` compat fallback 已删除;无 `treeWriteOperation` 的 move 不再进入主写路径。
- `document.snapshot.saved` 已作为独立 event type 固定;`page.body.saved` 不再携带 snapshot payload。
- `tree.node.embed``pageReference` block 结构与插入位置已迁入 Rust `pageAggregateEmbedPlan`3000 route 只负责读取源/目标 substrate 快照并作为 preflight 传入。
- `TreeShellIframeHost` 与对应旧测试已移入 `recycle/`active source 不再保留 legacy iframe host。
- 3000 仍保留挂载、认证、transport、文件字节读取、浏览器 DnD `File[]`、菜单状态、实际命令调度、乐观 UI 与副作用通知等浏览器能力边界;这是浏览器公开入口职责,不再代表树域主语义滞留在 Next route。