-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: make file deletion auto-approve checkbox clickable (#4485) #5565
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
fix: make file deletion auto-approve checkbox clickable (#4485) #5565
Conversation
Change the default value of alwaysAllowDelete from false to true to be consistent with other auto-approve settings like alwaysAllowWrite and alwaysAllowReadOnly.
🦋 Changeset detectedLatest commit: b44e285 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Conflicts in ExtensionStateContext.tsx and AutoApproveSettings.tsx have been resolved: - Set alwaysAllowDelete default to true for consistency with other auto-approve settings - Preserved kilocode_change markers for tracking Kilo-specific modifications
|
Thanks for the review. Anything else? |
kevinvandijk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some small changes but lgtm for the rest!
Context
Fixes #4485. The file deletion auto-approve checkbox in the AutoApproveDropdown was not clickable because the
setAlwaysAllowDeletehandler was not being called when users tried to toggle the checkbox. Additionally, the default value foralwaysAllowDeletehas been set totruefor consistency with other auto-approve settings.Implementation
The fix involved adding the missing
setAlwaysAllowDeletestate setter to the following components:AutoApproveDropdown.tsx: Added
setAlwaysAllowDeleteto the destructured context values and implemented the case handler in the toggle switch statement. Also added it to the useCallback dependency array.AutoApproveSettings.tsx: Added
alwaysAllowDeleteprop to the component interface and passed it to the AutoApproveToggle component.SettingsView.tsx: Added
alwaysAllowDeleteto the destructured state and passed it through to AutoApproveSettings.ExtensionStateContext.tsx: Set the default value of
alwaysAllowDeletetotruefor consistency withalwaysAllowReadOnlyandalwaysAllowWritedefaults.All changes are marked with
// kilocode_changecomments as per project guidelines.Screenshots
N/A
How to Test
Get in Touch
Discord: thomas07374