归档本轮 P0/P1 bug 修复、设计审查迁移、AI selection scope 收口与 stream contract 调整,并保留当前 05 主线迁移起点。
2.0 KiB
2.0 KiB
5-17 [done][bug] 文档页标题优先 liveSidebarTitle 而非 Page Aggregate head v1
发现时间:2026-05-17
状态:
[done]关联主线:
05-editor-mainline
1. 问题定义
文档页标题显示仍可能优先读取 liveSidebarTitle,而不是 Page Aggregate head.title。当 Sidebar 多源延迟或抢源时,文档页标题可能被 Sidebar snapshot 覆盖。
2. 证据
- document-content.tsx 使用 live sidebar title 参与标题状态。
- page-aggregate-client-state.ts 标题逻辑仍接受外部 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. 当前主链修复状态
- 原证据指向的 React
document-content.tsx/page-aggregate-client-state.ts当前不在运行主链;wolai-frontend/src不存在,历史副本位于recycle/。 - 当前 Rust 文档壳初始标题来自 Page Aggregate
head.title,updatePaneChrome也从runtimeDescriptor.aggregate.head.title更新文档页 chrome。 - layout.rs 增加防回归测试,断言当前 sidebar runtime 不包含旧
liveSidebarTitle入口。
6. 验证
cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_tree_runtime_does_not_use_retired_query_preferred_snapshot_selector -- --nocapture- 结果:1 passed