Skip to content

fix: hide disabled plugin database types from connection form picker#239

Merged
datlechin merged 1 commit intomainfrom
fix/hide-disabled-plugin-types
Mar 9, 2026
Merged

fix: hide disabled plugin database types from connection form picker#239
datlechin merged 1 commit intomainfrom
fix/hide-disabled-plugin-types

Conversation

@datlechin
Copy link
Owner

Summary

  • Filter the database Type picker in the connection form to only show types whose plugin is enabled
  • When editing an existing connection whose plugin is disabled, the current type is still shown so the picker binding stays valid
  • Calls loadPendingPlugins() to handle lazy plugin loading

Follow-up to #236.

Test plan

  • Disable a plugin (e.g., MySQL) in Settings > Plugins
  • Open the connection form (New Connection)
  • Verify MySQL/MariaDB are not in the Type picker
  • Re-enable the plugin, verify they reappear
  • Edit an existing MySQL connection while the plugin is disabled — verify the type still shows in the picker

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f9c10b9cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +36 to +39
if !isNew, !enabled.contains(type) {
return [type] + enabled
}
return enabled

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reset new-form type when default plugin is disabled

This logic only preserves picker validity for edit mode; in new mode it returns enabled even when the bound type (default .mysql) is no longer present. If MySQL is disabled and the user opens a new connection, the picker options omit MySQL but saveConnection()/testConnection() still read type, so the form can operate on a hidden disabled type unless the user manually changes it. Please ensure new forms also reconcile type to an enabled value when the current selection is missing.

Useful? React with 👍 / 👎.

@datlechin datlechin merged commit 1ddbf3c into main Mar 9, 2026
2 checks passed
@datlechin datlechin deleted the fix/hide-disabled-plugin-types branch March 9, 2026 16:12
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.

1 participant