Skip to content

fix: show stop button in chat input during follow-up questions#12272

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
fix/stop-button-during-followup-questions
Draft

fix: show stop button in chat input during follow-up questions#12272
roomote-v0[bot] wants to merge 1 commit intomainfrom
fix/stop-button-during-followup-questions

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented May 4, 2026

Related GitHub Issue

Closes: #12268

Description

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

Problem: When the agent asks a follow-up question, the normal stop button in the chat input area disappears because isStreaming is false during asks. The send/stop button morphs to a send button, and since primaryButtonText is undefined for followup asks, the action button bar is also hidden. This leaves users with no way to abort the task during follow-up questions.

Solution: Added a dedicated stop button in ChatTextArea that appears when there is an active follow-up question. This is controlled by a new canStopTask prop passed from ChatView. The button:

  • Appears to the left of the send button, styled identically to the streaming stop button
  • Only shows when canStopTask=true AND isStreaming=false (to avoid duplicate stop buttons)
  • Calls the same onStop handler (which sends cancelTask to the extension)
  • Is hidden during edit mode

Key changes:

  • ChatTextArea.tsx: Added canStopTask prop and a separate stop button that renders when the task can be stopped but is not streaming
  • ChatView.tsx: Passes canStopTask={!!task && !isStreaming && clineAsk === "followup"} to ChatTextArea
  • ChatTextArea.spec.tsx: Added 4 new tests covering stop button visibility and click behavior

Test Procedure

  1. All existing tests pass (51 ChatTextArea tests, 24 ChatView tests)
  2. 4 new tests added covering:
    • Stop button appears when canStopTask=true and not streaming
    • Stop button hidden when canStopTask=false
    • Only one stop button shown when streaming (morphed button, not the separate one)
    • Clicking the stop button calls onStop
  3. Manual testing: Start a task, trigger a follow-up question, verify the stop button appears next to the send button

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue
  • Scope: Changes focused on the linked issue
  • Self-Review: Performed a self-review of the code
  • Testing: New tests added to cover the changes
  • Documentation Impact: No documentation updates required
  • Contribution Guidelines: Read and agree to the Contributor Guidelines

Documentation Updates

  • No documentation updates are required.

Additional Notes

The fix is scoped specifically to followup asks. Other ask types (tool, command, etc.) already have primary/secondary action buttons in the button bar that include reject/cancel options.

Interactively review PR in Roo Code Cloud

When the agent asks a follow-up question, the normal stop button in the
chat input area was not visible because isStreaming is false during asks.
This left users with no way to abort the task during follow-up questions.

Added a dedicated stop button that appears in the chat text area when
there is an active follow-up question (canStopTask prop). This button
is separate from the morphing send/stop button, so users can both send
a response AND stop the task.

Fixes #12268
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.

[BUG] Auto-approve can't be stopped

1 participant