- 统一 local-first MVP 后阶段架构口径,补充 process 执行总序和 Reasonix 协作记录 - 归档已完成的 design checklist,标注参考型 process,更新 AGENTS/REASONIX/架构文档 - 补充文件树/主编辑器下载与上下文菜单相关实现、bug 记录和 smoke 脚本 验证:git diff --check;codegraph sync .;cargo test -p mnote-web;node --check scripts/task476-filetree-editor-context-menu-download-smoke.js
1.9 KiB
1.9 KiB
4-42 FileTree Open Target RootUri Contract Checklist v1
状态:done
归档说明(2026-05-21):FileTree open target
rootUri合同已完成,缺失rootUri的旧 payload 兼容仍保留。日期:2026-05-20
Owner:FileTree runtime open target /
filetree_runtime.rs
1. 目标
补齐 P0-4 的剩余合同问题:FileTreeOpenTarget::LocalFile / Directory 已存在,但 rootUri 仍为空字符串占位。需要让 runtime 环境携带本地 root,并让 open target 输出真实 rootUri。
2. 允许修改范围
rust/crates/mnote-web/src/tree_shell/filetree_runtime.rsrust/crates/mnote-web/src/tree_shell/runtime_api.rsrust/crates/mnote-web/src/routes/tree.rs- 相关 Rust 单测
3. 禁止事项
- 不改变 File Tree row 的长期资源真相。
- 不改前端打开行为。
- 不删除旧
AssetJSON 兼容字段。
4. Checklist
FileTreeRuntimeEnvironment携带可选rootUri。resolve_open_target对LocalFile/Directory使用环境中的rootUri。- tree shell SSR app state / runtime reduce 请求填入 local folder
rootUri。 - runtime API 反序列化对缺失
rootUri保持兼容。 - Rust 单测覆盖 local file / directory open target 输出真实
rootUri。
5. 验收
cargo test -p mnote-web filetree_runtime -- --test-threads=1cargo test -p mnote-web runtime_api -- --test-threads=1cargo test -p mnote-web tree_shell_filetree_mode_embeds_asset_state -- --test-threads=1
5.1 本轮执行记录
- 已合入:
FileTreeRuntimeEnvironment.rootUri,并在 filetree runtime open target 中用于 local file / directory。 - 已补充:tree shell 前端 runtime 环境构造会在 local folder 模式传入
rootUri。 - 已验证:缺失
rootUri的旧 runtime API JSON 仍可反序列化。
6. 非目标
- 不处理 resource lifecycle。
- 不处理 tab URL 同步。