Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 8, 2025

Related GitHub Issue

Closes: #9133

Roo Code Task Context (Optional)

This PR was created with assistance from Roo Code.

Description

This PR fixes an issue where subtasks that were interrupted and then resumed would show "Start New Task" button instead of "Complete Subtask and Return" button. The root cause was that the UI component ChatView.tsx was not checking for the presence of parentTaskId when displaying the completion button text.

The fix adds conditional logic to check for currentTaskItem?.parentTaskId in both the completion_result and resume_completed_task message handlers, ensuring the appropriate button text is displayed based on whether the task has a parent.

Test Procedure

  1. Start an orchestrator task that creates subtasks
  2. Allow a subtask to complete partially and then interrupt it
  3. Resume the interrupted subtask and complete it
  4. Verify that the button shows "Complete Subtask and Return" instead of "Start New Task"
  5. Also verify that regular tasks (without parents) still show "Start New Task" button

The fix has been tested with:

  • TypeScript compilation: successful
  • Webview-ui test suite: all 1139 tests passing
  • Linting checks: all passing

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Fix applied to webview-ui/src/components/chat/ChatView.tsx:

  • Lines 390-391: Added conditional check for parent task in completion_result handler
  • Lines 405-407: Added conditional check for parent task in resume_completed_task handler

The button now correctly displays:

  • "Complete Subtask and Return" when currentTaskItem?.parentTaskId exists
  • "Start New Task" when no parent task exists

Documentation Updates

  • No documentation updates are required.

Additional Notes

The backend handler in webviewMessageHandler.ts already correctly handles the parent task logic by calling finishSubTask when a parent exists, so no backend changes were needed. This was purely a UI display issue.

Get in Touch

Discord: @AI-Assistant


Important

Fixes button text in ChatView.tsx for subtasks after interruption by checking parentTaskId.

  • Behavior:
    • Fixes button text in ChatView.tsx for subtasks after interruption by checking currentTaskItem?.parentTaskId.
    • Displays "Complete Subtask and Return" if parentTaskId exists, otherwise "Start New Task".
  • UI Logic:
    • Updates completion_result and resume_completed_task handlers to conditionally set button text based on parentTaskId.
  • Testing:
    • Verified with TypeScript compilation, webview-ui test suite, and linting checks.

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

Fixes #9133 - When a subtask is interrupted and then resumed, it now correctly
shows "Complete Subtask and Return" button instead of "Start New Task".

The fix adds conditional logic to check for parentTaskId in both the
completion_result and resume_completed_task message handlers in ChatView.tsx.
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 8, 2025 15:23
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. UI/UX UI/UX related or focused labels Nov 8, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 8, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. The changes correctly fix the subtask button text issue by checking for parentTaskId in both completion_result and resume_completed_task handlers. No issues found.

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 Nov 8, 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. size:S This PR changes 10-29 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] subtask return is unstable

3 participants