Files
mnote/design/05-editor-mainline/done/5-24-open-editors-lightweight-view-checklist-v1.md
T
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.3 KiB
Raw Blame History

5-24 Open Editors Lightweight View Checklist v1

状态:done

归档说明(2026-05-21):open editors lightweight snapshot / 可观测模型已完成;完整 sidebar UI 不是本阶段目标。

日期:2026-05-21

Ownermain editor tab / sidebar open editors parity

1. 目标

参考 Sidex / VSCode OpenEditorsView,为 MNote 做轻量版“打开的编辑器”视图或可观测模型。当前阶段不要求完整 UI,但至少要让 page/resource tabs 的 active、title、kind、dirty guard 状态可被统一读取和测试。

2. 允许修改范围

  • rust/crates/mnote-web/src/routes/web_shell.rs
  • rust/crates/mnote-web/src/ssr/styles.rs
  • 可新增 scripts/task47*-open-editors-*.js

3. 禁止事项

  • 不引入完整 VSCode editor group service。
  • 不实现多 editor group grid。
  • 不改变 Page Aggregate / local Markdown 事实源。
  • 不破坏现有 resource tab 打开、关闭和 URL state。

4. Checklist

  • 暴露轻量 open editors snapshotpage tab + resource tabs。
  • snapshot 至少包含 objectIdentitytitlekindactivedirtyGuard
  • active tab 切换时 snapshot 更新。
  • resource tab close / create 时 snapshot 更新。
  • 如做 UI,保持低干扰,不新增复杂 sidebar 分组。
  • 补测试或 smoke,验证可读取 active editor 列表。

5. 验收

  • cargo test -p mnote-web web_shell -- --test-threads=1
  • 如新增 smokenode scripts/task47*-open-editors-*.js

6. 非目标

  • 不做 drag editor between groups。
  • 不做完整 dirty working copy service。

7. 执行记录

  • 2026-05-21Codex 补齐 mnote.open_editors_snapshot.v1 轻量合同,暴露 window.__mnoteDocumentPaneRuntime.getOpenEditorsSnapshot(),并同步 window.__mnoteOpenEditorsSnapshot / data-mnote-open-editors-count / data-mnote-active-editor
  • 2026-05-21snapshot 覆盖 page tab 与 resource tabsresource tab 条目包含 objectIdentitytitlekindbadgeKindactivedirtyGuardassetIdpath
  • 2026-05-21:未新增 sidebar UI,当前阶段先保持为可观测模型。
  • 2026-05-21cargo test -p mnote-web web_shell -- --test-threads=1 通过。
  • Reasonix Worker A 本轮只停留在探索,未产生可合入 diff;最终由 Codex 本地实现。