Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 9, 2025

Fixes the issue where the auto-approval timer for follow-up questions continues running in the background even after the user starts typing.

Changes

Backend (Task.ts):

  • Added autoApprovalTimeoutRef property to track the auto-approval timeout
  • Store timeout reference when creating auto-approval timer
  • Added cancelAutoApprovalTimeout() method to cancel pending timeouts
  • Call cancelAutoApprovalTimeout() in handleWebviewAskResponse() to clear timeout when user responds

Backend (webviewMessageHandler.ts):

  • Added cancelAutoApproval message handler to cancel timeout from frontend

Backend (WebviewMessage.ts):

  • Added cancelAutoApproval message type to the union

Frontend (ChatView.tsx):

  • Added effect to detect when user starts typing
  • Send cancelAutoApproval message to backend when user types during a follow-up question

Testing

  • Existing FollowUpSuggest tests pass (13/13)
  • Existing ChatView tests pass (23/23)
  • All type checks pass
  • All linting passes

Expected Behavior

When the user receives a follow-up question with auto-approval enabled:

  1. The countdown timer displays in the UI
  2. If the user starts typing, the backend timeout is immediately cancelled
  3. The timeout will not fire even if it was scheduled to complete
  4. User can continue typing without interruption

View task on Roo Code Cloud


Important

Cancels auto-approval timer for follow-up questions when user starts typing, with changes in both frontend and backend to manage timer state.

  • Behavior:
    • Cancels auto-approval timer when user starts typing in ChatView.tsx.
    • Sends cancelAutoApproval message to backend when typing is detected.
  • Backend:
    • Adds autoApprovalTimeoutRef in Task.ts to track timeout.
    • Implements cancelAutoApprovalTimeout() in Task.ts to clear timeout.
    • Adds cancelAutoApproval message handler in webviewMessageHandler.ts.
  • Frontend:
    • Detects typing in ChatView.tsx and pauses auto-approval.
    • Updates FollowUpSuggest.tsx to handle paused auto-approval state.
  • Testing:
    • Adds tests in FollowUpSuggest.spec.tsx to verify countdown behavior when typing.

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

@roomote
Copy link
Contributor Author

roomote bot commented Dec 9, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found. The implementation correctly adds visual countdown pausing when the user starts typing during a follow-up question.

Previous reviews

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 9, 2025
@mrubens mrubens force-pushed the fix/followup-timer-cancellation branch from 795f787 to 8bccf0b Compare December 12, 2025 14:52
@mrubens mrubens marked this pull request as ready for review December 12, 2025 15:09
@mrubens mrubens requested review from cte, jr and mrubens as code owners December 12, 2025 15:09
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Dec 12, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Dec 12, 2025

Rooviewer Clock   Follow along on Roo Cloud

Reviewing your PR now. Feedback coming soon!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 12, 2025
@mrubens mrubens merged commit d976a9b into main Dec 12, 2025
26 checks passed
@mrubens mrubens deleted the fix/followup-timer-cancellation branch December 12, 2025 15:25
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 12, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Dec 12, 2025
@cte cte mentioned this pull request Dec 12, 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. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants