提交当前顶层 mnote Git 工作区,范围集中在 04-tree-domain 的 resource/trash/filetree 生命周期、mnote-web resource_trash 路由、Convex/Next 兼容接口、sidebar/file-tree 客户端适配、smoke 脚本与对应设计/bug 记录。 不包含被 ignore 的 design/05-editor-mainline/reference-code/leptos-tiptap 嵌套仓库改动。新增 smoke 的测试密码改为运行时读取 MNOTE_E2E_PASSWORD,避免提交明文 credential assignment。
1.6 KiB
1.6 KiB
4-32 VSCode Explorer DnD Modifier Guard v1
状态:done 创建时间:2026-05-15 所属主线:04-tree-domain / VSCode Explorer 文件树与垃圾箱闭环 来源:
design/10-review/07-vscode-explorer-filetree-trash-gap-review.md阶段 7
1. 目标
补齐文件树 DnD copy modifier 的 VSCode 基线:Alt、Ctrl、Meta 任一修饰键都应进入 copy drop,而不是只有 Alt 生效。
2. 已落地
tree-shell-dom-host.tsx的 filetree dragover 改为Alt / Ctrl / Meta -> copy。mnote-webSSR 主壳layout.rs的 filetree dragover / drop 也同步改为Alt / Ctrl / Meta -> copy。
3. 已有防线
- 父拖子 / 拖到自身禁止由 Rust
tree.filetree.drop.preflight校验,错误语义为不能把页面移动到自身或后代下面。 - 主 Sidebar 继续依赖 drop preflight,不在 UI 层复制第二套树祖先判断。
4. 验证命令
cd /mnt/Data1T/mnote/wolai-frontend
pnpm test src/components/sidebar/sidebar-dnd-source.test.ts
结果:1 个测试文件通过,1 项测试通过。
5. 待补
- 2026-05-15 已补 3000 主入口
POST /api/tree/filetree/drop-preflight,通过 Rust bridgetree.filetree.drop.preflight返回真实 preflight plan。 - 2026-05-15 已补 3000 主入口真实浏览器 smoke:
MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task430-vscode-explorer-stage7-smoke.js。 task430验证自拖自身与父拖子均返回 400;copy modifier preflight 返回copy: true与documentTransferPlan.action=copy。- 后续 readonly 与命名冲突确认已由
4-33-vscode-explorer-dnd-readonly-conflict-v1.md收口。