fix(chat): keep the latest reply mounted through settlement and animate the timeline collapse
The streaming and settled versions of the trailing assistant reply were two components, so settling unmounted one and mounted the other and the entrance tween replayed over text the reader was already on. One LatestAssistantEntry now owns that row under a single key, and the history list excludes it. The CSS entrance keyframe that doubled the GSAP tween is gone and the tween matches the documented 160ms. The step timeline no longer remounts on settle: it is a button-controlled disclosure with a 180ms grid-rows transition, the reader's own toggle wins over the live default, and an in-flight request with no events yet shows a queued row instead of an empty shell. BUG-474 BUG-475 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
This commit is contained in:
@@ -7282,3 +7282,35 @@
|
||||
- 相关记录:BUG-474
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-474 | 回答结算瞬间整条消息闪一下,步骤时间线从展开直接跳成折叠
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-01
|
||||
- 最近更新:2026-09-01
|
||||
- 影响面:`chat-transcript.tsx`、`chat-message-row.tsx`、`consultation-run-timeline.tsx`、`globals.css` `.message`
|
||||
- 用户现象:流式回答写完的那一刻,正在读的整条回答淡出再淡入一次;上方「正在分析」步骤块瞬间收成「已完成 N 步」,下方正文向上跳一段。
|
||||
- 触发条件:任何一次咨询流式结束。
|
||||
- 根因:流式中的最后一条由 `StreamingMessageEntry` 渲染,结算后由 `SettledMessageEntry` 渲染,两者是不同组件,`renderKey` 相同也会卸载重挂,`ChatMessageRow` 的 GSAP 入场在新挂载的 `<article>` 上重放;`ConsultationRunTimeline` 用 `key={live ? "live" : "settled"}` 强制重挂,原生 `<details>` 的 `open` 没有过渡;`.message` 上另有一份 160ms CSS 入场关键帧与 GSAP 的 180ms 叠加。
|
||||
- 修复:`latestAssistantView` 派生最后一条 assistant 视图(流式或刚结算),`LatestAssistantEntry` 一个组件、一个 key 负责两个状态;历史列表按 `excludeLatestAssistant` 排除尾条。删除 `.message` 的 CSS 入场与 `message-enter` 关键帧,GSAP 时长改为 0.16s 与 DESIGN.md §6 一致。时间线去掉 `key`,改成 `button[aria-expanded]` + `grid-template-rows 0fr→1fr` 180ms 过渡,折叠后内容 `inert`;summary 文案换行时 120ms 淡入。
|
||||
- 验证:`tests/chat-stream-settle-contract.test.ts`(视图 key 跨结算一致、只有一处渲染尾条、`.message` 无 animation、时间线过渡与 reduced-motion、live 空行「正在处理…」);`session-conversation-layout` 与 `chat-bundle-splitting-contract` 的 0.18 锁改为 0.16 并注释原值。
|
||||
- 防复发:尾条 assistant 必须由 `LatestAssistantEntry` 单点渲染;不得给时间线加随状态变化的 `key`;入场动画只允许 GSAP 一份。
|
||||
- 相关记录:BUG-473、BUG-475
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-475 | 流式期间步骤时间线无法折叠,请求已发出但第一个事件到达前没有任何进行中反馈
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-01
|
||||
- 最近更新:2026-09-01
|
||||
- 影响面:`consultation-run-timeline.tsx`
|
||||
- 用户现象:回答生成中点「正在分析」想收起步骤,下一个 token 又把它撑开;发送后到服务端第一条事件之间只有头像和空白。
|
||||
- 触发条件:流式期间点击时间线 summary;服务端首事件延迟超过一两秒时。
|
||||
- 根因:`<details open={live ? true : undefined}>` 由 `live` 受控,用户的开合没有进入状态;`rows` 为空时组件直接返回 `null`。
|
||||
- 修复:`open = userOpen ?? live`,用户切换后记入 state,结算时若用户未动才程序折叠;`rows` 为空且 live 时渲染一条 `QUEUED_TIMELINE_ROW`(「正在处理…」+ 行内 spinner + shimmer 文案)。
|
||||
- 验证:`tests/chat-stream-settle-contract.test.ts`。
|
||||
- 防复发:时间线开合必须以用户选择优先;live 状态下不得渲染空壳。
|
||||
- 相关记录:BUG-474
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
Reference in New Issue
Block a user