rusackas opened a new pull request, #34765: URL: https://github.com/apache/superset/pull/34765
## Summary Fixes the issue where the Save Query modal would close immediately when clicking save on a new tab that has no changes made to it. ## Root Cause The SaveQuery component was using both: 1. `onHandledPrimaryAction` prop on the Modal component 2. A custom footer with buttons that also call the same save function This caused the save function to be called twice, leading to the modal closing prematurely before the save operation could complete. ## Solution - Removed the conflicting `onHandledPrimaryAction` and `primaryButtonName` props from the Modal - Made the save operations properly async to wait for completion before closing the modal - Added comprehensive tests to verify the fix ## Testing - Added test to verify modal stays open during save operation and only closes after completion - Added test to specifically handle the case of saving a new tab with default content - Both existing and new tests should pass ## Test plan 1. Go to SQL Lab 2. Click "add query" to create a new tab 3. Click the "Save" button to open the save modal 4. Fill in a name and click "Save" in the modal 5. Verify the modal stays open during the save process and only closes after the query is successfully saved Fixes #31767 🤖 Generated with [Claude Code](https://claude.ai/code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org