Skip to content

Conversation

@alexrrouse
Copy link
Contributor

@alexrrouse alexrrouse commented Jun 17, 2025

Summary

This PR adds a confirmation dialog when users try to close the extension modal with unsaved changes, preventing accidental loss of configuration data.

Problem

I had experienced frustration when accidentally clicking outside the extension modal (backdrop) accidentally after entering API keys that I had copied and closed the window that they came from causing me to re-generate the keys.

We listen for changes in the environment variables and the command fields for requiring the prompt, since the name/description fields are a bit easier to reproduce.

Screen.Recording.2025-06-17.at.3.22.34.PM.mov

- Add confirmation dialog when closing extension modal with unsaved changes
- Detect changes in command/endpoint fields and environment variables
- Track pending input in environment variable fields before clicking Add
- Apply confirmation logic to both backdrop clicks and Cancel button
- Improve UX by preventing accidental loss of configuration data

Changes:
- ExtensionModal.tsx: Add change detection and confirmation dialog logic
- EnvVarsSection.tsx: Add callback to track pending input in new env var fields

Fixes issue where users could accidentally close modal and lose entered
API keys or configuration data by clicking outside the modal.
@alexrrouse alexrrouse force-pushed the feature/extension-modal-unsaved-changes-confirmation branch 2 times, most recently from 853f1b4 to 56f8baa Compare June 17, 2025 19:55
@wendytang wendytang merged commit 398a4fe into block:main Jun 17, 2025
6 checks passed
michaelneale added a commit that referenced this pull request Jun 18, 2025
* main: (26 commits)
  chore(release): release version 1.0.29 (#2978)
  [fix][small] Replaced goose prompt unicode quotations with ascii quotations (#2972)
  fix: goose recipe prompt is not shown again when switch the view from settings to chat (#2870)
  fix: remove computer controller presentation (#2956)
  Fix GitHub Copilot Provider Config (#2955)
  Blog: Why I Used Goose to Build a Chaotic Emotion Detection App (#2959)
  Docs: Recipe settings (#2970)
  feat(ui): Add confirmation dialog for unsaved changes in extension modal (#2971)
  feat: alphabetize extensions in goose CLI (#2966)
  switch roles on condition for windows (#2975)
  fix version param for canary (#2974)
  enabling windows builds with code signing (#2968)
  feat(cli): add system prompt parameter to run command (#2253)
  Fix window not showing for some users (#2967)
  Add documentation for running with Ramalama local model serving in OCI Containers (#1973)
  Reddit MCP Server Tutorial (#2949)
  [fix] goose not quitting app completely (#2950)
  Opopadich/issue 1625 (#2904)
  chore(deps): bump go.temporal.io/api from 1.24.0 to 1.44.1 in /temporal-service (#2837)
  feat: add newline at end of file writes (#2221)
  ...
laanak08 added a commit that referenced this pull request Jun 18, 2025
* main: (28 commits)
  feat: optional fast edit models (#2580)
  feat: Add lead-worker model selection and real-time model display in GUI (#2964)
  chore(release): release version 1.0.29 (#2978)
  [fix][small] Replaced goose prompt unicode quotations with ascii quotations (#2972)
  fix: goose recipe prompt is not shown again when switch the view from settings to chat (#2870)
  fix: remove computer controller presentation (#2956)
  Fix GitHub Copilot Provider Config (#2955)
  Blog: Why I Used Goose to Build a Chaotic Emotion Detection App (#2959)
  Docs: Recipe settings (#2970)
  feat(ui): Add confirmation dialog for unsaved changes in extension modal (#2971)
  feat: alphabetize extensions in goose CLI (#2966)
  switch roles on condition for windows (#2975)
  fix version param for canary (#2974)
  enabling windows builds with code signing (#2968)
  feat(cli): add system prompt parameter to run command (#2253)
  Fix window not showing for some users (#2967)
  Add documentation for running with Ramalama local model serving in OCI Containers (#1973)
  Reddit MCP Server Tutorial (#2949)
  [fix] goose not quitting app completely (#2950)
  Opopadich/issue 1625 (#2904)
  ...
@alexrrouse alexrrouse deleted the feature/extension-modal-unsaved-changes-confirmation branch June 18, 2025 13:58
s-soroosh pushed a commit to s-soroosh/goose that referenced this pull request Jul 18, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

3 participants