fix(task): reset isStreaming in abortTask to prevent UI lock after task switch (fixes #257)#388
Conversation
…provider Merging 12 new test cases covering completePrompt, streaming resilience, and edge cases.
Dependabot bump. Compatible: project requires node>=20.20.2, uuid v14 requires node>=20.
# Conflicts: # pnpm-lock.yaml
…ter task switch When a task switch occurs via abortTask() (e.g., removeClineFromStack, clearTask), the isStreaming flag was not being reset. This left the chat input locked in 'API Request...' state because ClineProvider checks getCurrentTask()!.isStreaming to determine if the UI should be enabled. Added isStreaming=false and isWaitingForFirstChunk=false reset in abortTask() alongside the existing abort=true flag, ensuring the UI unlocks immediately when a task is aborted or abandoned. Fixes Zoo-Code-Org#257
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR fixes a UI lockup issue where chat remains stuck in "API Request..." state after switching tasks or contexts. The ChangesTask Abort Streaming State Reset
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
An accidental uuid 11.1.0→14.0.0 bump leaked into this branch and broke the Windows unit tests: uuid@14 drops the Math.random fallback and now requires globalThis.crypto.getRandomValues, which the Vitest forks pool on Windows (Node 20) does not provide. Reverting to ^11.1.0 matches upstream/main and restores green CI. Also removes tmp/README.md, an editor scratch file that was committed by mistake.
|
Good catch — that I also reverted an unintended uuid 11→14 bump that was causing the Windows unit-test failures on this branch, so CI should be back to normal. Thanks for flagging it. |

Fixes #257. Resets isStreaming and isWaitingForFirstChunk in abortTask() so the UI unlocks immediately when a task is aborted or abandoned during task switch. All delegation tests pass (14/14).
Summary by CodeRabbit