-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Got "Unsaved Changes" dialog asked when there's no changes to extension configuration (Desktop v1.12.1) #6732
Copy link
Copy link
Closed
Description
Describe the bug
Goose shown "Unsaved Changes" dialog when user didn't changed any settings for an extension. Unnecessary friction when user just want to check their extension config
Related components: ExtensionModal > hasFormChanges
goose/ui/desktop/src/components/settings/extensions/modal/ExtensionModal.tsx
Lines 47 to 87 in e9024b7
| // Function to check if form has been modified | |
| const hasFormChanges = (): boolean => { | |
| // Check if command/endpoint has changed | |
| const commandChanged = | |
| (formData.type === 'stdio' && formData.cmd !== initialData.cmd) || | |
| (formData.type === 'sse' && formData.endpoint !== initialData.endpoint) || | |
| (formData.type === 'streamable_http' && formData.endpoint !== initialData.endpoint); | |
| // Check if headers have changed | |
| const headersChanged = formData.headers.some((header) => header.isEdited === true); | |
| // Check if any environment variables have been modified | |
| const envVarsChanged = formData.envVars.some((envVar) => envVar.isEdited === true); | |
| // Check if new env vars have been added | |
| const envVarsAdded = formData.envVars.length > initialData.envVars.length; | |
| // Check if env vars have been removed | |
| const envVarsRemoved = formData.envVars.length < initialData.envVars.length; | |
| // Check if any environment variable fields have text entered (even if not marked as edited) | |
| const envVarsHaveText = formData.envVars.some( | |
| (envVar) => | |
| (envVar.key.trim() !== '' || envVar.value.trim() !== '') && | |
| // Don't count placeholder values for existing secrets | |
| envVar.value !== '••••••••' | |
| ); | |
| // Check if there are pending environment variables or headers being typed | |
| const hasPendingInput = hasPendingEnvVars || hasPendingHeaders; | |
| return ( | |
| commandChanged || | |
| headersChanged || | |
| envVarsChanged || | |
| envVarsAdded || | |
| envVarsRemoved || | |
| envVarsHaveText || | |
| hasPendingInput | |
| ); |
To Reproduce
Steps to reproduce the behavior:
- Open Goose. Click "Extension" menu in sidebar.
- Click settings/gear icon for non-built-in extensions, let the modal open
- Do nothing
- Close it right away, using the X button on top or Cancel button at the bottom
- See the "Unsaved Changes" dialog shown
Expected behavior
Goose should detect config changes properly and not ask/show the "Unsaved Changes" dialog when user try to close the popup after doing nothing/if there's no extension config edited yet.
Screen Recording
https://github.com/user-attachments/assets/64e659ee-165b-48d0-b5dc-190b7dd10339
Please provide the following information
- OS & Arch: Linux - Bluefin based on Fedora 43, 64-bit
- Interface: UI
- Version: v.1.12.1 Desktop
- Extensions added: Linux MCP Server and Tavily. Default extensions enabled.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels