Skip to content

feat: plugin system with Settings UI#207

Merged
datlechin merged 2 commits intomainfrom
feat/plugin-system
Mar 8, 2026
Merged

feat: plugin system with Settings UI#207
datlechin merged 2 commits intomainfrom
feat/plugin-system

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Extract all 8 database drivers (MySQL, PostgreSQL, SQLite, ClickHouse, MSSQL, MongoDB, Redis, Oracle) into .tableplugin bundles loaded at runtime by PluginManager
  • Add TableProPluginKit shared framework with DriverPlugin, PluginDatabaseDriver, and transfer types
  • Add PluginDriverAdapter bridging plugin drivers to the app's DatabaseDriver protocol
  • Add Settings > Plugins tab for managing installed plugins (list, enable/disable, install from file, uninstall, view details)
  • Reorganize project structure: Services, Utilities, Models split into domain-specific subdirectories
  • Replace fatalError in DatabaseDriverFactory.createDriver with thrown error to prevent crashes when plugins aren't loaded
  • Add plugin tests (PluginModelsTests) and rewrite ExportServiceStateTests with StubDriver mock

Test plan

  • All 11 new/rewritten tests pass (4 ExportServiceState + 7 PluginModels)
  • Open Settings > Plugins tab, verify all 8 built-in plugins are listed
  • Toggle a plugin off/on, verify state persists across Settings reopen
  • Click a plugin row, verify detail section shows correct metadata
  • Verify all database connections still work (MySQL, PostgreSQL, SQLite, etc.)
  • Verify app no longer crashes when a plugin is missing (shows error instead of fatalError)

@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.

Extract all 8 database drivers into .tableplugin bundles loaded at runtime.
Add Settings > Plugins tab for managing installed plugins.
@datlechin datlechin force-pushed the feat/plugin-system branch from 0681cf3 to f642a44 Compare March 8, 2026 18:19
- Fix data race: remove nonisolated(unsafe) from driverPlugins, make DatabaseDriverFactory @mainactor
- Fix blocking thread: replace process.waitUntilExit() with async continuation
- Fix signature check: pin to team ID via SecRequirement instead of accepting any cert
- Fix unregisterCapabilities: remove additionalDatabaseTypeIds entries (e.g., MariaDB)
- Fix minAppVersion error: use new appVersionTooOld case with correct parameters
- Fix default switchDatabase: throw unsupported error instead of T-SQL syntax
- Fix PluginsSettingsView: use SwiftUI .alert instead of unreliable NSApp.keyWindow
- Remove redundant testConnection override from PluginDriverAdapter
- Add MySQL-specific switchDatabase override with backtick escaping
@datlechin datlechin merged commit a10639b into main Mar 8, 2026
2 checks passed
@datlechin datlechin deleted the feat/plugin-system branch March 8, 2026 23:47
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