Files
mnote/design/03-rust-web/reference/3-23-sidebar-local-folder-resource-runtime-followup-v1.md

34 lines
2.1 KiB
Markdown
Raw Permalink 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.
# 3-23 Sidebar local folder / resource runtime follow-up v1
> 创建时间:2026-05-25
> 状态:`reference`
> 来源:`design/03-rust-web/done/3-22-sidebar-tree-runtime-second-stage-split-v1.md` Batch B / Batch D。
> 2026-06-06 归档说明:本文件不再作为 active process。后续审计已在 `design/03-rust-web/done/3-20-browser-runtime-followup-checklist-v1.md` 记录:`refreshLocalFolderSidebarSnapshot` 仍是 shell 编排,不整体迁入 `filetree-runtime.js`mindmap fetch observer 仅迁出纯 helper 层。新的高收益 runtime 收口应按 event bus / projection renderer / view-state owner 单独拆 checklist。
## 1. 背景
`3-22` 已完成 sidebar shell helper 第一刀,但 `sidebar-tree-runtime.js` 中 local folder、mindmap fetch observer、resource/filetree 编排仍是下一批 03-rust-web owner。
这些代码仍涉及:
- `installMindmapAssetFetchObserver`
- `withLocalMindmapSourceParams`
- `applyMindmapApiMutationToFileTree`
- `refreshLocalFolderSidebarSnapshot`
- `appendUploadedAssetRow`
- `resolveFileTreeUploadTarget`
其中纯 URL/body/method/file name helper 已有一部分迁入 `filetree-runtime.js`。剩余函数多涉及 fetch hook、workspace/root/document 状态、projection render、selection/focus 恢复、watcher 标记和资源行 patch,因此不能整体迁出。
## 2. 参考边界
- `refreshLocalFolderSidebarSnapshot` 保持 shell 编排:fetch、projection render、selection/focus、watcher 标记和 post-apply 副作用仍耦合当前 sidebar host。
- mindmap fetch observer 只适合迁纯 URL/body/method/file name helper,不迁 fetch hook、workspace/root/document 状态和 projection render。
- 回归基线仍参考 `task455-local-folder-mindmap-clean-smoke.js``task479-local-folder-markdown-resource-lifecycle-smoke.js`,但本文件不再承接实现任务。
## 3. 非目标
- 不改变 local folder 资源归属语义。
- 不迁 Rust tree command / projection 语义到前端。
- 不把 Page AI panel 混入本文件;AI owner 已拆到 `design/07-ai/done/7-38-page-ai-sidebar-runtime-owner-split-v1.md`