Skip to content

ui(stats/table): clear loading on early exit and unchanged replaceIfChanged #448

Description

@ZhuchkaTriplesix

Parent

Part of #445

Severity

High

Problem

  1. replaceIfChanged early-return skips _loading = false in MySQL/Postgres stats → stuck “Connecting…” when stats are identical/null while loading. Extension/Redis already guard (if (_loading) setState(() => _loading = false)).
  2. After _loading = true, _fetch does if (conn == null || !conn.isConnected) return with no error / loading clear → infinite spinner in stats and table views.

Evidence

  • lib/features/mysql/mysql_stats_view.dart (~95–102, 111–114)
  • lib/features/postgresql/postgres_stats_view.dart (~111–114)
  • Table views: mysql_table_view.dart, postgres_table_view.dart, sqlite_table_view.dart early conn checks
  • Good pattern: lib/features/extensions/extension_stats_view.dart (~84–86)

Acceptance

  • Unchanged replaceIfChanged still clears _loading on first paint
  • Null/disconnected lease sets _error (or equivalent) and _loading = false
  • Tests covering both paths for at least one stats view

Suggested fix

Match extension_stats / redis_view guards; treat missing connection as connect failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingmysqlMySQL database driver and workspaceuiUser interface components and widgets

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions