fix: 收口批次D并修复本地垃圾箱清空
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# Reasonix Batch D Worker A:资源打开 resolver 小收敛
|
||||
|
||||
Project root: `/mnt/Data1T/mnote`
|
||||
|
||||
## 背景
|
||||
|
||||
P1 阶段仍有 `5-26 Resource Open Resolver Convergence Checklist` 未完成。当前重点不是重写 resolver,而是最小化收敛 `layout.rs` 中正文附件与 FileTree local Office 打开的重复分支。
|
||||
|
||||
事实源:
|
||||
|
||||
- `design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
- `design/01-tree-first-graph-kernel/process/1-11-batch-d-p1-small-tail-execution-checklist-v1.md`
|
||||
- `design/05-editor-mainline/process/5-26-resource-open-resolver-convergence-checklist-v1.md`
|
||||
|
||||
## Ownership
|
||||
|
||||
你可以修改:
|
||||
|
||||
- `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`
|
||||
|
||||
不要修改:
|
||||
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
- `rust/crates/mnote-web/src/routes/onlyoffice.rs`
|
||||
- ACP / Hermes 相关文件
|
||||
- Markdown parser / local_folder_source
|
||||
|
||||
你不是独自在代码库中工作。不要回滚、覆盖、格式化或清理其他 worker 的改动。不要提交 git。
|
||||
|
||||
## 任务
|
||||
|
||||
1. 审查这些函数的重复判断:
|
||||
- `buildLocalOnlyOfficeOpenUrl`
|
||||
- `openConvexAssetFromFileTree`
|
||||
- `openEditorAttachmentDetail`
|
||||
- `openEditorAttachmentNewWindow`
|
||||
- `openEditorAttachmentEditTab`
|
||||
2. 如果可以安全实现,提炼一个最小 helper,例如 `openLocalOfficeFileInActiveTab(detail, mode)` 或等价命名,用于正文附件 `弹窗编辑` 和 FileTree edit-mode active tab 的 local Office 打开。
|
||||
3. 保持当前已验证行为:
|
||||
- 正文附件 `弹窗编辑` 进入 main resource tab,不弹新浏览器窗口。
|
||||
- 正文附件 `新窗口编辑` 进入浏览器新窗口。
|
||||
- FileTree edit-mode active tab 继续可用。
|
||||
- `md/text/code` 继续走 tiptap / 内建编辑器,不改成 OnlyOffice。
|
||||
4. 更新 `5-26` 执行记录。只有真实代码和验证完成的项才打勾。
|
||||
5. 如现有 `task463` 不能覆盖分流,请补最小断言。
|
||||
|
||||
## 验证
|
||||
|
||||
至少运行:
|
||||
|
||||
```bash
|
||||
cd /mnt/Data1T/mnote/rust
|
||||
cargo test -p mnote-web sidebar_tree_runtime_opens_office_assets_through_resource_shell -- --test-threads=1
|
||||
```
|
||||
|
||||
以及:
|
||||
|
||||
```bash
|
||||
cd /mnt/Data1T/mnote
|
||||
node scripts/task463-onlyoffice-resolver-smoke.js
|
||||
```
|
||||
|
||||
## 最终回复格式
|
||||
|
||||
- 修改文件列表
|
||||
- 收敛了哪些重复分支
|
||||
- 运行过的命令和结果
|
||||
- 未完成项/风险
|
||||
@@ -0,0 +1,64 @@
|
||||
# Reasonix Batch D Worker B:本地 Markdown 标题优先级收口
|
||||
|
||||
Project root: `/mnt/Data1T/mnote`
|
||||
|
||||
## 背景
|
||||
|
||||
P1 阶段 `3-13 Rust Web 本地 Markdown GFM AST 解析器迁移方案` 仍有标题优先级尾项未完成。当前 `parse_markdown_page` 固定使用文件名 stem 作为标题,需要收口到:
|
||||
|
||||
`frontmatter title > 第一条 H1 > 文件名`
|
||||
|
||||
事实源:
|
||||
|
||||
- `design/01-tree-first-graph-kernel/process/1-8-mvp-post-process-execution-order-v1.md`
|
||||
- `design/01-tree-first-graph-kernel/process/1-11-batch-d-p1-small-tail-execution-checklist-v1.md`
|
||||
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
|
||||
## Ownership
|
||||
|
||||
你可以修改:
|
||||
|
||||
- `rust/crates/mnote-web/src/routes/local_markdown_parser.rs`
|
||||
- `rust/crates/mnote-web/src/routes/local_folder_source.rs`
|
||||
- `design/03-rust-web/process/3-13-rust-web-local-markdown-gfm-ast-parser-migration-v1.md`
|
||||
|
||||
不要修改:
|
||||
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
- resource trash / open resolver / OnlyOffice / ACP / Hermes 相关文件
|
||||
|
||||
你不是独自在代码库中工作。不要回滚、覆盖、格式化或清理其他 worker 的改动。不要提交 git。
|
||||
|
||||
## 任务
|
||||
|
||||
1. 修改 `parse_markdown_page` 标题解析规则:
|
||||
- frontmatter 中 `title: ...` 非空时优先使用。
|
||||
- frontmatter 无 title 时,使用正文中的第一条 H1。
|
||||
- 仍无标题时,回退 `file_stem_title(file_name)`。
|
||||
2. 解析 frontmatter title 时保持简单、可测:
|
||||
- 支持普通 `title: value`。
|
||||
- 支持简单引号包裹值。
|
||||
- 不需要引入新的 YAML 依赖,除非仓库已有稳定依赖可直接复用。
|
||||
3. 保持 `mnote_id`、document_id、path-id 规则不变。
|
||||
4. 更新现有测试 `local_markdown_page_title_comes_from_file_name_not_body_heading`,不要再断言“有 H1 也只取文件名”。
|
||||
5. 补最小测试覆盖 frontmatter / H1 / filename 三层优先级。
|
||||
6. 更新 `3-13` 执行记录,只标记本轮真实完成的标题优先级项。
|
||||
|
||||
## 验证
|
||||
|
||||
至少运行:
|
||||
|
||||
```bash
|
||||
cd /mnt/Data1T/mnote/rust
|
||||
cargo test -p mnote-web local_markdown -- --test-threads=1
|
||||
```
|
||||
|
||||
如果你新增了更精确测试名,也请单独运行对应测试。
|
||||
|
||||
## 最终回复格式
|
||||
|
||||
- 修改文件列表
|
||||
- 标题优先级实现方式
|
||||
- 运行过的命令和结果
|
||||
- 未完成项/风险
|
||||
Reference in New Issue
Block a user