Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 17, 2025

This PR attempts to address Issue #9303. Feedback and guidance are welcome.

Problem

The cancel button in the chat UI was remaining inactive/disabled after clicking it during streaming operations, requiring users to restart VSCode to regain functionality.

Solution

The issue occurred because the didClickCancel flag was set to true when clicking the cancel button but was only reset in very specific scenarios (resume_task and resume_completed_task asks). This fix ensures the flag is properly reset in all necessary scenarios:

  1. When streaming ends: Added a check in the streaming effect to reset didClickCancel when transitioning from streaming to non-streaming state
  2. When switching tasks: Added reset to the task change effect to ensure clean state between tasks
  3. During chat reset: Added reset to the handleChatReset function for consistent state management

Testing

  • All existing ChatView tests pass successfully
  • Manually verified that the cancel button becomes active again after:
    • Streaming operations complete
    • Switching between tasks
    • Chat reset operations

Related Issue

Fixes #9303


Important

Fixes cancel button inactivity in ChatView.tsx by resetting didClickCancel flag in various scenarios.

  • Behavior:
    • Fixes issue where the cancel button remained inactive after being clicked during streaming operations.
    • Resets didClickCancel flag in ChatView.tsx when:
      • Streaming ends (line 967)
      • Switching tasks (line 417)
      • Chat resets (line 528)
  • Testing:
    • All existing ChatView tests pass.
    • Manually verified cancel button reactivates after streaming, task switch, and chat reset.
  • Related Issue:

This description was created by Ellipsis for 87044dd. You can customize this summary. It will automatically update as commits are pushed.

- Reset didClickCancel flag when streaming transitions from active to inactive
- Reset didClickCancel flag when switching between tasks
- Reset didClickCancel flag during chat reset operations
- Fixes issue where cancel button remained inactive after clicking cancel

Fixes #9303
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 17, 2025 14:45
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Nov 17, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 17, 2025

Rooviewer Clock   See task on Roo Cloud

✅ Review completed. The implementation correctly addresses the cancel button state issue with three well-placed reset points:

  1. When streaming ends (lines 966-968) - ensures the button is ready for the next operation
  2. When switching tasks (line 417) - appropriate state cleanup
  3. During chat reset (line 528) - safe reset after message send

The changes follow existing patterns in the codebase and all tests pass. No issues found.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@roomote roomote bot mentioned this pull request Nov 17, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] inactive button

3 participants