chore: 保存当前架构收口与 bug 修复快照

归档本轮 P0/P1 bug 修复、设计审查迁移、AI selection scope 收口与 stream contract 调整,并保留当前 05 主线迁移起点。
This commit is contained in:
lix-2026
2026-05-18 17:01:35 +08:00
parent 61ee4a38a2
commit a2cb1338c8
953 changed files with 14383 additions and 211845 deletions
@@ -1,37 +0,0 @@
# 4-46 [process][bug] FileTree 资源行被当成页面命令对象处理 v1
> 发现时间:2026-05-17
>
> 状态:`[process]`
>
> 关联主线:`04-tree-domain`
## 1. 问题定义
FileTree asset row 的 `resourceMeta` 同时带 `documentId``assetId`,但 tree shell 的部分交互会优先读取 `documentId`,从而把资源行当成页面行执行删除、复制、移动、重命名等页面命令。
这直接违反 Resource Tree / File Tree / Page Tree 的分层边界。
## 2. 证据
- [bridge-runtime/src/lib.rs](/mnt/Data1T/mnote/rust/crates/bridge-runtime/src/lib.rs:8499) 附近构造 asset row resource meta。
- [tree.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/tree.rs:2019) `getFileTreeRowDocumentId()` 优先返回资源行中的 `documentId`
- [tree.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/tree.rs:2881) 键盘删除路径使用 documentId。
- [tree.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/tree.rs:2962) 剪贴板路径使用 documentId。
- [tree.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/tree.rs:4630) F2 重命名路径使用 documentId。
## 3. 影响
- 选中 mindmap / table / media asset 行后,可能误删或误重命名所属页面。
- 资源归属与页面结构命令混淆。
- `tree.resource.*` 的正式命令面无法成为资源操作唯一入口。
## 4. 建议修复
- FileTree row model 必须区分 `document row``resource row`,不要对 resource row 暴露页面 document command。
- Delete / F2 / copy / move 对资源行应走 `tree.resource.*`,或在未实现时显式禁用。
- 增加浏览器 smoke:资源行上 Delete、F2、Ctrl+C/X/V 不得触发页面命令。
## 5. 状态
已确认 row model 与命令分发存在泄漏,尚未修复。