Skip to content

fix(web): preserve tail segments#72

Open
kilockok wants to merge 2 commits into
mainfrom
split/pr63-assistant-turn-tail
Open

fix(web): preserve tail segments#72
kilockok wants to merge 2 commits into
mainfrom
split/pr63-assistant-turn-tail

Conversation

@kilockok

Copy link
Copy Markdown
Collaborator

Split from #63.

内容:

  • splitWorkGroup 返回 finalTextIndex 与 tailSegments
  • MessageList 在最终文本后继续按原顺序渲染 tail segments
  • 补充 assistant turn tail segment 单测

验证:

  • pnpm test -- src/tests/assistantTurnSegments.test.ts
  • pnpm type-check 受 main 既有 modelPicker.test.tsx is_default 类型错误阻塞

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 qqqqqf-q left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

splitWorkGroup / MessageList 是核心渲染路径,复杂度高。tail segments 丢失的问题确实存在,但这块代码不适合补丁式修复——前端渲染逻辑补丁叠补丁容易引入更多边界问题。这部分我自己来处理。

@kilockok

Copy link
Copy Markdown
Collaborator Author

好的

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