chore: 保存当前架构收口与 bug 修复快照
归档本轮 P0/P1 bug 修复、设计审查迁移、AI selection scope 收口与 stream contract 调整,并保留当前 05 主线迁移起点。
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
> 更新时间:2026-05-14
|
||||
>
|
||||
> 分类归属:
|
||||
> - `05-editor-mainline/process`
|
||||
> - `05-editor-mainline/done`
|
||||
> - 涉及边界:`04-tree-domain/tree command + file_tree projection`、`06-mindmap/runtime save + resource relation`
|
||||
>
|
||||
> 用户证据:
|
||||
|
||||
+12
-4
@@ -1,8 +1,8 @@
|
||||
# 5-15 [process][bug] PageAggregateClientState 仍在前端生成第二份 page tree 真相 v1
|
||||
# 5-15 [done][bug] PageAggregateClientState 仍在前端生成第二份 page tree 真相 v1
|
||||
|
||||
> 发现时间:2026-05-17
|
||||
>
|
||||
> 状态:`[process]`
|
||||
> 状态:`[done]`
|
||||
>
|
||||
> 关联主线:`05-editor-mainline`
|
||||
|
||||
@@ -28,6 +28,14 @@
|
||||
- AI context 应优先读取 Rust Page Aggregate 的稳定 projection。
|
||||
- 增加测试:本地编辑后 AI context 与 Rust 回读 projection 必须一致。
|
||||
|
||||
## 5. 状态
|
||||
## 5. 修复
|
||||
|
||||
已确认前端仍生成第二份 page tree,尚未收口。
|
||||
- [layout.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/pages/layout.rs:227) `currentPageAiContextSnapshot` 不再在编辑器 DOM 与服务端 aggregate 不一致时构造 `local` page subtree;AI context 的 subtree 只来自 Rust Page Aggregate 的 `aggregate.tree.pageSubtree`。
|
||||
- [layout.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/pages/layout.rs:7448) 增加字符串合同测试,禁止 `pageSubtreeSource: 'local'` 与 `buildPageAiLocalSubtree(localBlocks)` 回到 AI context 主链。
|
||||
|
||||
## 6. 验证
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web page_ai_context_uses_page_aggregate_subtree_as_single_truth -- --nocapture`
|
||||
- 结果:1 passed
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web ssr::pages::layout::tests -- --nocapture`
|
||||
- 结果:12 passed
|
||||
+11
-4
@@ -1,8 +1,8 @@
|
||||
# 5-16 [process][bug] Sidebar preferred snapshot 中 query 可覆盖 live stream v1
|
||||
# 5-16 [done][bug] Sidebar preferred snapshot 中 query 可覆盖 live stream v1
|
||||
|
||||
> 发现时间:2026-05-17
|
||||
>
|
||||
> 状态:`[process]`
|
||||
> 状态:`[done]`
|
||||
>
|
||||
> 关联主线:`05-editor-mainline`
|
||||
|
||||
@@ -27,6 +27,13 @@ Sidebar 同时启动 query/live/initial 与 tree stream,并通过 preferred sn
|
||||
- 同版本不同内容时必须记录诊断事件,而不是静默按 freshness 选择。
|
||||
- 增加单测覆盖同版本冲突。
|
||||
|
||||
## 5. 状态
|
||||
## 5. 当前主链修复状态
|
||||
|
||||
已确认多源选择策略仍可能覆盖 live stream,尚未修复。
|
||||
- 原证据指向的 `wolai-frontend/src/components/sidebar/use-preferred-sidebar-snapshot.ts` 已不在当前运行主链;当前仓库中该路径不存在,只在 `recycle/` 下保留历史副本。
|
||||
- 当前 3000 主壳由 Rust `SIDEBAR_TREE_JS` + `TREE_LIVE_CONTROLLER_JS` 消费 WS/SSE tree snapshot / delta,不再使用 retired React `usePreferredSidebarSnapshot` 选择器。
|
||||
- [layout.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/pages/layout.rs:7460) 增加防回归测试,断言当前 sidebar runtime 不包含 `usePreferredSidebarSnapshot`、`preferredSidebarSnapshot` 或 `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
|
||||
+11
-4
@@ -1,8 +1,8 @@
|
||||
# 5-17 [process][bug] 文档页标题优先 liveSidebarTitle 而非 Page Aggregate head v1
|
||||
# 5-17 [done][bug] 文档页标题优先 liveSidebarTitle 而非 Page Aggregate head v1
|
||||
|
||||
> 发现时间:2026-05-17
|
||||
>
|
||||
> 状态:`[process]`
|
||||
> 状态:`[done]`
|
||||
>
|
||||
> 关联主线:`05-editor-mainline`
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
- Sidebar title 与 Page Aggregate head 冲突时记录诊断并触发 resync。
|
||||
- 增加 smoke:改标题后 Sidebar、Breadcrumb、文档页标题同源一致。
|
||||
|
||||
## 5. 状态
|
||||
## 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](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/pages/layout.rs:7460) 增加防回归测试,断言当前 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
|
||||
+14
-4
@@ -1,8 +1,8 @@
|
||||
# 5-18 [process][bug] AI 写正文后本地 Page Aggregate content 可能不刷新 v1
|
||||
# 5-18 [done][bug] AI 写正文后本地 Page Aggregate content 可能不刷新 v1
|
||||
|
||||
> 发现时间:2026-05-17
|
||||
>
|
||||
> 状态:`[process]`
|
||||
> 状态:`[done]`
|
||||
>
|
||||
> 关联主线:`05-editor-mainline`
|
||||
|
||||
@@ -28,6 +28,16 @@
|
||||
- AI context 应从最新 Rust Page Aggregate snapshot 读取,而不是依赖可能过期的本地 reducer。
|
||||
- 增加 smoke:AI 修改正文后不刷新页面连续再问一次 AI,断言第二次 context 包含新内容。
|
||||
|
||||
## 5. 状态
|
||||
## 5. 修复
|
||||
|
||||
已确认 AI 写入后本地 Page Aggregate content 可能滞后,尚未修复。
|
||||
- [web_shell.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/web_shell.rs:1208) 文档 session 记录 `pageAggregateScriptId`,明确当前 pane 对应的 Page Aggregate JSON script。
|
||||
- [web_shell.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/web_shell.rs:1213) 新增 `syncPageAggregateScript`,在外部写入刷新得到新 aggregate 后同步 `__MNOTE_PAGE_AGGREGATE__`。
|
||||
- [web_shell.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/web_shell.rs:1624) `refreshSessionFromExternalChange` 更新 session `latestAggregate` 后立即同步 JSON script,使下一次页面 AI context 从最新 Rust Page Aggregate 快照读取。
|
||||
- [web_shell.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/routes/web_shell.rs:3085) 增加 shell 合同测试,防止 AI 写入刷新只更新 editor session 而不更新 Page Aggregate script 缓存。
|
||||
|
||||
## 6. 验证
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web document_shell_returns_page_aggregate_snapshot -- --nocapture`
|
||||
- 结果:1 passed
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web routes::web_shell::tests -- --nocapture`
|
||||
- 结果:10 passed
|
||||
+22
-4
@@ -1,9 +1,9 @@
|
||||
# 5-9-C12 [process][bug] 文档页顶栏左上角切换侧栏按钮无效 v1
|
||||
# 5-9-C12 [done][bug] 文档页顶栏左上角切换侧栏按钮无效 v1
|
||||
|
||||
> 更新时间:2026-05-12
|
||||
> 更新时间:2026-05-18(代码修复)
|
||||
>
|
||||
> 分类归属:
|
||||
> - `05-editor-mainline/process`
|
||||
> - `05-editor-mainline/done`
|
||||
> - 对应体验主线:`5-9 Wolai-aline continuous checklist`
|
||||
>
|
||||
> 关联文档:
|
||||
@@ -104,7 +104,7 @@ Hermes tester 首轮取证:
|
||||
|
||||
## 7. 流转条件
|
||||
|
||||
当前状态:`process`
|
||||
当前状态:`done`
|
||||
|
||||
只有在以下条件都满足后,本文才能移动到 `bugs/05-editor-mainline/done/`:
|
||||
|
||||
@@ -112,3 +112,21 @@ Hermes tester 首轮取证:
|
||||
2. smoke 已覆盖且通过
|
||||
3. 浏览器复测确认收起/展开都生效
|
||||
4. 证据路径已补齐到修复后的截图或日志
|
||||
|
||||
## 8. 修复记录
|
||||
|
||||
- [layout.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/pages/layout.rs:67) 新增 `toggleWorkspaceSidebar`,点击后切换 shell 的 `data-mnote-sidebar-collapsed` 状态,并同步 `documentElement` 观测属性。
|
||||
- [layout.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/pages/layout.rs:6167) 全局 click handler 接入 `data-mnote-action="toggle-sidebar"`。
|
||||
- [layout.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/pages/layout.rs:7336) 顶栏菜单按钮补齐 `data-mnote-action="toggle-sidebar"`、`data-testid="wolai-sidebar-toggle"` 与 `aria-pressed`。
|
||||
- [styles.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/ssr/styles.rs:224) `data-mnote-sidebar-collapsed="true"` 时隐藏 sidebar,让主编辑区占满空间。
|
||||
|
||||
## 9. 验证
|
||||
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web page_layout_sidebar_toggle_is_wired_to_shell_state -- --nocapture`
|
||||
- 结果:1 passed
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web ssr::pages::layout::tests -- --nocapture`
|
||||
- 结果:14 passed
|
||||
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web ssr::styles::tests -- --nocapture`
|
||||
- 结果:7 passed
|
||||
|
||||
说明:本轮完成了代码接线与 SSR/CSS 合同验证;浏览器截图复核可在后续统一 smoke 中补充。
|
||||
Reference in New Issue
Block a user