-
-
Notifications
You must be signed in to change notification settings - Fork 54
fix: clear stale filters and tables on database/schema switch #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -351,6 +351,7 @@ final class MainContentCoordinator { | |
|
|
||
| func loadSchema() async { | ||
| guard let driver = DatabaseManager.shared.driver(for: connectionId) else { return } | ||
| await schemaProvider.invalidateCache() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Calling Useful? React with 👍 / 👎. |
||
| await schemaProvider.loadSchema(using: driver, connection: connection) | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switchDatabasenow clears UI/session state (toolbarState.databaseName, open tabs, sibling windows, and filter state) before any of the throwing switch operations run. IfUSE,switchDatabase,switchSchema, orreconnectSessionfails, the catch path only shows an error and does not restore prior state, so users can lose their open tabs/windows and see the toolbar pointing at a database that was never actually switched to; this is a regression in failure scenarios and the reset should be moved after success (the same failure pattern is present inswitchSchema).Useful? React with 👍 / 👎.