# Checklist: Main Resource Tab Page Switch And Filetree Focus ## 目标 - resource tab 激活时,点击主 Markdown 或其他 Markdown 页面能切回主 page tab。 - 新建页面后,主编辑区显示新页面,filetree 选中和焦点落在新页面。 ## 允许修改 - `rust/crates/mnote-web/src/routes/web_shell.rs` - `rust/crates/mnote-web/src/ssr/pages/layout.rs` - 相关 Rust 字符串测试与浏览器 smoke ## 禁止事项 - 不改资源 tab 整体架构。 - 不删除 resource tab MRU / close guard。 - 不回滚 ACP/Hermes 相关改动。 ## 待办 - [x] document pane runtime 暴露 `activatePageTab()`。 - [x] `openPrimaryDocument` 成功后切回 page tab。 - [x] `navigateToDocument` same-document fast path 也能从 resource tab 切回 page tab。 - [x] 页面树整行点击也能触发打开,避免只点内部按钮才生效。 - [x] filetree 增加按 documentId 选中/聚焦 helper。 - [x] `createPage` 在 local folder projection 刷新后选中新页面。 - [x] primary document 激活后同步 filetree selection state。 - [x] 补浏览器验证覆盖 resource tab -> md page 切换、新建页面焦点。 ## 验收命令 ```bash cd /mnt/Data1T/mnote/rust cargo test -p mnote-web -- --test-threads=1 ``` ## 验证记录 - `cargo test -p mnote-web -- --test-threads=1`:482 passed。 - Playwright 复测:resource tab 激活后点击左侧 `Beta` 页面,URL 切到 `/documents/local-md:Beta.md`,active tab 为 `page`,resource host 隐藏,页面树 active 行为 `Beta`。 - 截图:`/mnt/Data1T/mnote/tmp/bug-20260521-tab-office-upload-after-row-click.png`。