Skip to content

Fix: auto-enable master switch when toggling individual auto-approve settings - #4

Merged
hacker-b2k merged 1 commit into
mainfrom
fix/auto-approve-master-switch-settings
Jun 24, 2026
Merged

Fix: auto-enable master switch when toggling individual auto-approve settings#4
hacker-b2k merged 1 commit into
mainfrom
fix/auto-approve-master-switch-settings

Conversation

@hacker-b2k

Copy link
Copy Markdown
Owner

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.

…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
hacker-b2k merged commit b6af15c into main Jun 24, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant