Files
mnote/design/01-05-current-priority-overview.md
T
lix-2026 5f97800489 chore: align local-first control plane and editor fixes
- wire SQLite control-plane access/session paths into Rust web local-folder routes

- preserve local Markdown attachment semantics across upload, reload, and secondary-pane resource tabs

- refresh design governance docs, Reasonix task templates, and bug records

- retire root .mcp.json local MCP config
2026-05-23 23:38:42 +08:00

191 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 01-05 当前主线与优先级总览
> 更新时间:2026-05-22
>
> 2026-05-22 口径补充:
> - Rust SQLite control-plane 已承接默认 auth、membership、share grants、sync state、AI policy、ACP/Hermes runtime session 控制面。
> - 根 `convex/` functions 源码已软删除到 `recycle/20260522-convex-runtime-retirement/convex/`,只作为审计 / 迁移对照素材;`desktop:hot` / `dev:hot` 不启动 Convex。
> - Convex 只保留历史迁移源、显式 cloud source、compat 和 sync replica 边界;不要把 Convex Auth、`aiSessions.ts` 或根 functions deploy 重新描述为默认控制面。
>
> 2026-05-21 口径补充:
> - 当前已进入 local-first MVP 后阶段:最小可用闭环已建立,后续重点是底座统一、compat 瘦身和产品化闭环。
> - 新设计与 bug 修复默认从 `WorkspacePath/ObjectIdentity`、`DocumentBuffer/BufferStore`、Page Aggregate compat 瘦身、tree command context、live cache 统一、agent diff / 冲突合并 / 本地索引 / 分享同步产品化这些基线出发。
> - 旧 Convex / Next / BlockNote 主链只作为 legacy / recycle / compat 背景,不再作为新增能力默认方向。
>
> 2026-05-18 口径补充:
> - 产品形态已调整为 `Local-first workspace`:本地文件夹是默认数据真相,Rust kernel 是唯一语义真相,Rust SQLite control-plane 是默认账号、分享、同步、协作和 AI 隔离控制面;Convex / 服务端降级为历史迁移源、显式 cloud source、compat 和 sync replica 边界。
> - 产品定义可进一步收口为:`VSCode 简化版工作区内核 + tiptap markdown 编辑器 + Hermes / Reasonix agent + simplemindmap / office 插件 + Wolai 风格 web 壳 + 鉴权控制面`。
> - 上位设计已完成并迁入:`/mnt/Data1T/mnote/design/02-convex-rust-long-term-architecture/done/2-2-local-first-workspace-convex-control-plane-v1.md`。
> - 本地 Markdown 图片与附件上传已新增本地 route 并避免 Convex media asset,见 `bugs/03-rust-web/done/3-16-local-markdown-upload-uses-convex-media-asset-v1.md`;真实浏览器上传 / 刷新 / 文件树可见 smoke 已由 `scripts/task443-local-markdown-asset-upload-smoke.js` 覆盖。
> - 旧的“Convex 作为默认自托管存储 / 实时 / 文件底座”口径只作为当前代码过渡态理解,不再作为新增能力默认方向。
>
> 2026-05-16 口径补充:
> - `5-4` 的默认页面内 `leptos-tiptap` island 主链切流已完成并迁入 `done/`;官方模板视觉和菜单细节继续由 `5-2 / 5-7 / 5-9` 作为参考材料承接。
> - Convex File Tree 默认可见页面正文行已由 `4-35` 收口为 `doc:<documentId>` + `{title}.md`,旧 `index.md` 可见 UI 口径只作为历史记录理解。
> - 页面/块 AI tools 最小闭环已启动;旧 `7-10` 已降级为历史执行记录,`7-14` 也已移入 `old/`,不再作为当前 AI 编辑实现依据;当前 AI 编辑 active 稿为 `design/07-ai/process/7-18-local-first-agent-file-editing-control-plane-v1.md`,直接基于 SQLite control-plane + local-first `.md` + allowed roots + agent 原生 patch/diff,不改变 `Page Aggregate / tree command / tree realtime` 三条架构优先级。
这份总览只做一件事:
> **给 `design/01-*` 到 `design/05-*` 当前仍然有效的主线稿排优先级,并明确哪些 `process` 已经过时或应降级为历史参考。**
## 1. 当前仍然有效的上位主线
下面三份仍然是当前架构判断的上位依据:
- `/mnt/Data1T/mnote/design/01-tree-first-graph-kernel/reference/1-tree-first-graph-kernel-v1.md`
- `/mnt/Data1T/mnote/design/02-convex-rust-long-term-architecture/done/2-2-local-first-workspace-convex-control-plane-v1.md`
- `/mnt/Data1T/mnote/design/02-convex-rust-long-term-architecture/done/2-8-convex-replace-with-rust-sqlite-control-plane-v1.md`
- `/mnt/Data1T/mnote/design/03-rust-web/reference/3-rust-web-long-term-architecture-v1.md`
补充:旧稿 `/mnt/Data1T/mnote/design/old/02-convex-rust-long-term-architecture/process/2-tree-first-graph-convex-rust-long-term-architecture-v1.md` 已降级为 `[recycle][legacy]` 历史过渡判断,只解释“不要无计划硬拆 Convex”,不再作为新增能力默认存储口径。
它们分别固定了四件事:
1. 长期事实源是 `tree-first graph kernel`
2. 本地文件夹是早期产品默认数据真相,Rust SQLite control-plane 是默认控制面,Convex / 服务端降级为历史迁移源与显式 cloud / compat / sync replica
3. 旧 Convex 主存储链和根 Convex functions deploy 只作为历史 / 迁移对照,不再作为新增能力默认方向
4. `mnote-web` 是 Rust Web 承载层,长期继续承担 transport、projection 分发与切流
## 2. 当前第一优先级
当前最优先的不是继续补 P0-P6 产品闭环,而是在已完成的 local-first 最小闭环之上继续收紧底座:
- `WorkspacePath / ObjectIdentity`
- `DocumentBuffer / BufferStore`
- `Page Aggregate` 写读边界
- `tree.* / tree.resource.*`
- tree live cache
- agent allowed roots 与文件版本仲裁
P0-P6 已经有最小闭环证据;P7 已完成阶段性瘦身,但还不是完全 kernel-native / 无 compat 的终态。
### 2.0 Local-First Workspace
当前状态:
- `/mnt/Data1T/mnote/design/02-convex-rust-long-term-architecture/done/2-2-local-first-workspace-convex-control-plane-v1.md`
已完成的最小闭环:
- 前期产品是 10 人以内、个人笔记默认独立、可分享、AI 隔离的知识库,不是默认云协作平台
- 本地 markdown 文件更适合作为 AI 编辑、上传下载、备份、git 管理和调试的默认数据形态
- Convex 配置、schema、functions、实时订阅和 storage 不应继续阻塞本地个人工作区主路径
- LocalFS 已成为默认 `WorkspaceSource` 方向,SQLite control-plane 保留为账号、分享、同步和协作默认控制面;Convex 只保留显式 cloud / compat / sync replica 边界
- 本地 Markdown 上传、管理员目录授权、冲突合并 UI、agent changed files、本地索引、分享 / 同步、资源模型与导出迁移均已进入最小闭环
### 2.1 Page Aggregate
当前状态:
- `/mnt/Data1T/mnote/design/05-editor-mainline/reference/5-5-page-aggregate-single-truth-alignment-v1.md`
- `/mnt/Data1T/mnote/design/05-editor-mainline/done/5-6-page-aggregate-alignment-checklist-v1.md`
- `/mnt/Data1T/mnote/design/05-editor-mainline/done/5-5-1-page-aggregate-contract-v1.md`
阶段性结论:
- 默认主编辑器已经切到页面内 `leptos-tiptap` island
- 文档页读取主链已优先消费 Rust `mnote.page_aggregate.v1` 快照
- 标题、正文、页面设置刷新已通过 Page Aggregate smoke 验证一致
- 本地 `.md` 是正文真相,`EditorBlockDocument` 是 runtime projection / cache,这一边界已写入 `5-5 / 5-6`
- 前端手工拼 `meta + content` 已降级为 legacy `body.content` fallback;非 local 的后端 `CompatMetaContentJoin` 仍作为 cloud / legacy substrate 过渡边界保留
- 下一步不是再补页面设置 UI,而是推进 BufferStore、kernel-native projection 与写侧 compat 瘦身
### 2.2 Tree Command Cutover
当前状态:
- `/mnt/Data1T/mnote/design/04-tree-domain/done/4-6-tree-command-protocol-cutover-stage2-v1.md`
阶段性结论:
- 新增命令命名已统一到 `tree.*``tree.resource.*`
- `documents.*` 保留为 compat alias,不再作为新增主语义入口
- 资源 rename、move、archive、restore、purge 已补齐 `tree.resource.*`
- 下一步重点是继续缩薄旧 adapter,而不是扩展新的 `documents.*`
### 2.3 Tree Realtime 主链
当前状态:
- `/mnt/Data1T/mnote/design/03-rust-web/done/3-3-rust-web-tree-realtime-event-stream-v1.md`
- `/mnt/Data1T/mnote/design/03-rust-web/done/3-14-rust-web-tree-realtime-ws-push-v1.md`
- `/mnt/Data1T/mnote/design/03-rust-web/done/3-18-local-folder-tree-live-consumer-convergence-checklist-v1.md`
阶段性结论:
- 当前 sidebar 已有 query snapshot、tree stream、preferred snapshot 选择链
- `3000` 主壳已接入 WS snapshot / delta / resync consumerSSE 仅作为 fallback
- 双浏览器 page/file/resource/trash 操作已有 no-refresh smoke 证据
- 本地 folder sidebar watch 已从整页 HTML refetch 改为 projection API 刷新
- 当前重点已从“是否接入 live stream”转为减少补偿链、缩薄 legacy consumer 和补稳定 smoke。
## 3. 当前仍应保留但不在第一线的 reference / done
下面这些文档仍然有效,但当前不应排在第一优先;引用时必须叠加 2026-05-21 之后的 local-first MVP 后阶段口径:
- `/mnt/Data1T/mnote/design/01-tree-first-graph-kernel/reference/1-1-tree-first-graph-kernel-checklist-v2.md`
- `/mnt/Data1T/mnote/design/03-rust-web/reference/3-1-rust-web-long-term-checklist-v2.md`
- `/mnt/Data1T/mnote/design/04-tree-domain/done/4-sidebar-pagetree-filetree-rust-web-rebuild-v1.md`
- `/mnt/Data1T/mnote/design/04-tree-domain/done/4-2-sidebar-pagetree-filetree-product-interaction-contract-v1.md`
- `/mnt/Data1T/mnote/design/05-editor-mainline/reference/5-2-tiptap-notion-like-template-adoption-v1.md`
- `/mnt/Data1T/mnote/design/05-editor-mainline/done/5-4-leptos-tiptap-mainline-correction-v1.md`
- `/mnt/Data1T/mnote/design/04-tree-domain/done/4-35-convex-filetree-title-md-source-alignment-v1.md`
保留原因:
- 方向仍对
- 仍然是局部主线的有效合同
- 其中 `5-4``4-35` 的主目标已完成,后续仅作为当前事实依据被引用;它们不应压过 `Page Aggregate``tree command``tree realtime` 三条当前主战线
## 4. 当前已降级为历史参考的 05 主线稿
下面这些稿件已被后续实现和更新文档覆盖,不再作为当前活跃 `process`
- `/mnt/Data1T/mnote/design/old/05-editor-mainline/process/5-1-main-editor-cutover-entry-v1.md`
- `/mnt/Data1T/mnote/design/old/05-editor-mainline/process/5-3-tiptap-leptos-rust-migration-checklist-v1.md`
- `/mnt/Data1T/mnote/design/old/05-editor-mainline/process/5-editor-baseline-reset-v2.md`
- `/mnt/Data1T/mnote/design/old/04-tree-domain/process/4-1-sidebar-pagetree-filetree-product-gap-analysis-v1.md`
降级原因:
- 它们的重要判断已经被吸收到 `5-4 / 5-5 / 5-6`
- 文档中的事实基线已经落后于当前默认主编辑器、page aggregate 入口与 island 主链
- 继续保留在活跃 `process` 容易让后续工作按旧阶段推进
## 5. VSCode-like 产品缺口
`2-2` 已完成 local-first 骨架与迁移 checklist,下面这些产品闭环已有最小实现与验证证据,不再作为当前第一优先级:
1. 管理员目录授权 UI / API。
2. VSCode-like 冲突处理 UI。
3. agent changed files / diff 审计。
4. 本地搜索、反链和资源引用索引。
5. 分享与同步闭环。
6. 插件资源模型产品化。
7. 旧 Convex 数据迁移产品化。
后续产品工作应建立在统一 workspace identity、BufferStore、tree command context 和 live cache 之上,不应回到新增零散 route / compat 面。
## 6. 当前执行顺序
当前推荐顺序更新为:
1. 统一 `WorkspacePath / ObjectIdentity` 在 runtime 中的消费边界。
2.`DocumentBuffer` 接入运行时 `BufferStore`,让 tiptap、AI、watcher 共用打开态和文件版本仲裁。
3. 继续瘦身 Page Aggregate 的 legacy `body.content` / compat join 边界,推进 kernel-native projection。
4. 落地 command context / context key,统一菜单、快捷键、按钮和 AI 写入能力的 enablement 判断。
5. 继续把 local-folder watcher / projection refresh 收进同一 live cache。
6. 在上述底座稳定后,再扩展分享同步、资源工具和迁移的产品体验。
持续推进 checklist
- `/mnt/Data1T/mnote/design/01-tree-first-graph-kernel/done/1-3-current-priority-execution-checklist-v1.md`
- MVP 后阶段 process 执行总序:
`/mnt/Data1T/mnote/design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
## 7. 一句话收口
当前 `design/01-05` 的真实主线,不是“继续证明 Rust Web 值不值得做”,也不是“继续证明 `leptos-tiptap` 能不能用”,而是:
> **先把页面域、树域、上传下载和 AI 编辑收口到本地优先工作区,由 Rust kernel 持有唯一语义,由 SQLite control-plane 持有默认账号、分享、同步和协作控制面;Convex 只作为历史迁移源、显式 cloud source、compat 和 sync replica 边界保留。**