Persist PageTree expand state via control-plane view-state and align chevron/DOM with restored expansion; keep Sidex-style shallow page-tree scan and drop the unused recursive scanner that only added cargo noise. Add password vault workbench routes/runtime/skill/CLI, split page_ai_pi into a module package, and retire Hermes/ACP/OpenHub recycle + root harness evidence from the index while gitignoring recycle and local diag dumps. Archive superseded design/bugs docs under old/, point architecture at ARCHITECTURE.md, and refresh smokes for Pi S1–S7, vault, and editor regressions so the working tree can stay clean.
2.8 KiB
2.8 KiB
[recycle] 7-33 ACP session info / plan UI checklist v1
状态:done
归档说明(2026-05-21):ACP session info / plan SSE 与 Page AI 轻量 UI 已完成;todo JSON 细化显示作为后续格式约定项。
Owner:ACP metadata SSE + Page AI lightweight UI
参考:
reference-code/hermes-vscode-main/src/sessionManager.ts、src/webview/renderers.ts
目标
把已解析但被丢弃的 session_info_update 和 plan 事件送到 Page AI UI:自动标题更新当前会话;plan/todo 以轻量状态面板或系统消息展示,不混入正文真相。
允许修改范围
rust/crates/mnote-web/src/acp_bridge.rsrust/crates/mnote-web/src/routes/hermes_client.rsrust/crates/mnote-web/src/ssr/pages/layout.rs- 相关 Rust 测试
禁止事项
- 不改 ACP parser 类型,除非发现现有 PlanEntry 无法表达必要字段。
- 不实现完整 Phase C review session。
- 不把 plan/todo 写入页面正文。
Checklist
AcpSessionEvent::SessionInfoUpdate转成session.info.updatedSSE。AcpSessionEvent::PlanUpdate转成plan.updatedSSE,data 包含 entries。- Page AI 收到 session info 后更新当前 session title,并持久化 localStorage/local session view。
- Page AI 收到 plan 后渲染轻量 plan 状态(collapsible details/summary + 编号列表),不当作普通 assistant 正文。
- tool raw output 中包含 todo JSON 时,可以复用 plan 区域或 tool card 状态显示。(风险可控,todo JSON 解析需额外确认格式约定;建议后续补)
- 补 bridge 单测和
SIDEBAR_TREE_JS字符串断言。 - 更新本文件“执行记录”。
验收命令
cd /mnt/Data1T/mnote/rust && cargo test -p mnote-web acp_bridge -- --test-threads=1
cd /mnt/Data1T/mnote/rust && cargo test -p mnote-web page_ai_uses_backend_acp_session_runtime_store -- --test-threads=1
执行记录
- 2026-05-20 Reasonix:桥接 SessionInfoUpdate →
session.info.updatedSSE、PlanUpdate →plan.updatedSSE。 - 2026-05-20 Reasonix:前端 SSE handler 解析 session.info.updated 更新当前 session title 并持久化;plan.updated 在 pageAiMessages 末尾创建/更新 kind=plan 消息。
- 2026-05-20 Reasonix:renderPageAiConversation 添加 kind===plan 渲染分支:collapsible details/summary 面板显示编号步骤列表。
- 2026-05-20 Reasonix:acp_bridge 添加两个单测(session_info_update / plan_update);SIDEBAR_TREE_JS 添加 4 个断言。
- 2026-05-20 Codex 复核:todo JSON 格式尚未确认,保留为未完成项;其余已通过
cargo test -p mnote-web acp_bridge -- --test-threads=1、cargo test -p mnote-web page_ai_uses_backend_acp_session_runtime_store -- --test-threads=1、cargo test -p mnote-web acp -- --test-threads=1。