Skip to content

fix(wework): show reconnecting stream status - #2061

Merged
qdaxb merged 2 commits into
mainfrom
fix/wework-reconnect-status
Jul 20, 2026
Merged

qdaxb merged 2 commits into
mainfrom
fix/wework-reconnect-status

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

What\n\n- surface Codex retryable stream errors as a transient Wework processing block\n- render a subtle one-line localized reconnecting status with the existing shimmer treatment\n- clear the status as soon as model events resume\n- add unit coverage and a real Tauri disconnect/reconnect recovery flow with screenshot evidence\n\n## Why\n\nRelease logs around 06:54 showed repeated upstream SSE timeout/reconnect attempts while local IPC and transcript polling remained responsive. The desktop UI had no feedback during that gap, so output appeared frozen even though Codex was retrying.\n\n## Impact\n\nUsers now see a lightweight “连接中断,正在重连…” status only while automatic reconnection is active. Normal output resumes without leaving a stale status.\n\n## Checks\n\n- real Tauri reconnect E2E: streaming → reconnecting → recovered\n- Wework ESLint\n- Wework TypeScript\n- Wework unit tests (1821 passed)\n- Executor cargo fmt\n- Executor cargo test --all-features --lib\n- Executor cargo clippy\n

Summary by CodeRabbit

  • New Features

    • Added a visible reconnecting status when a connection is interrupted.
    • Automatically retries interrupted responses and hides the reconnecting status after recovery.
    • Added reconnecting messages in English and Simplified Chinese.
  • Bug Fixes

    • Prevented duplicate optimistic messages while preserving updated metadata.
    • Ensured completed reconnecting activity does not remain visible.
  • Tests

    • Added coverage for reconnect recovery and duplicate-message handling.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d30753b2-1b03-4208-9f83-452cd92e9ecc

📥 Commits

Reviewing files that changed from the base of the PR and between 4a755f5 and 928175f.

📒 Files selected for processing (10)
  • executor/src/runtime_work/events.rs
  • packages/chat-core/src/workbench-message-reducer.test.ts
  • packages/chat-core/src/workbench-message-reducer.ts
  • wework/e2e/desktop/task-flow.e2e.mjs
  • wework/package.json
  • wework/src/components/chat/blocks/ToolBlockItem.tsx
  • wework/src/components/chat/blocks/ToolBlocksDisplay.test.tsx
  • wework/src/components/chat/blocks/toolBlockActivity.ts
  • wework/src/i18n/locales/en/chat.json
  • wework/src/i18n/locales/zh-CN/chat.json

📝 Walkthrough

Walkthrough

Adds end-to-end reconnect handling: retryable runtime errors create one transient reconnecting block, the UI displays and clears it, repeated user messages reconcile idempotently, and desktop E2E tests simulate interrupted and resumed responses.

Changes

Reconnect recovery

Layer / File(s) Summary
Runtime reconnect state
executor/src/runtime_work/events.rs
Retryable Codex errors create one reconnecting block, which is marked done after a non-error notification.
Workbench message reconciliation
packages/chat-core/src/workbench-message-reducer.ts, packages/chat-core/src/workbench-message-reducer.test.ts
Repeated user_added messages are merged by id, limited, and validated for subtaskId reconciliation.
Reconnecting activity presentation
wework/src/components/chat/blocks/*, wework/src/i18n/locales/*/chat.json
The UI displays localized reconnecting status only while the block is streaming and hides completed blocks.
Desktop reconnect scenario
wework/e2e/desktop/task-flow.e2e.mjs, wework/package.json
Desktop E2E coverage simulates response interruption, retry, completion, and isolated reconnect execution.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DesktopE2E
  participant DesktopE2EServer
  participant CodexNotificationEventMapper
  participant ToolBlocksDisplay

  DesktopE2E->>DesktopE2EServer: start reconnect scenario
  DesktopE2EServer-->>DesktopE2E: interrupt first SSE response
  DesktopE2EServer->>CodexNotificationEventMapper: retryable error notification
  CodexNotificationEventMapper->>ToolBlocksDisplay: create runtime_reconnecting block
  DesktopE2E->>DesktopE2EServer: release reconnect completion
  DesktopE2EServer-->>CodexNotificationEventMapper: resumed completion response
  CodexNotificationEventMapper->>ToolBlocksDisplay: mark reconnecting block done
Loading

Possibly related PRs

  • wecode-ai/Wegent#1884: Adds the desktop task-flow E2E infrastructure extended here with reconnect controls.
  • wecode-ai/Wegent#1888: Modifies the same scenario-aware desktop server flow used for reconnect handling.

Suggested reviewers: icycrystal4

✨ 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-reconnect-status

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 marked this pull request as ready for review July 20, 2026 03:09
@qdaxb
qdaxb merged commit f9bbe4a into main Jul 20, 2026
28 of 30 checks passed
@qdaxb
qdaxb deleted the fix/wework-reconnect-status branch July 20, 2026 03: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