Fix: auto-enable master switch when toggling individual auto-approve settings - #4
Merged
Merged
Conversation
…vidual settings in Settings page Mirrors the behavior from AutoApproveDropdown.tsx where enabling any individual auto-approve toggle also enables the master switch.
hacker-b2k
pushed a commit
that referenced
this pull request
Jul 31, 2026
…tory, dry_run, batch replace, enhanced rename Issue #1: search_replace error now shows closest matching text with line number Issue #2: read_spec mode='headings' returns only heading lines with line numbers Issue #3: read_spec mode='history' returns revision list; revision=N reads specific version Issue #4: renameWorkspace enhanced heading patterns (suffix, contains, case-insensitive) Issue Zoo-Code-Org#5: write_spec dry_run=true previews changes without applying Issue Zoo-Code-Org#6: write_spec replacements=[] for atomic batch search_replace operations Files: specMerge.ts, ReadSpecTool.ts, WriteSpecTool.ts, SpecService.ts, read_spec.ts, write_spec.ts
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.
Problem
In the Settings page, clicking individual auto-approve toggles (Read-only, Write, Execute, MCP, etc.) only updated the local cached state via \setCachedStateField(key, value)\ — it did NOT enable the \�utoApprovalEnabled\ master switch. This meant the user could enable all individual toggles but the agent would still ask for permission because \checkAutoApproval()\ returns { decision: 'ask' }\ at line 55 when \�utoApprovalEnabled\ is false.
Root Cause
\AutoApproveDropdown.tsx\ (chat dropdown) had the correct pattern — it calls \setAutoApprovalEnabled(true)\ and posts { type: 'autoApprovalEnabled', bool: true }\ whenever an individual toggle is enabled. But \AutoApproveSettings.tsx\ (Settings page) was missing this logic.
Fix
Mirrored the exact pattern from \AutoApproveDropdown.tsx: when a user enables any individual auto-approve toggle in Settings, the \onToggle\ handler now also auto-enables the \�utoApprovalEnabled\ master switch.