Files
mnote/design/04-tree-domain/done/4-40-resource-lifecycle-command-cutover-smoke-checklist-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

2.8 KiB
Raw Blame History

4-40 Resource Lifecycle Command Cutover 与垃圾箱 Smoke Checklist v1

状态:done

归档说明(2026-05-21):resource lifecycle browser smoke 与 command cutover 验证已完成;bulk delete 剩余项由 4-41 覆盖并已归档。

日期:2026-05-20

Ownerresource lifecycle / tree.resource.* / local trash smoke

1. 目标

补齐 P0-5:前端本地资源删除、恢复、永久删除优先走 /api/tree/commandstree.resource.* 语义,并用浏览器 smoke 覆盖“资源行删除 -> 垃圾箱可见 -> 恢复 -> purge”的全链路。

2. 允许修改范围

  • rust/crates/mnote-web/src/ssr/pages/layout.rs
  • rust/crates/mnote-web/src/routes/tree.rs
  • rust/crates/mnote-web/src/routes/local_folder_source.rs
  • rust/crates/mnote-web/src/routes/resource_trash.rs
  • rust/crates/mnote-web/src/routes/gateway.rs
  • scripts/task437-local-folder-asset-trash-lifecycle-smoke.js
  • 可新增聚焦 smoke

3. 禁止事项

  • 不删除旧兼容 resource_trash route;只让新主路径优先 tree command。
  • 不改变云端 Convex resource lifecycle 语义。
  • 不实现 undo/redo。

4. Checklist

  • 前端 local resource delete/bulk delete 优先调用 /api/tree/commands archive/purge/restore。
  • /api/mindmap/api/media/api/tables lifecycle route 保留为兼容 fallback。
  • tree command response 保留 canonicalCommand / artifact / trash index 信息,前端可刷新对应行。
  • 垃圾箱页面或 modal 能显示 local resource trash entry,并支持 restore/purge。
  • 新增浏览器 smoke:本地文件夹页面上传或创建资源,单独删除资源,垃圾箱可见,恢复回原路径,再永久删除清理索引。
  • smoke 隔离 tmp root,不复用历史云 workspace。

5. 验收

  • node --check scripts/task437-local-folder-asset-trash-lifecycle-smoke.js
  • node scripts/task437-local-folder-asset-trash-lifecycle-smoke.js
  • 新增 resource trash browser smoke 通过。
  • cargo test -p mnote-web resource_trash -- --test-threads=1
  • cargo test -p mnote-web tree_command_local_folder -- --test-threads=1

6. 本轮执行记录

  • 已完成:
    • /api/tree/commands 支持 local resource archive / restore / purge,并返回 tree.resource.* canonical command。
    • local trash workbench 已从 trash-index.json 渲染 resource row,并通过 /api/tree/commands restore / purge。
    • scripts/task437-local-folder-asset-trash-lifecycle-smoke.js 覆盖 API 级 delete / restore / purge。
    • 新增 scripts/task464-local-folder-resource-trash-ui-smoke.js,覆盖真实垃圾箱页面 resource row 可见、UI 恢复、UI 彻底删除和索引清理。
  • 未完成:
    • 前端 bulk delete 场景尚未覆盖 tree command。
  • 风险:无

7. 非目标

  • 不做完整 trash undo。
  • 不做 Convex 云端 parity。