Skip to content

refactor(frontend): 流式展示与契约锚点 SSOT / stream display and contract anchors#511

Merged
noisystreet merged 1 commit into
mainfrom
cursor/ssot-frontend-refactor-144c
May 26, 2026
Merged

refactor(frontend): 流式展示与契约锚点 SSOT / stream display and contract anchors#511
noisystreet merged 1 commit into
mainfrom
cursor/ssot-frontend-refactor-144c

Conversation

@noisystreet
Copy link
Copy Markdown
Owner

摘要

落实先前「前端单一真源」讨论中的可执行项:流式助手展示契约文档锚点对齐,避免侧栏全局搜索与气泡所见分裂;并修正已不存在的 frontend/src/api.rs 指称。

变更说明

  1. collect_message_search_hits 增加 stream_overlay 参数,对每条消息用 message_text_for_display_including_stream_overlayparent_session_id 使用承载该消息的 ChatSession::id。侧栏 session_rail 在生成命中列表时订阅 stream_text_overlay,流式过程中也能搜到尾段正文。
  2. stream_text_overlay:模块级文档明确只读真源;message_text_for_display_including_stream_overlay / stream_overlay_merged_text_reasoning_owned 的会话 id 形参改名为 parent_session_id 并补充文档(调用仍为位置参数,行为不变)。
  3. message_text_for_display_exChatSessionSignals 文档与 docs/frontend/ARCHITECTURE.md 反模式:提示勿对 loading 助手只读 StoredMessage
  4. docs/开发文档.md:前端节补充流式展示说明与「客户端权威」表;api.rs 小节改为 api/ 模块树说明。
  5. 全仓锚点.cursor/rulesSSE 中英文档、调试指南、工具说明、contract_mapcrate_contract_map 工具描述、PR 模板、src/sse/* 注释、tests 中示例路径等,统一指向 frontend/src/api/mod.rsapi/chat_stream/ 等实际路径。

测试

  • cargo test -p crabmate-web session_search
  • pre-commit run --all-files(含 frontend wasm check / clippy)
Open in Web Open in Cursor 

…ontract anchors

- 侧栏全局消息搜索合并 stream_text_overlay;重命名展示 API 的会话 id 形参语义并补单测
- 开发文档与 ARCHITECTURE 补充流式只读路径与客户端权威表;全仓 api.rs 指称改为 api/

Co-authored-by: Yales Peter <noisystreet@users.noreply.github.com>
@noisystreet noisystreet marked this pull request as ready for review May 26, 2026 12:41
@noisystreet noisystreet merged commit b2ed497 into main May 26, 2026
5 checks passed
@noisystreet noisystreet deleted the cursor/ssot-frontend-refactor-144c branch May 26, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants