Skip to content

bug(connections): PG schema tree must not show stale objects with error #466

Description

@ZhuchkaTriplesix

Parent

Part of #463

Severity

Medium

Problem

After a failed reload in _PgSchemaNodeState._loadObjects, state sets _error but leaves _loaded true and keeps prior _tables / _views lists. Build shows the error block and paints old object groups — a broken refresh looks like current schema data.

Evidence

  • lib/features/connections/connections_panel_pg_tree.dart (~684–776)
  • Bugbot review dev vs main (2026-07-27)

Acceptance

  • On load failure, either clear object lists or hide them while _error != null
  • Retry reloads cleanly
  • Successful reload still shows objects

Suggested fix

On catch: set _error, _loading = false, and clear lists / set _loaded = false; or in build, skip object groups when _error != null.

Metadata

Metadata

Labels

bugSomething isn't workingconnectionsDatabase connections, URI parsing, poolsuiUser interface components and widgets

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions