fix: cancel auto-approval timeout when user starts typing #9937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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):autoApprovalTimeoutRefproperty to track the auto-approval timeoutcancelAutoApprovalTimeout()method to cancel pending timeoutscancelAutoApprovalTimeout()inhandleWebviewAskResponse()to clear timeout when user respondsBackend (
webviewMessageHandler.ts):cancelAutoApprovalmessage handler to cancel timeout from frontendBackend (
WebviewMessage.ts):cancelAutoApprovalmessage type to the unionFrontend (
ChatView.tsx):cancelAutoApprovalmessage to backend when user types during a follow-up questionTesting
Expected Behavior
When the user receives a follow-up question with auto-approval enabled:
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.
ChatView.tsx.cancelAutoApprovalmessage to backend when typing is detected.autoApprovalTimeoutRefinTask.tsto track timeout.cancelAutoApprovalTimeout()inTask.tsto clear timeout.cancelAutoApprovalmessage handler inwebviewMessageHandler.ts.ChatView.tsxand pauses auto-approval.FollowUpSuggest.tsxto handle paused auto-approval state.FollowUpSuggest.spec.tsxto verify countdown behavior when typing.This description was created by
for 73d4522. You can customize this summary. It will automatically update as commits are pushed.