- add npm dev:hot wrapper using cargo-watch and page reload polling - add mnote-web dev hot reload endpoint and coverage - record current architecture review and tracked bug findings across realtime, tree, editor, and AI runtimes Verification: - node scripts/task-dev-hot-plan-test.js - node --check scripts/dev-hot.js - cargo test -p mnote-web dev_hot -- --nocapture
33 lines
1.3 KiB
Markdown
33 lines
1.3 KiB
Markdown
# 5-17 [process][bug] 文档页标题优先 liveSidebarTitle 而非 Page Aggregate head v1
|
|
|
|
> 发现时间:2026-05-17
|
|
>
|
|
> 状态:`[process]`
|
|
>
|
|
> 关联主线:`05-editor-mainline`
|
|
|
|
## 1. 问题定义
|
|
|
|
文档页标题显示仍可能优先读取 `liveSidebarTitle`,而不是 Page Aggregate `head.title`。当 Sidebar 多源延迟或抢源时,文档页标题可能被 Sidebar snapshot 覆盖。
|
|
|
|
## 2. 证据
|
|
|
|
- [document-content.tsx](/mnt/Data1T/mnote/wolai-frontend/src/components/editor/document-content.tsx:159) 使用 live sidebar title 参与标题状态。
|
|
- [page-aggregate-client-state.ts](/mnt/Data1T/mnote/wolai-frontend/src/components/editor/page-aggregate-client-state.ts:144) 标题逻辑仍接受外部 live title。
|
|
|
|
## 3. 影响
|
|
|
|
- 文档页标题、Sidebar 标题、Page Aggregate head 可能短暂或长期不一致。
|
|
- 标题保存后回读来源不唯一,影响面包屑、AI context、页面 chrome。
|
|
- Page Aggregate 单一真源收口被 Sidebar 侧状态反向覆盖。
|
|
|
|
## 4. 建议修复
|
|
|
|
- 文档页自身标题应以 Page Aggregate head 为主,Sidebar title 只作为导航视图投影。
|
|
- Sidebar title 与 Page Aggregate head 冲突时记录诊断并触发 resync。
|
|
- 增加 smoke:改标题后 Sidebar、Breadcrumb、文档页标题同源一致。
|
|
|
|
## 5. 状态
|
|
|
|
已确认标题来源仍有漂移风险,尚未修复。
|