Files
mnote/design/05-editor-mainline/done/5-21-editor-tab-url-active-identity-checklist-v1.md
T

52 lines
2.0 KiB
Markdown
Raw Normal View History

2026-05-20 20:48:18 +08:00
# 5-21 Editor Tab URL / Active Row / Canonical Identity Checklist v1
2026-05-21 09:04:13 +08:00
> 状态:done
>
> 归档说明(2026-05-21):editor tab URL、active row 与 canonical identity 收口已完成。
2026-05-20 20:48:18 +08:00
>
> 日期:2026-05-20
>
> Owner:主编辑区 tab runtime / sidebar active state / resource identity
## 1. 目标
在 P0 清零后推进相邻 P1:resource tab 激活目前主要改 DOM 状态,不稳定同步 URL、sidebar active row 与 canonical identity。先做轻量收口,让用户在 resource tab / page tab 之间切换时有可测试的 active resource 状态。
## 2. 允许修改范围
- `rust/crates/mnote-web/src/routes/web_shell.rs`
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
- `scripts/task457-main-editor-resource-tab-smoke.js`
- 可新增聚焦 smoke
## 3. 禁止事项
- 不实现 tab 持久化恢复。
- 不改变 Page Aggregate / local Markdown 事实源。
- 不实现完整 side group。
## 4. Checklist
- [x] resource tab 使用统一 canonical identity,优先 `resource:file:<rootUri>:<path>`
- [x] 激活 resource tab 时写入可测试 URL state 或 history state,不触发整页导航。
- [x] 切回 page tab 时清除 active resource state。
- [x] sidebar file tree 对应 resource row 能显示 active 状态或至少暴露稳定 DOM 标记。
- [x] page tab / resource tab 切换后不会卡死在 resource tab`task457` 继续覆盖。
## 5. 验收
- [x] `node --check scripts/task457-main-editor-resource-tab-smoke.js`
- [x] `node scripts/task457-main-editor-resource-tab-smoke.js`
- [x] `cargo test -p mnote-web web_shell -- --test-threads=1`
## 5.1 本轮执行记录
- 已合入:resource tab 激活时写入 `resourceTab=<canonical identity>` URL state,切回 page tab 或关闭全部资源 tab 时清除。
- 已合入:对应 filetree row 已渲染时只设置 `data-active=true`,不污染 `data-selected` 多选状态。
- 已验证:`task457` 覆盖 resource tab、Office tab、new-window、关闭回退和 URL state 清理。
## 6. 非目标
- 不做跨刷新恢复。
- 不做多 editor group。