fix(web): preserve tail segments#72
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f39507452d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| {workGroupSplit.finalText != null && renderFinalText()} | ||
| {workGroupSplit.tailSegments.map((seg, offset) => { | ||
| const originalIndex = tailStartIndex + offset | ||
| return renderSegment(seg, originalIndex, historicalSegments, false, originalIndex) |
There was a problem hiding this comment.
Preserve live state when rendering post-final tail segments
When a turn has tailSegments but no collapsed work group, this branch renders every segment with isLive=false, so the trailing cop segment is treated as complete even if it is the currently streaming segment. In the current-run streaming path (currentRunMessageLive), that regresses behavior from the previous fallback render (historicalSegments.map(...)) where the last segment could remain live; users will see running tool/timeline entries incorrectly marked completed until another update arrives.
Useful? React with 👍 / 👎.
qqqqqf-q
left a comment
There was a problem hiding this comment.
splitWorkGroup / MessageList 是核心渲染路径,复杂度高。tail segments 丢失的问题确实存在,但这块代码不适合补丁式修复——前端渲染逻辑补丁叠补丁容易引入更多边界问题。这部分我自己来处理。
|
好的 |
Split from #63.
内容:
验证: