Skip to content

feat: extract export formats into plugin bundles#213

Merged
datlechin merged 5 commits intomainfrom
feat/export-format-plugins
Mar 9, 2026
Merged

feat: extract export formats into plugin bundles#213
datlechin merged 5 commits intomainfrom
feat/export-format-plugins

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Extract all 5 built-in export formats (CSV, JSON, SQL, XLSX, MQL) into .tableplugin bundles, making the export system plugin-based and extensible by third parties
  • Add ExportFormatPlugin protocol, PluginExportDataSource, PluginExportProgress, and shared utilities to TableProPluginKit
  • Simplify ExportService to a thin orchestrator that delegates to plugins; dynamic format picker in Export dialog filtered by database type compatibility
  • Fix pre-existing test runner crash caused by parallel test execution (parallelizable=NO in scheme)

Test plan

  • Build succeeds with all 13 plugin bundles (8 drivers + 5 export)
  • All 1492 tests pass (6.3s)
  • SwiftLint clean (no new violations)
  • Open Export dialog — verify format picker shows all 5 formats dynamically
  • Connect to MongoDB — verify only CSV, JSON, MQL, XLSX shown
  • Connect to MySQL — verify CSV, JSON, SQL, XLSX shown
  • Select each format — verify options panel renders correctly
  • Select SQL format — verify Structure/Drop/Data columns appear in tree
  • Export a table to each format — verify output matches pre-refactor
  • SQL export with gzip — verify .sql.gz output
  • Start large export, click Cancel — verify clean termination
  • Settings > Plugins — verify export plugins appear as built-in

Extract all 5 built-in export formats (CSV, JSON, SQL, XLSX, MQL) into
.tableplugin bundles, making the export system plugin-based and extensible.

- Add ExportFormatPlugin protocol, PluginExportDataSource, PluginExportProgress,
  and shared utilities to TableProPluginKit
- Create 5 export plugin bundles with self-contained models, options views,
  and export logic
- Simplify ExportService to thin orchestrator delegating to plugins
- Dynamic format picker in ExportDialog filtered by database type
- Generic per-table option columns replacing hardcoded SQL/MQL columns
- Fix test parallelization causing false failures (scheme parallelizable=NO)
- Update tests for new plugin-based export API
@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.

- Remove duplicate finalizeTable() calls from CSV/SQL/JSON/MQL helpers
- Add bundle: .main to String(localized:) in plugin option views
- Clear optionValues on format switch to prevent MQL/SQL column mismatch
- Add progress update coalescing to prevent main actor flooding
- Extract createFileHandle to PluginExportUtilities (DRY)
- Replace PluginManager dependency in MSSQLDriverTests with a mock
  PluginDatabaseDriver to avoid plugin loading issues in parallel runs
- Add .serialized trait to CompletionEngineTests to prevent data race
  on SQLKeywords statics
- Restore parallelizable = YES in test scheme
- Surface DDL failure warnings from SQLExportPlugin via new protocol
  warnings property on ExportFormatPlugin
- Propagate Swift Task cancellation in PluginExportProgress.checkCancellation
- Pass databaseName through writeMQLIndexes instead of hardcoding ""
- Add bundle: .main to String(localized:) in CSVExportModels displayName
- Populate optionValues with plugin defaults on format switch
- Wrap per-table sequence/type fetch in do/catch for fault tolerance
- Restore original format picker order (csv, json, sql, xlsx, mql)
@datlechin datlechin merged commit c8c2216 into main Mar 9, 2026
2 checks passed
@datlechin datlechin deleted the feat/export-format-plugins branch March 9, 2026 04:06
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