GCWing / GCWing/OpenBitFun

[Bug]: queued chat messages fail visibly when the session turns busy during queue drain

クローズ
#2,660 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
2.3k
フォーク
231
平均マージ
2時間 49分
マージ済み PR(30日)
589

説明

## Summary

When startTurn finds the state machine non-IDLE it throws "Session is still busy finishing the previous turn..."; sendMessage surfaces this as a "Thinking process error" toast and drainPendingQueue marks the queued item failed, even though the situation is transient (the session was revived busy after the drain gate confirmed IDLE). The thrown error is now tagged isSessionBusy; sendMessage drops the optimistic turn and re-throws without toasting, and drainPendingQueue silently re-queues the item so auto-drain reapplies once the session returns to IDLE. Includes a regression test for the silent re-queue path.

## Area

src/web-ui/src/flow_chat/session-drivers/local/LocalSessionDriver.ts + src/web-ui/src/flow_chat/services/flow-chat-manager/MessageModule.ts (+ MessageModule.test.ts).

## Reproduction or evidence

At 32f2427697, LocalSessionDriver.ts :372 throws the still-busy error without any marker, MessageModule.ts :613 marks drained items failed, and :484 shows the error toast; there is no isSessionBusy symbol anywhere in the flow_chat tree (Grep zero hits). Regression test asserts the queued item is re-queued (not failed), no toast is shown, and the item is not removed.

## Environment

All platforms (frontend queue/driver); baseline 32f2427697.

---
AI-assisted change. Testing: verified locally (`pnpm vitest run MessageModule.test.ts` 27 passed, 0 failed, including the new regression case; `pnpm run type-check` (tsc --noEmit) exit 0 with no errors).

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

src/web-ui/src/flow_chat/session-drivers/local/LocalSessionDriver.ts と src/web-ui/src/flow_chat/services/flow-chat-manager/MessageModule.ts から始め、startTurn、sendMessage、drainPendingQueue を追ってください。pnpm vitest run MessageModule.test.ts を実行し、一時的な busy 状態によって項目が toast や削除なしでキューに戻されることを確認するとともに、pnpm run type-check が成功することを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
frontend, testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
82/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。