diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b266a0..2a4ac97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.52.1 + +### Fixed + +- **Dashboard: listing a node's git credentials no longer sticks on + “Loading credentials…”.** The background load cleared its status only on error; + a successful load — including an empty list (node has none registered) — now + clears it too, so the view shows the credentials (or the empty-state hint) + instead of a lingering loading message. + ## 1.52.0 ### Added diff --git a/lib/src/application/client/dashboard/dashboard_app.dart b/lib/src/application/client/dashboard/dashboard_app.dart index efc3634..4c04402 100644 --- a/lib/src/application/client/dashboard/dashboard_app.dart +++ b/lib/src/application/client/dashboard/dashboard_app.dart @@ -963,6 +963,12 @@ class DashboardApp { if (_credSel > _maxIndex(_credentials.length)) { _credSel = _maxIndex(_credentials.length); } + // Clear the "Loading credentials…" status now that the (possibly empty) + // list is ready. The background load finishes without a keypress, which is + // what would otherwise clear a transient message. + _message = null; + _messageHint = null; + _messageIsError = false; } on Object catch (e) { if (_credentials.isEmpty) { _setError('Failed to list credentials', e); diff --git a/lib/src/version.dart b/lib/src/version.dart index 81afd38..308d4d3 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -3,4 +3,4 @@ /// This is the single source of truth for "what build is this": it is rendered /// in the CLI banner and is the default a node reports as its /// [NodeConfig.agentVersion] / [PlatformInfo.agentVersion]. -const String omnyShellVersion = '1.52.0'; +const String omnyShellVersion = '1.52.1'; diff --git a/pubspec.yaml b/pubspec.yaml index fd5f8f4..c8ba14d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ description: >- connect to a Hub by node identity (not host:port); the Hub authenticates, authorizes and brokers encrypted sessions to Nodes over WebSocket-on-TLS. Ships Hub, Node, Client and CLI implementations behind first-class Dart APIs. -version: 1.52.0 +version: 1.52.1 repository: https://github.com/OmnyGrid/omnyshell environment: diff --git a/test/unit/dashboard/dashboard_app_test.dart b/test/unit/dashboard/dashboard_app_test.dart index 8375575..03b4eda 100644 --- a/test/unit/dashboard/dashboard_app_test.dart +++ b/test/unit/dashboard/dashboard_app_test.dart @@ -924,6 +924,28 @@ void main() { }, ); + test('node credentials: an empty list clears the loading status', () async { + final term = FakeTerminal(); + final backend = connectedBackend(); // no credentials registered + final running = _app(term, backend).run(); + await pump(); + term.send(enter); // connect + await pump(); + term.send(enter); // open node web-01 + await pump(); + term.send('c'.codeUnits); // open credentials -> empty list + await pump(); + + expect(backend.calls, contains('listGitCredentials:web-01')); + final text = frameText(term.lastFrame); + expect(text, contains('No credentials')); + // The transient "Loading…" status must not linger once the load settles. + expect(text, isNot(contains('Loading credentials'))); + + term.send(ctrlQ); + await running; + }); + test( 'node credentials: a backend error is shown and the TUI stays interactive', () async {