52 lines
2.0 KiB
Markdown
52 lines
2.0 KiB
Markdown
# Reasonix Worker C:CommandContext FileTree 菜单 / 快捷键最小接入
|
||
|
||
Project root: `/mnt/Data1T/mnote`
|
||
|
||
你不是唯一 worker。不要回滚、覆盖或整理他人改动;只处理本任务 ownership 范围。
|
||
|
||
## 背景
|
||
|
||
上位 checklist:`design/01-tree-first-graph-kernel/process/1-12-batch-e-p1-p2-tail-execution-checklist-v1.md`
|
||
|
||
`core-protocol` 已有 `CommandContext` / `when` evaluator / `is_command_enabled`,但 `1-6` Gap A7 仍显示 FileTree 右键菜单、快捷键、AI 写入能力未消费统一 enablement。本轮只做 FileTree 菜单和 Delete/Backspace 快捷键最小接入。
|
||
|
||
## Ownership
|
||
|
||
允许修改:
|
||
|
||
- `design/01-tree-first-graph-kernel/process/1-6-next-phase-gap-closure-checklist-v1.md`
|
||
- `rust/crates/core-protocol/src/command.rs`
|
||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||
- `scripts/task476-filetree-editor-context-menu-download-smoke.js`
|
||
- `scripts/task471-local-folder-bulk-resource-trash-smoke.js`
|
||
|
||
禁止修改:
|
||
|
||
- GFM parser / web_shell conflict UI
|
||
- AI / Hermes / OnlyOffice 文件
|
||
- git commit、git reset、git checkout
|
||
|
||
## 任务
|
||
|
||
1. 审查 `core-protocol` 的 CommandContext 测试口径。
|
||
2. 在 SSR sidebar JS 中引入最小 `CommandContext` 等价 enablement helper,先覆盖 FileTree 右键菜单和 Delete/Backspace 快捷键。
|
||
3. readonly / sourceKind / selectionCount / resourceKind 的禁用语义应与 Rust `CommandContext` 现有测试一致;本轮不要求把 Rust evaluator 直接编译到 JS。
|
||
4. 保持下载、多选删除、粘贴、只读阻断 smoke 不回退。
|
||
5. 更新 `1-6` Gap A7 记录,不把 AI 写入能力标完成。
|
||
|
||
## 验收命令
|
||
|
||
- `cargo test -p mnote-web sidebar_filetree -- --test-threads=1`
|
||
- `cargo test -p core-protocol command_context -- --test-threads=1`
|
||
- `node scripts/task471-local-folder-bulk-resource-trash-smoke.js`
|
||
- `node scripts/task476-filetree-editor-context-menu-download-smoke.js`
|
||
|
||
## 最终回复
|
||
|
||
请列出:
|
||
|
||
- 修改文件
|
||
- 运行的命令和结果
|
||
- 未完成项
|
||
- 风险或需要 Codex 再判断的点
|