Describe the bug
The "Auto close Zoo opened files" checkbox in Settings → UI cannot be unchecked. After unchecking and clicking Save, the setting does not persist — the checkbox always reverts to checked when the settings view is reopened.
Additionally, the autoCloseZooOpenedFilesAfterUserEdited and autoCloseZooOpenedNewFiles settings suffer from the same root cause: they are saved to global state but never sent back to the webview.
To Reproduce
- Open Zoo Code Settings → UI section
- Uncheck the "Auto close Zoo opened files" checkbox
- Click Save
- Navigate away from Settings (e.g., back to chat)
- Reopen Settings → UI section
- Observe the checkbox is checked again
Expected behavior
The "Auto close Zoo opened files" checkbox should remain unchecked after saving and reopening settings. The saved value (false) should persist across sessions.
Root Cause
The three auto-close settings (autoCloseZooOpenedFiles, autoCloseZooOpenedFilesAfterUserEdited, autoCloseZooOpenedNewFiles) are missing from both getState() and getStateToPostToWebview() in ClineProvider.ts. The settings are correctly saved to global state via contextProxy.setValue() in the updateSettings handler, but:
-
getStateToPostToWebview() never includes these fields in the state posted to the webview, so the webview always receives undefined for them. When the SettingsView re-mounts, cachedState is initialized from extensionState (which has undefined), and the checkbox renders checked={undefined ?? true} → always checked.
-
getState() never returns these fields, so the DiffViewProvider (which reads saveState?.autoCloseZooOpenedFiles ?? true) always gets undefined and falls back to the default true — meaning the auto-close behavior ignores the user's saved preference entirely.
What version of zoo are you running
Latest (main branch)
Additional context
The fields are properly defined in the ExtensionState type (packages/types/src/vscode-extension-host.ts) and the globalSettingsSchema (packages/types/src/global-settings.ts), and the webview correctly sends them in the updateSettings message. The gap is purely in the backend state serialization — the fields were never added to the getState() and getStateToPostToWebview() return objects.
Describe the bug
The "Auto close Zoo opened files" checkbox in Settings → UI cannot be unchecked. After unchecking and clicking Save, the setting does not persist — the checkbox always reverts to checked when the settings view is reopened.
Additionally, the
autoCloseZooOpenedFilesAfterUserEditedandautoCloseZooOpenedNewFilessettings suffer from the same root cause: they are saved to global state but never sent back to the webview.To Reproduce
Expected behavior
The "Auto close Zoo opened files" checkbox should remain unchecked after saving and reopening settings. The saved value (
false) should persist across sessions.Root Cause
The three auto-close settings (
autoCloseZooOpenedFiles,autoCloseZooOpenedFilesAfterUserEdited,autoCloseZooOpenedNewFiles) are missing from bothgetState()andgetStateToPostToWebview()inClineProvider.ts. The settings are correctly saved to global state viacontextProxy.setValue()in theupdateSettingshandler, but:getStateToPostToWebview()never includes these fields in the state posted to the webview, so the webview always receivesundefinedfor them. When the SettingsView re-mounts,cachedStateis initialized fromextensionState(which hasundefined), and the checkbox renderschecked={undefined ?? true}→ always checked.getState()never returns these fields, so theDiffViewProvider(which readssaveState?.autoCloseZooOpenedFiles ?? true) always getsundefinedand falls back to the defaulttrue— meaning the auto-close behavior ignores the user's saved preference entirely.What version of zoo are you running
Latest (main branch)
Additional context
The fields are properly defined in the
ExtensionStatetype (packages/types/src/vscode-extension-host.ts) and theglobalSettingsSchema(packages/types/src/global-settings.ts), and the webview correctly sends them in theupdateSettingsmessage. The gap is purely in the backend state serialization — the fields were never added to thegetState()andgetStateToPostToWebview()return objects.