Files
mnote/design/04-tree-domain/done/4-41-filetree-bulk-resource-command-cutover-v1.md
T
lix-2026 1956a8a21a chore: align mvp design governance
- 统一 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
2026-05-21 09:04:13 +08:00

55 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-41 FileTree Bulk Resource Command Cutover Checklist v1
> 状态:done
>
> 归档说明(2026-05-21):FileTree bulk resource command cutover 已完成,云端 table 旧 fallback 为显式保留边界。
>
> 日期:2026-05-20
>
> OwnerFile Tree bulk delete / `layout.rs`
## 1. 目标
补齐 P0-5 剩余项:前端本地文件夹 bulk delete 对 file asset、mindmap、table、raw local file 等资源优先走 `/api/tree/commands``tree.resource.*` 语义,旧 route 仅保留云端或兼容 fallback。
## 2. 允许修改范围
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
- `scripts/task464-local-folder-resource-trash-ui-smoke.js`
- 可新增聚焦 bulk delete smoke
## 3. 禁止事项
- 不删除旧 `/api/mindmap``/api/media``/api/tables` 兼容 route。
- 不改变 Convex 云端 asset lifecycle。
- 不把 bulk delete 改成永久删除;默认仍是 archive/trash。
## 4. Checklist
- [x] local file asset bulk delete 使用 `dispatchTreeCommand({ action: 'archive', documentId })`
- [x] local mindmap bulk delete 使用同一 tree command,不再走 `/api/mindmap`
- [x] local table bulk delete 使用同一 tree command,不再走 `/api/tables`
- [x] bulk delete 成功后刷新本地 file tree snapshot / trash index 可见。
- [x] 失败项保留可见错误,不清空未成功项。
- [x] smoke 覆盖至少两个不同 resource kind 的批量删除进入垃圾箱。
## 5. 验收
- [x] `node --check scripts/task464-local-folder-resource-trash-ui-smoke.js`
- [x] `node scripts/task464-local-folder-resource-trash-ui-smoke.js`
- [x] `node --check scripts/task471-local-folder-bulk-resource-trash-smoke.js`
- [x] `node scripts/task471-local-folder-bulk-resource-trash-smoke.js`
- [x] 新增 bulk delete 合同测试通过:`cargo test -p mnote-web sidebar_filetree_local_table_bulk_delete_uses_tree_command -- --test-threads=1`
- [x] `cargo test -p mnote-web tree_command_local_folder -- --test-threads=1`
## 5.1 本轮执行记录
- 已合入:local table bulk delete 分支切到 `/api/tree/commands` archivefile asset / mindmap 原先已经走同一命令。
- 已保留:云端 table 仍走 `/api/tables/` fallback,旧 route 未删除。
- 已新增:`scripts/task471-local-folder-bulk-resource-trash-smoke.js`,覆盖 local folder 两个资源行多选 Delete、两个 archive tree command、文件移入垃圾箱和 trash index。
## 6. 非目标
- 不实现 undo。
- 不实现云端 bulk lifecycle parity。