- 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
2.2 KiB
2.2 KiB
Checklist: Filetree Context Menu Sidex Alignment
目标
对照 Sidex / VSCode Explorer Context,收敛 MNote 文件树右键菜单:只展示可用动作,已展示动作必须有真实效果。
允许修改
rust/crates/mnote-web/src/ssr/pages/layout.rsrust/crates/mnote-web/src/tree_shell/filetree_runtime.rsrust/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;不可用动作不应常驻为“假按钮”。
待办
- local_folder 下
New File继续创建页面;New Folder接入create_folder或在非 local_folder 隐藏。 Copy Path对 local folder 复制relativePath/ asset path,不复制标题。Reveal只做滚动/聚焦即可,但需记录状态。Duplicate若未实现 copy,则隐藏或禁用并说明;不要只 dispatch。Open Right对页面可打开 secondary document;对资源若不支持侧栏则隐藏,避免 unsupported placeholder。- 更新菜单字符串测试。
本轮执行记录
- 代码:
layout.rs收口文件树右键菜单,移除资源侧栏打开和未实现 duplicate,接入 local foldercreate_folder与真实Copy Path。 - 浏览器验证:
tmp/bug-20260521-workbench-browser-verify/result-title-docx-menu.json中资源菜单为“在新窗口打开 / 重命名 / 复制资源 ID / 删除 / Copy Path / Refresh / Reveal”,截图03-asset-context-menu.png。
验收命令
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