# [recycle] 4-14 [done] task-005 file tree final renderer 能力保留执行清单 v1 > 口径修正(2026-04-28):本文件的 `done` 状态只表示 file tree 的 Rust initial DOM、row contract、selection state family 与能力保留阶段完成;不表示 file tree 已完成 final Rust DOM shell 切换。默认主路径仍依赖 `iframe_srcdoc` 时,不得用本文作为最终完成依据。 > > 最终清理更新(2026-05-16):`TreeShellIframeHost` 与 `iframe_srcdoc` 已退出 active source 并移动到 `recycle/`;本文保留为历史 state-family 阶段记录,当前口径以 `4-18` / `4-19` 为准。 ## 目标 让 `file tree` 在 `rust_family` 默认路径下继续从 3000 inline compat host 收口到 final Rust renderer state family,同时保留文件树关键能力: - 首屏 DOM 由 `data-rust-filetree-renderer="initial_v1"` 输出,并覆盖 `doc / index / asset-folder / asset` 行语义。 - 选择状态只通过 `rust_filetree_selection_reducer_v1` 合同入口执行与回报,不再由宿主反向控制。 - 内部拖放、外部文件拖入、右键菜单、双击打开、空白区清空选择与 drop target dataset 不退化。 - 3000 inline host 与 `mnote-web /tree` debug shell 保持同一可测试合同。 ## 执行项 - [x] 补齐 3000 inline file tree hydrated runtime: - [x] Rust initial DOM 包含 `doc / index / asset-folder / asset` 行 test id、row kind、document id、asset id、icon hint 与 selected/active dataset。 - [x] `asset-folder` 与 `asset` 行保留打开、右键、拖放目标与资源打开 bridge。 - [x] 选择、右键选择、Shift/Ctrl/Cmd 多选、可见行归一化与 drag rows 解析统一走 `rust_filetree_selection_reducer_v1` 镜像入口。 - [x] active/selection/drop feedback 在 hydrated Rust DOM 上 patch dataset,不因宿主 patch 触发整树重绘。 - [x] 对齐 `mnote-web /tree` debug runtime: - [x] debug shell 的 file tree row 语义、selection contract、drag/drop bridge 与 3000 inline host 同步。 - [x] fallback render path 仍可作为 debug/internal 边界,但主路径首屏不再清空 Rust initial DOM。 - [x] 测试覆盖: - [x] `cargo test -p mnote-web filetree_renderer && cargo test -p mnote-web filetree_selection` - [x] `pnpm vitest run src/components/sidebar/tree-shell-iframe-host.test.tsx src/lib/file-tree/shell.test.ts src/lib/tree-stream/tree-delta.test.ts` - [x] `node scripts/task112-tree-rust-family-regression-smoke.js` ## 完成记录 - 2026-04-26:代码对照确认 3000 inline host 与 `mnote-web /tree` debug shell 均已 hydrate `data-rust-filetree-renderer="initial_v1"`,并保留 `doc / index / asset-folder / asset` row contract、selection reducer contract、drag/drop bridge 与资源打开 bridge。 - 2026-04-26:task-005 完整验证通过,未发现需要新增生产改动的缺口;本清单作为能力门槛记录。 ## 非目标 - 本清单不拆除 compat host 的所有 debug fallback;对应 `task-006`。 - 本清单不新增业务命令语义;file tree drop/delete/paste/upload preflight 已在前置任务中下沉 Rust。