refactor(chat): render rectification activity through the shared step timeline

The rectification surface had its own activity pipeline: a trace panel
with a 20px canvas orb clipped inside a 14px marker, a list that never
collapsed, a second receipt disclosure under every reply, an inline
failure banner and a staged label while regenerating. Its trace and
receipt are now projected onto ConsultationTimelineRow so both surfaces
render one ConsultationRunTimeline with one live marker and one settled
summary; receipt methods become source chips on the last completed row.
The unreachable sections-report/step-tree path, the trace panel, the
receipt component and the thinking-orbs dependency are removed. The
server-side drop of rectification thinking deltas is untouched.

BUG-476

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
This commit is contained in:
Jesse_Chen
2026-09-01 23:10:28 +00:00
parent be5e810ac9
commit ccdae76dd3
17 changed files with 313 additions and 819 deletions
+16
View File
@@ -7314,3 +7314,19 @@
- 相关记录:BUG-474
- 复发自:无
- 修复版本:待发布
## BUG-476 | 生时校正会话的 Agent 活动 UI 与普通会话是两套,live 标记被 14px 格子裁切
- 状态:resolved
- 首次发现:2026-09-01
- 最近更新:2026-09-01
- 影响面:`rectification-agentic-chat.tsx``agent-activity-status.tsx``chat-message-row.tsx``globals.css``package.json``thinking-orbs`
- 用户现象:校正会话里步骤标记是一个 20px 的 canvas 小球,被压在 14px 的格子里边缘裁切;结算后步骤列表永远全展开,下面还多挂一个「本轮完成 · N 个步骤」折叠块;失败时消息上方多一行红字;重新生成时先出现一个假的「正在组织回答…」;普通会话则是行内 spinner、结算收成「已完成 N 步」一行。两边看起来不像一个产品。
- 触发条件:任何一次校正回合与任何一次咨询回合并排对比。
- 根因:校正走 `activityTrace` + `AgentActivityStatus` 的 trace 分支,普通会话走 `ConsultationRunTimeline``chat-message-row.tsx` 里并存三条思考渲染路径(timeline、`ConsultationThinkingReport`+`ThinkingStepTree`、trace panel),其中 sections report 已无任何调用方可达;`.conversation.is-rectification .agent-thinking-marker { 14px }` 覆写与 `ThinkingOrb size={20}` 冲突。
- 修复:新增 `lib/rectification-timeline-adapter.ts`,把 trace/receipt/activity 映射成 `ConsultationTimelineRow`tool → calculate 行;失败 tool 标签加「未完成」;回执方法作为最后一条完成行的 sources chips,去重 ≤8;无 live 行时把「正在…」类活动文案作为 live 行,answer-composition 归 write)。校正消息由此走同一个 `ConsultationRunTimeline`。删除 `consultation-thinking-report.tsx``thinking-step-tree.tsx``completed-activity-receipt.tsx` 及其 CSS`AgentActivityStatus` 只保留无 timeline 的兜底,live 标记统一 `InlineSpinner` 12px,移除 `thinking-orbs` 依赖;删除 14px 覆写;失败态改走既有 error 通知;重新生成显示 queued 行由真实事件填充。校正 `thinking.delta` 仍在服务端公开边界丢弃,本轮未动。
- 验证:`tests/rectification-timeline-adapter.test.ts``chat-stream-layout``chat-bundle-splitting-contract``rectification-agentic-entry``rectification-activity-receipt` 中锁死路径的断言按「注明原值与错因」改为锁新路径。
- 防复发:任何会话面的 Agent 活动都必须投影成 `ConsultationTimelineRow` 交给 `ConsultationRunTimeline`live 标记只允许 `InlineSpinner`;不得再引入第二种等待词汇。
- 相关记录:BUG-474、BUG-475
- 复发自:无
- 修复版本:待发布