Files
mnote/design/05-editor-mainline/done/5-21-editor-tab-url-active-identity-checklist-v1.md
lix-2026 1956a8a21a chore: align mvp design governance
- 统一 local-first MVP 后阶段架构口径,补充 process 执行总序和 Reasonix 协作记录

- 归档已完成的 design checklist,标注参考型 process,更新 AGENTS/REASONIX/架构文档

- 补充文件树/主编辑器下载与上下文菜单相关实现、bug 记录和 smoke 脚本

验证:git diff --check;codegraph sync .;cargo test -p mnote-web;node --check scripts/task476-filetree-editor-context-menu-download-smoke.js
2026-05-21 09:04:13 +08:00

2.0 KiB
Raw Permalink Blame History

5-21 Editor Tab URL / Active Row / Canonical Identity Checklist v1

状态:done

归档说明(2026-05-21):editor tab URL、active row 与 canonical identity 收口已完成。

日期: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

  • resource tab 使用统一 canonical identity,优先 resource:file:<rootUri>:<path>
  • 激活 resource tab 时写入可测试 URL state 或 history state,不触发整页导航。
  • 切回 page tab 时清除 active resource state。
  • sidebar file tree 对应 resource row 能显示 active 状态或至少暴露稳定 DOM 标记。
  • page tab / resource tab 切换后不会卡死在 resource tabtask457 继续覆盖。

5. 验收

  • node --check scripts/task457-main-editor-resource-tab-smoke.js
  • node scripts/task457-main-editor-resource-tab-smoke.js
  • 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。