- add local-folder OnlyOffice sign/callback writeback and edit-tab handling - align main resource tabs, attachment edit menu, slash isolation, and filetree context behavior - record Sidex/Hermes gap reviews and Reasonix task checklists
47 lines
2.2 KiB
Markdown
47 lines
2.2 KiB
Markdown
# Checklist: Filetree Context Menu Sidex Alignment
|
|
|
|
## 目标
|
|
|
|
对照 Sidex / VSCode Explorer Context,收敛 MNote 文件树右键菜单:只展示可用动作,已展示动作必须有真实效果。
|
|
|
|
## 允许修改
|
|
|
|
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
|
- `rust/crates/mnote-web/src/tree_shell/filetree_runtime.rs`
|
|
- `rust/crates/mnote-web/src/routes/local_folder_source.rs` 中已有 tree command 入口的小范围扩展
|
|
- 相关测试
|
|
|
|
## 禁止事项
|
|
|
|
- 不照搬 Sidex 菜单注册框架。
|
|
- 不保留点击后只 dispatch 但用户不可见无效果的菜单项。
|
|
- 不让资源“在右侧边栏打开”生成 unsupported placeholder。
|
|
|
|
## Sidex 对照结论
|
|
|
|
- Sidex / VSCode 的 Explorer 菜单来自 `MenuId.ExplorerContext`,动作在 `fileActions.contribution.ts` 注册。
|
|
- 基础动作包括 Open to the Side、New File、New Folder、Reveal、Copy Path、Rename、Delete。
|
|
- 动作显示/启用依赖 context key;不可用动作不应常驻为“假按钮”。
|
|
|
|
## 待办
|
|
|
|
- [x] local_folder 下 `New File` 继续创建页面;`New Folder` 接入 `create_folder` 或在非 local_folder 隐藏。
|
|
- [x] `Copy Path` 对 local folder 复制 `relativePath` / asset path,不复制标题。
|
|
- [x] `Reveal` 只做滚动/聚焦即可,但需记录状态。
|
|
- [x] `Duplicate` 若未实现 copy,则隐藏或禁用并说明;不要只 dispatch。
|
|
- [x] `Open Right` 对页面可打开 secondary document;对资源若不支持侧栏则隐藏,避免 unsupported placeholder。
|
|
- [x] 更新菜单字符串测试。
|
|
|
|
## 本轮执行记录
|
|
|
|
- 代码:`layout.rs` 收口文件树右键菜单,移除资源侧栏打开和未实现 duplicate,接入 local folder `create_folder` 与真实 `Copy Path`。
|
|
- 浏览器验证:`tmp/bug-20260521-workbench-browser-verify/result-title-docx-menu.json` 中资源菜单为“在新窗口打开 / 重命名 / 复制资源 ID / 删除 / Copy Path / Refresh / Reveal”,截图 `03-asset-context-menu.png`。
|
|
|
|
## 验收命令
|
|
|
|
```bash
|
|
cd /mnt/Data1T/mnote/rust
|
|
cargo test -p mnote-web sidebar_tree_runtime_renders_context_menu_and_scoped_title_updates -- --test-threads=1
|
|
cargo test -p mnote-web sidebar_tree_runtime_handles_navigation_drag_and_filetree_actions -- --test-threads=1
|
|
```
|