Repository navigation
[skip eval] fix: 回答完成后推荐问题不再闪一下 - #388
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
#387 上线后在 dev 实测:推荐问题在回答完成后约 30ms 就出现,但约 1.1 秒后会消失两帧(约 37ms)再出现,淡入动画也重播一次。
原因
onSelectQuestion清空了,导致推荐区卸载。这段清空逻辑原本是为切换会话写的,而保留上一屏只会发生在同一会话(lastReadyConversation.chatId === chatId),这里清空推荐问题是多余的。SuggestedQuestions会重新挂载,淡入动画重播。改动
chat/[chatId]/page.tsx:只在没有任何内容可显示的加载态(isHydratingWithoutContent)清空推荐问题;同一会话刷新期间照常传递推荐问题。重试、轨迹入口等其他屏蔽项不变。SuggestedQuestions:只有挂载时还没有问题、之后才到达的问题会淡入;挂载时已有问题(切换渲染分支、刷新页面)就直接显示。验证
🤖 Generated with Claude Code