feat(hub): list installed capabilities from the connected hub

HubCapabilitiesCard wires HubClient.listCapabilities() into the
hub-status page below the connection form: once the app starts
in hub mode and the connection is healthy, the card shows
capability@version, the providing module, and its kind for
every entry the hub reports.

In mock mode the card prints an explanatory hint instead of
loading, so no confusing empty-state appears when the user is
just browsing the demo data.

A small refresh-icon next to the heading lets the user re-poll
without a full page reload — useful right after a chain install
in another terminal.

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-06-18 11:47:28 +02:00
parent 39733628b6
commit cf0ee4fd7a
2 changed files with 131 additions and 0 deletions

View file

@ -4,6 +4,7 @@ import '../data/hub_endpoint.dart';
import '../data/hub_repository.dart';
import '../data/repository.dart';
import '../theme/lawheatmap_tokens.dart';
import '../widgets/hub_capabilities_card.dart';
import '../widgets/lawheatmap_card.dart';
/// Hub connection + settings. Read-only summary at the top, then
@ -238,6 +239,8 @@ class _HubStatusPageState extends State<HubStatusPage> {
),
),
const SizedBox(height: LawHeatmapSpace.lg),
HubCapabilitiesCard(repository: repo),
const SizedBox(height: LawHeatmapSpace.lg),
LawHeatmapCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,