Skip to content

fix(wework): pause and recover queued messages safely - #2266

Merged
qdaxb merged 7 commits into
mainfrom
fix/wework-queue-management-latest
Jul 28, 2026
Merged

qdaxb merged 7 commits into
mainfrom
fix/wework-queue-management-latest

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • pause queued messages before cancelling the active runtime turn so an idle transition cannot drain the queue unexpectedly
  • make desktop drag automation follow real pointer-event timing and cover live queue reordering
  • add CI-invoked desktop E2E coverage for stop/pause, direct resume, preserve-and-continue, clear-queue, composer clearing, and guidance recovery
  • document paused queue ordering and recovery behavior in Chinese and English

Root cause

Stopping the active response awaited runtime cancellation before marking the message queue as paused. The cancellation could transition the task to idle first, allowing the automatic queue dispatcher to send the next item. The queue is now paused before cancellation and rolled back only when cancellation fails.

The previous desktop drag helper emitted every pointer event in one render frame, so the sortable interaction could not activate consistently. It now advances across render ticks and emits movement on the target before release.

Validation

  • pnpm --filter wework typecheck
  • pnpm --filter wework test — 226 files, 2261 tests passed
  • pnpm --dir wework exec vitest run src/components/chat/ChatInput.test.tsx — 98 tests passed
  • pnpm --dir wework exec node e2e/desktop/task-flow.e2e.mjs --queue-management-only
  • isolated real Tauri verification through the desktop E2E runner
  • pre-push ESLint, TypeScript, and Wework unit checks

Summary by CodeRabbit

  • New Features

    • Added queue management for follow-up messages, including pausing, resuming, reordering, and clearing queued messages.
    • Added options for handling new messages while a queue is paused: continue with the queue, clear it, or cancel.
  • Bug Fixes

    • Improved queue behavior when stopping an active response.
    • Enhanced drag interactions for more reliable queue reordering.
  • Documentation

    • Updated English and Chinese guides with queue ordering, pause, resume, and message-handling details.

@coderabbitai

coderabbitai Bot commented Jul 28, 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 Plus

Run ID: 6801e1d9-20f8-4faf-95b4-40b45f3d1e04

📥 Commits

Reviewing files that changed from the base of the PR and between 2e1d1d3 and 9937298.

📒 Files selected for processing (5)
  • docs/en/wegent/user-guide/coding/managing-code-tasks.md
  • docs/zh/wegent/user-guide/coding/managing-code-tasks.md
  • wework/e2e/desktop/task-flow.e2e.mjs
  • wework/src/components/layout/useWorkbenchPaneSession.ts
  • wework/src/e2e/automation.ts

📝 Walkthrough

Walkthrough

This PR documents queued follow-up behavior, adjusts queue pausing around runtime cancellation, and adds desktop E2E coverage for reordering, pausing, resuming, preserving, and clearing queued messages.

Changes

Queued follow-up management

Layer / File(s) Summary
Queue pause behavior and documentation
wework/src/components/layout/useWorkbenchPaneSession.ts, docs/en/.../managing-code-tasks.md, docs/zh/.../managing-code-tasks.md
The queue pauses before runtime cancellation and resumes only when cancellation fails. English and Chinese documentation describe ordering, reordering, pause/resume, preserve, clear, and cancel behavior.
Queue lifecycle E2E validation
wework/e2e/desktop/task-flow.e2e.mjs, wework/src/e2e/automation.ts
Adds queue-management scenarios, deterministic mock responses, queue lifecycle assertions, standalone execution, full-flow integration, and delayed drag pointer events.

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

Possibly related PRs

Suggested reviewers: icycrystal4, ficohu

✨ 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-queue-management-latest

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 28, 2026 05:11
@qdaxb
qdaxb merged commit 3501493 into main Jul 28, 2026
12 of 18 checks passed
@qdaxb
qdaxb deleted the fix/wework-queue-management-latest branch July 28, 2026 05:11
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