fix: allow auto-approve checkbox to be toggled at any time #6061
+11
−17
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.
Context
The auto-approve checkbox was becoming unresponsive and flickering during model responses, preventing users from disabling auto-approval when they realize the model is about to perform unintended actions. This created a critical safety issue where users could not stop unwanted auto-approvals in time-sensitive situations.
Implementation
This fix removes the disabled state from the main auto-approve checkbox and ensures it can always be toggled:
isCheckboxDisabled
state that prevented toggling when no options were selected or menu was openReact.memo
to reduce unnecessary re-renders that cause flickeringHow to Test
Safety Impact
This fix ensures users can always disable auto-approval for safety, especially during time-critical situations when the model is actively responding and about to execute unwanted actions.
Fixes #6060
Important
Fixes
AutoApproveMenu
checkbox to be always toggleable, ensuring user control during model responses.isCheckboxDisabled
logic inAutoApproveMenu.tsx
, allowing the auto-approve checkbox to be toggled at any time.AutoApproveMenu
component inReact.memo
to reduce unnecessary re-renders and prevent flickering.AutoApproveMenu.spec.tsx
to reflect the always-enabled checkbox behavior.This description was created by
for fd4c064. You can customize this summary. It will automatically update as commits are pushed.