Skip to content

fix(wework): show thinking between streamed items - #2690

Merged
qdaxb merged 2 commits into
mainfrom
fix/wework-thinking-after-process-text
Aug 14, 2026
Merged

qdaxb merged 2 commits into
mainfrom
fix/wework-thinking-after-process-text

Conversation

@qdaxb

@qdaxb qdaxb commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • show the existing “正在思考” indicator after completed process text while the assistant turn is still running
  • settle streamed process text when a new non-tool Codex item starts, so the UI enters the waiting state immediately
  • keep process text streaming across visible tool starts, preserving interleaved commentary and tool output
  • add frontend and executor regression coverage for the real item ordering

Root cause

The frontend hid the global thinking indicator while the trailing process-text block was still marked as streaming. In the failing Codex event order, a new reasoning or final-message item could start before the previous commentary item completed, so the executor left that process-text block streaming and the UI appeared frozen.

Validation

  • pnpm --filter wework test src/components/chat/MessageList.test.tsx (140 tests passed)
  • cargo test --manifest-path executor/Cargo.toml --all-features --lib runtime_work::events::tests:: (46 tests passed)
  • cargo test --manifest-path executor/Cargo.toml --all-features --lib (794 passed, 1 ignored)
  • pre-push frontend, Wework, backend formatting/syntax, executor fmt/test/clippy, settings, and Alembic checks
  • isolated real-Tauri verification of process text → tool item → final response

Summary by CodeRabbit

  • Bug Fixes

    • Improved the assistant’s thinking indicator during streaming responses.
    • Completed process-text content remains visible while the assistant waits for the next response item.
    • Improved handling of content transitions during streamed responses.
  • Tests

    • Added regression coverage for process-text visibility and thinking-indicator behavior.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b650a5f-e477-4349-babc-4f4882024cdd

📥 Commits

Reviewing files that changed from the base of the PR and between dab3367 and 086873d.

📒 Files selected for processing (1)
  • executor/src/runtime_work/events.rs

📝 Walkthrough

Walkthrough

The runtime now completes active process-text blocks when a different item starts. The chat message list keeps completed process-text blocks visible and shows the 正在思考 indicator during streaming. Regression tests cover both behaviors.

Changes

Streaming process-text handling

Layer / File(s) Summary
Runtime process-text finalization
executor/src/runtime_work/events.rs
The event mapper detects whether a tool block was emitted. For a different item, it completes and clears the active process-text block. Tests cover item transitions and interleaved commentary and tool events.
Thinking indicator visibility
wework/src/components/chat/MessageList.tsx, wework/src/components/chat/MessageList.test.tsx
The indicator logic checks for trailing completed process text during streaming. The test verifies that both the process text and 正在思考 are rendered.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 08687

This change restores the thinking indicator between streamed process text and the next runtime item while preserving suppression during active streaming, with regression coverage added; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: luckjun529-lang

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: showing the thinking indicator between streamed items.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wework-thinking-after-process-text

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qdaxb
qdaxb added this pull request to the merge queue Aug 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 14, 2026
@qdaxb
qdaxb added this pull request to the merge queue Aug 14, 2026
@qdaxb
qdaxb removed this pull request from the merge queue due to a manual request Aug 14, 2026
@qdaxb
qdaxb added this pull request to the merge queue Aug 14, 2026
@qdaxb
qdaxb removed this pull request from the merge queue due to a manual request Aug 14, 2026
@qdaxb
qdaxb added this pull request to the merge queue Aug 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 14, 2026
@qdaxb
qdaxb force-pushed the fix/wework-thinking-after-process-text branch from dab3367 to 086873d Compare August 14, 2026 11:32
@qdaxb
qdaxb added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit e075f28 Aug 14, 2026
60 checks passed
@qdaxb
qdaxb deleted the fix/wework-thinking-after-process-text branch August 14, 2026 12:09
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.

1 participant