Skip to content

Got "Unsaved Changes" dialog asked when there's no changes to extension configuration (Desktop v1.12.1) #6732

@KiKaraage

Description

@KiKaraage

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

// 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:

  1. Open Goose. Click "Extension" menu in sidebar.
  2. Click settings/gear icon for non-built-in extensions, let the modal open
  3. Do nothing
  4. Close it right away, using the X button on top or Cancel button at the bottom
  5. See the "Unsaved Changes" dialog shown
Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions