Files
mnote/design/04-tree-domain/done/4-15-task-006-compat-host-thinning-execution-checklist-v1.md
T

32 lines
2.4 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.
# 4-15 [done] task-006 compat host thinning 执行清单 v1
> 口径修正(2026-04-28):本文件的 `done` 状态只表示本批可验证范围内的 compat host 收薄完成;不表示 compat host 已退为纯 debug/internal,也不表示 `TreeShellIframeHost` 的 JS DOM/state machine 已从默认真实流量删除。最终退场门禁以 `4-18-tree-final-dom-shell-cutover-hard-gate-v1.md` 为准;该硬门禁现已在同目录 `done/` 收口。
## 目标
把本批可验证范围内的 compat host 继续收薄:默认 3000 主路径不再请求 `mnote-web:3104` proxy,不回退旧 React renderer,不再通过 `__MNOTE_TREE_SHELL_OVERRIDE__` 注入第二份主路径 itemspage/filetree/picker 的首屏 Rust initial DOM 与 rendererInput/state family 成为主路径合同。
## 当前边界
- 本任务不声称已经完成完整 Rust runtime / wasm 替换。
- `TreeShellIframeHost` 仍是 3000 主路径的 same-origin inline host;它的职责已收窄为挂载 srcDoc、postMessage transport、状态 patch 与 debug/internal fallback,而不是最终移除。
- 3104 `/tree` 只保留显式 debug/internal 验证边界,`task112` 中 direct tree shell debug 已默认跳过。
## 执行项
- [x] 主路径宿主边界:
- [x] page/filetree/picker 在 `rust_family` 下继续进入同源 iframe host,不回退旧 React renderer。
- [x] 缺少 `workspaceId` 时显示 renderer removed 占位,不恢复旧 React renderer。
- [x] 3000 inline `srcDoc` 主路径使用 `state.items + rendererInput`,不再依赖 `__MNOTE_TREE_SHELL_OVERRIDE__` 作为第二输入真相。
- [x] 状态与事件收薄:
- [x] sidebar refresh/sync 保持事件与语义 key,而不是引入新的树结构重建真相。
- [x] file tree selection 只通过 renderer event snapshot 回宿主业务。
- [x] page/filetree/picker smoke 继续覆盖主路径 iframe host 的导航、右键、双击打开、picker 搜索/选中与 stream fallback。
- [x] 验证覆盖:
- [x] `pnpm vitest run src/components/sidebar/tree-shell-surface.test.tsx src/components/sidebar/sidebar-events.test.ts src/components/sidebar/sidebar-sync.test.ts`
- [x] `node scripts/task112-tree-rust-family-regression-smoke.js`
## 后续剩余
- 完整“compat host 退为 debug/internal fallback”仍需要真正 Rust runtime/wasm 或等价正式 renderer 承接运行时 DOM 与状态机;当前已把本批可验证主路径收薄记录为阶段完成。