Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 16, 2025

Related GitHub Issue

Closes: #10086

Description

This PR attempts to address Issue #10086 by moving the cancel button from the large bar below the input area into the input text area itself for a cleaner, more compact UI during task execution.

Key implementation details:

  1. ChatTextArea.tsx changes:

    • Added isStreaming and onCancelTask props to the component interface
    • Added a cancel button (X icon from lucide-react) inside the input area button group that appears when isStreaming is true
    • The cancel button uses error foreground color for visibility
    • When streaming, the cancel button replaces the send button; when not streaming, the send button is shown
  2. ChatView.tsx changes:

    • Pass isStreaming and cancel handler (handleSecondaryButtonClick) to ChatTextArea
    • Hide the large cancel button bar when streaming (only show scroll-to-bottom and non-streaming action buttons)
    • Updated areButtonsVisible logic to exclude streaming-only case

Test Procedure

  1. Start a task that streams output
  2. Verify the cancel button appears inside the input text area (not as a large bar below)
  3. Click the cancel button and verify it cancels the task
  4. Verify that when not streaming, the send button appears instead
  5. Verify that primary/secondary buttons (approve, reject, etc.) still appear in the bar for non-streaming actions

Automated tests: All 70 tests in ChatTextArea.spec.tsx and ChatView.spec.tsx pass.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue
  • Scope: Changes are focused on the linked issue
  • Self-Review: Code has been self-reviewed
  • Testing: Existing tests pass, no new tests needed for this UI change
  • Documentation Impact: No documentation updates required
  • Contribution Guidelines: Reviewed

Screenshots / Videos

This PR moves the cancel button from a large bar style to a compact icon inside the input area, matching the design shown in the issue.

Documentation Updates

  • No documentation updates are required.

Additional Notes

Feedback and guidance are welcome!

- Add isStreaming and onCancelTask props to ChatTextArea component
- Add cancel button (X icon) inside input area when streaming
- Remove large cancel button bar from ChatView when streaming
- Keep other buttons (primary/secondary) in the bar for non-streaming actions
- Cleaner, more compact UI during task execution

Closes #10086
@roomote
Copy link
Contributor Author

roomote bot commented Dec 16, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The implementation correctly moves the cancel button from the large bar below the input area into the input text area itself. All 70 tests pass and the code follows existing patterns.

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

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

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

UI优化

3 participants