fix: auto-approve settings not persisting in Settings UI#5938
Closed
Githubguy132010 wants to merge 3 commits intoKilo-Org:mainfrom
Closed
fix: auto-approve settings not persisting in Settings UI#5938Githubguy132010 wants to merge 3 commits intoKilo-Org:mainfrom
Githubguy132010 wants to merge 3 commits intoKilo-Org:mainfrom
Conversation
Fixes Kilo-Org#5934 The AutoApproveSettings component was only updating local React state but not persisting settings to the VS Code backend. Added missing vscode.postMessage calls to all toggle handlers.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🦋 Changeset detectedLatest commit: d30eed9 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 |
Contributor
|
Hi there, the behavior as described is actually intended to be that way. The settings will be persisted once you hit Save in the settings dialog. When you toggle a setting and exit the settings dialog it will ask you if you want to discard the changes you made or not. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
fixes #5934 and fixes #3074
Auto-approve settings configured in the Settings UI were not being persisted to the backend. When users toggle auto-approve options in the Settings page, the toggles visually show as enabled but the settings are not actually saved, causing commands to still require manual approval.
Implementation
The issue was in
webview-ui/src/components/settings/AutoApproveSettings.tsx- the component only updated local React state viasetCachedStateField()but was missing thevscode.postMessage()calls to persist settings to the VS Code backend.Added
vscode.postMessage({ type: "updateSettings", updatedSettings: { ... } })calls to all toggle handlers, following the pattern already used inAutoApproveMenu.tsx:showAutoApproveMenucheckboxAutoApproveToggleonToggle handler (covers all auto-approve toggles)MaxLimitInputshandlers forallowedMaxRequestsandallowedMaxCostalwaysAllowReadOnlyOutsideWorkspacecheckboxalwaysAllowWriteOutsideWorkspacecheckboxalwaysAllowWriteProtectedcheckboxfollowupAutoApproveTimeoutMsslideryoloModecheckboxScreenshots
N/A - No visual changes, only fixes persistence behavior.
How to Test
Get in Touch
thomas07374