Skip to content

fix: keep auto-approve checkbox responsive when menu is expanded #6062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Jul 22, 2025

This PR fixes a critical safety issue where the auto-approve checkbox becomes unresponsive when the dropdown menu is expanded, preventing users from disabling auto-approval during model responses.

Fixes #6060

Changes

  • Removed isExpanded from the checkbox disabled condition to allow toggling while menu is open
  • Wrapped onChange handler in useCallback to prevent unnecessary re-renders
  • Added tests to verify checkbox remains responsive when menu is expanded
  • Added test to verify no flickering during rapid state changes

Safety Impact

This fix ensures users can always disable auto-approval when needed, which is critical for preventing unintended actions during model responses.


Important

Fixes unresponsive auto-approve checkbox in AutoApproveMenu.tsx when menu is expanded, ensuring it remains responsive and prevents unintended actions.

  • Behavior:
    • Fixes unresponsive auto-approve checkbox in AutoApproveMenu.tsx when dropdown is expanded by removing isExpanded from disabled condition.
    • Wraps onChange handler in useCallback to prevent unnecessary re-renders.
  • Tests:
    • Adds tests in AutoApproveMenu.spec.tsx to verify checkbox remains responsive when menu is expanded.
    • Adds test to ensure no flickering during rapid state changes.

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

- Remove isExpanded from checkbox disabled condition to allow toggling while menu is open
- Wrap onChange handler in useCallback to prevent unnecessary re-renders
- Add tests to verify checkbox remains responsive when menu is expanded
- Add test to verify no flickering during rapid state changes

This fixes the critical safety issue where users could not disable auto-approval
during model responses when they realized unintended actions were about to occur.

Fixes #6060
@roomote roomote bot requested review from mrubens, cte and jr as code owners July 22, 2025 09:30
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 22, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jul 22, 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. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

Regression: Auto-approve checkbox becomes unresponsive and flickers during model responses
2 participants