Persist PageTree expand state via control-plane view-state and align chevron/DOM with restored expansion; keep Sidex-style shallow page-tree scan and drop the unused recursive scanner that only added cargo noise. Add password vault workbench routes/runtime/skill/CLI, split page_ai_pi into a module package, and retire Hermes/ACP/OpenHub recycle + root harness evidence from the index while gitignoring recycle and local diag dumps. Archive superseded design/bugs docs under old/, point architecture at ARCHITECTURE.md, and refresh smokes for Pi S1–S7, vault, and editor regressions so the working tree can stay clean.
116 lines
4.5 KiB
Markdown
116 lines
4.5 KiB
Markdown
# [recycle] 1-11 [done] Batch D P1 小尾项执行 checklist v1
|
||
|
||
> 创建时间:2026-05-21
|
||
>
|
||
> 当前状态:`DONE`
|
||
>
|
||
> 目标:把 P1 阶段剩余的两个最小尾项拆成可独立执行的小批次,避免继续在大而散的 process 文档中发散:
|
||
> 1. 资源打开 resolver 收敛
|
||
> 2. 本地 Markdown 页面标题优先级收口
|
||
>
|
||
> 上位依据:
|
||
> - `/mnt/Data1T/mnote/design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||
> - `/mnt/Data1T/mnote/design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md`
|
||
> - `/mnt/Data1T/mnote/design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||
> - `/mnt/Data1T/mnote/design/01-tree-first-graph-kernel/done/1-6-next-phase-gap-closure-checklist-v1.md`
|
||
|
||
---
|
||
|
||
## 1. 执行顺序
|
||
|
||
先跑资源打开收敛,再跑 Markdown 标题优先级。
|
||
|
||
- 资源打开收敛影响面更窄,且可通过现有 smoke 快速确认。
|
||
- Markdown 标题优先级属于读侧口径收口,改动点更集中,但会影响 page tree / aggregate 的标题展示,因此单独成批。
|
||
|
||
不要把这两个尾项和 open editors、filetree action、BufferStore conflict UI、AI 主线混在同一轮 worker 中。
|
||
|
||
---
|
||
|
||
## 2. Batch D1:资源打开 resolver 收敛
|
||
|
||
### 2.1 目标
|
||
|
||
继续对照 Sidex editor input resolver,把正文附件、FileTree asset、new-window、active-tab 的资源打开策略收敛到更一致的 helper 和断言。
|
||
|
||
### 2.2 允许修改范围
|
||
|
||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||
- `scripts/task463-onlyoffice-resolver-smoke.js`
|
||
- `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md`
|
||
|
||
### 2.3 禁止事项
|
||
|
||
- 不修改 `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||
- 不修改 `rust/crates/mnote-web/src/routes/onlyoffice.rs`
|
||
- 不修改 ACP / Hermes 相关文件
|
||
- 不破坏文件树 edit-mode active tab 已验证行为
|
||
- 不把 `md/text/code` 改成 OnlyOffice 默认打开
|
||
|
||
### 2.4 Checklist
|
||
|
||
- [ ] 审查 `buildLocalOnlyOfficeOpenUrl`、`openEditorAttachmentEditTab`、`openConvexAssetFromFileTree` 与正文附件 open path 的重复判断。
|
||
- [ ] 提炼最小 helper,优先减少正文附件与 FileTree 的分歧。
|
||
- [ ] 保持正文附件 `弹窗编辑` 进入 main resource tab。
|
||
- [ ] 保持正文附件 `新窗口编辑` 进入浏览器新窗口。
|
||
- [ ] 保持 `md/text/code` 继续走 tiptap / 内建编辑器。
|
||
- [ ] 更新或补充 smoke 断言,覆盖正文附件编辑模式分流。
|
||
|
||
### 2.5 验收
|
||
|
||
- `cargo test -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1`
|
||
- `node scripts/task463-onlyoffice-resolver-smoke.js`
|
||
|
||
### 2.6 完成条件
|
||
|
||
这一批完成后,可以把 `5-26` 中对应重复判断项打勾,并保留剩余未完成项在原文。
|
||
|
||
---
|
||
|
||
## 3. Batch D2:Markdown 标题优先级收口
|
||
|
||
### 3.1 目标
|
||
|
||
把本地 Markdown 页面标题口径收口为:
|
||
|
||
> frontmatter title > 第一条 H1 > 文件名
|
||
|
||
当前 `parse_markdown_page` 仍只按文件名生成标题,需要补齐前两级优先级,但不能破坏 `mnote_id / path-id` 相关行为。
|
||
|
||
### 3.2 允许修改范围
|
||
|
||
- `rust/crates/mnote-web/src/routes/local_markdown_parser.rs`
|
||
- `rust/crates/mnote-web/src/routes/local_folder_source.rs`
|
||
|
||
### 3.3 禁止事项
|
||
|
||
- 不改 resource lifecycle / trash / open resolver 行为
|
||
- 不改 Page Aggregate 的 identity 规则
|
||
- 不引入新的大解析层或额外 adapter
|
||
- 不把标题优先级改回前端补丁
|
||
|
||
### 3.4 Checklist
|
||
|
||
- [ ] 为 `parse_markdown_page` 增加 frontmatter title 优先级。
|
||
- [ ] 若 frontmatter 没有 title,则回退到正文第一条 H1。
|
||
- [ ] 若都没有,再回退到文件名 stem。
|
||
- [ ] 保持 page_id / document_id / path-id 规则不变。
|
||
- [ ] 更新现有标题相关测试,避免继续断言“标题只取文件名”。
|
||
- [ ] 补一个最小回归测试,覆盖 frontmatter / H1 / 文件名三层优先级。
|
||
|
||
### 3.5 验收
|
||
|
||
- `cargo test -p mnote-web local_markdown -- --test-threads=1`
|
||
|
||
### 3.6 完成条件
|
||
|
||
这一批完成后,可以把 `3-13` 中标题相关尾项打勾,并继续保留其余 GFM AST 迁移尾项为 `process`。
|
||
|
||
---
|
||
|
||
## 4. 本轮执行记录
|
||
|
||
- 2026-05-21:已将 P1 剩余尾项拆为 `Batch D1`(资源打开 resolver 收敛)与 `Batch D2`(Markdown 标题优先级收口)。
|
||
- 2026-05-21:这两个批次都保持最小 scope,不与 open editors、BufferStore conflict UI、AI 主线混跑。
|
||
- 2026-05-21:两项都已完成并经 Rust 单测、task474 / task463 浏览器 smoke 与 CodeGraph 同步复核,现归档到 `done/`。
|