You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(connections): unify schema tree building across Postgres, MySQL and SDUI drivers #1505
In lib/features/connections/, schema tree rendering for database objects has evolved into separate massive implementations:
connections_panel_pg_tree.dart (959 lines)
connections_panel_mysql.dart (782 lines)
Meanwhile, extension drivers use a declarative Server-Driven UI model (sdui_tree_builder.dart).
Both Postgres and MySQL tree files implement almost identical boilerplate:
Recursive node expansion / collapse tracking.
Async lazy-loading spinners and error retry handling.
Node context menu creation (query, copy name, refresh, drop).
Schema object icon caching and indent guide rendering.
This duplication inflates bundle size, leads to inconsistent UI behavior across engines, and increases maintenance costs when adding new database features.
Scope
Extract a unified DatabaseTreeNode / SchemaTreeAdapter abstraction in features/connections/.
Consolidate node lazy-loading, expansion state, error banners, and context menu rendering into a shared tree controller.
Refactor PostgreSQL and MySQL trees to supply metadata definitions to the common tree adapter instead of implementing distinct widget trees from scratch.
Acceptance
connections_panel_pg_tree.dart and connections_panel_mysql.dart reduced by at least 50% in line count.
Unified node interaction and context menu behavior across all database drivers.
Activity