Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Jul 9, 2025

Description

This PR fixes an issue where subsequent tool calls would not be auto-approved after the update_todo_list tool was used, even when auto-approval was enabled.

Problem

After the update_todo_list tool execution, the userRespondedRef.current flag remained true, causing the auto-approval logic to exit early for all subsequent tool requests. This meant that even though auto-approval was enabled for various tools, they would still require manual approval.

Solution

The fix resets the userRespondedRef.current flag to false whenever a new ask message arrives. This ensures that each tool request is evaluated for auto-approval independently, without being affected by previous user interactions or auto-approvals.

Changes Made

  • Added userRespondedRef.current = false at the beginning of the ask message processing in the useDeepCompareEffect hook
  • Removed the redundant reset that was only happening during auto-approval itself

Testing

The user has confirmed that this fix resolves the issue and auto-approval now works correctly for subsequent tools after update_todo_list is used.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No breaking changes
  • User has tested and confirmed the fix works

Important

Fixes auto-approval issue in ChatView.tsx by resetting userRespondedRef.current on new "ask" messages.

  • Behavior:
    • Fixes auto-approval issue by resetting userRespondedRef.current to false on new "ask" messages in ChatViewComponent.
    • Ensures each tool request is evaluated independently for auto-approval.
  • Code Changes:
    • Adds userRespondedRef.current = false in useDeepCompareEffect hook in ChatView.tsx.
    • Removes redundant reset during auto-approval process.

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

After update_todo_list tool execution, subsequent tools were not being
auto-approved even when auto-approval was enabled. This was because
userRespondedRef.current remained true after the first auto-approval.

The fix resets this flag when any new ask message arrives, allowing
each tool request to be evaluated for auto-approval independently.
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners July 9, 2025 13:49
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Jul 9, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jul 9, 2025

No security or compliance issues detected. Reviewed everything up to 51beb55.

Security Overview
  • 🔎 Scanned files: 2 changed file(s)
Detected Code Changes
Change Type Relevant files
Bug Fix ► ChatView.tsx
    Reset user response flag for auto-approval
► ninety-birds-appear.md
    Fix auto-approval intermittent failure

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Jul 9, 2025
@mrubens mrubens merged commit 58cacc3 into main Jul 9, 2025
8 of 9 checks passed
@mrubens mrubens deleted the fix/auto-approval-after-todo-update branch July 9, 2025 13:54
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 9, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jul 9, 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 lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants