Skip to content

fix: stop prompting "MariaDB plugin not installed" for lazy built-in drivers#1053

Merged
datlechin merged 1 commit into
mainfrom
fix/mariadb-not-installed-prompt
May 6, 2026
Merged

fix: stop prompting "MariaDB plugin not installed" for lazy built-in drivers#1053
datlechin merged 1 commit into
mainfrom
fix/mariadb-not-installed-prompt

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

  • Picking MariaDB (or any other lazy built-in driver) in the new-connection type chooser falsely showed "The MariaDB plugin is not installed. Would you like to download it from the plugin marketplace?" before the bundle had ever been activated.
  • Root cause: PluginManager.isDriverLoaded(for:) only inspected driverPlugins (the in-memory map). Built-in drivers are registered lazily and only get inserted there on first use, so any first-click before activation routed through the marketplace prompt. MariaDB is the most visible case because its pluginTypeId resolves to "MySQL" via reverseTypeIndex, and driverPlugins["MySQL"] is empty until the MySQL bundle loads.
  • Replaced isDriverLoaded(for:) with isDriverInstalled(for:), which also checks lazyDriverURLs[typeId] — populated by registerLazyPluginEntry for every type ID in the manifest, including aliases. Same fix removes the spurious "Not Installed" badge in DatabaseTypeChooserRow. Deleted the unused, identically-bodied isDriverAvailable(for:).
  • Relaxed lazyDriverURLs from private to private(set) so the registration extension can read it; mutation still scoped to PluginManager.swift.

Test plan

  • Fresh launch with no MySQL/MariaDB connection ever opened. Open the new-connection chooser, click MariaDB → connection form opens directly, no install alert.
  • Same for MySQL, PostgreSQL, SQLite, ClickHouse, Redis (other lazy built-ins).
  • Click a isDownloadable type the user has not installed (e.g. MongoDB on a clean profile) → install alert still shows correctly.
  • Type chooser grid: verify "Not Installed" badge no longer appears under MariaDB / MySQL / PostgreSQL / etc., and still appears for genuinely uninstalled downloadable plugins.
  • Existing MariaDB connection in the sidebar still connects on click.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin datlechin merged commit 935a8b6 into main May 6, 2026
2 checks passed
@datlechin datlechin deleted the fix/mariadb-not-installed-prompt branch May 6, 2026 17:19
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