feat(ui): module-detail bottom sheet on tap

Tapping a module card on the Modules page slides up a detail
sheet showing the full manifest data: directory path
(monospaced + selectable), every capability with version, and
every declared permission with a semantic icon (net = globe,
fs.read = folder, fs.write = edit, env = terminal, hub =
shield).

Empty permission list shows "(none — pure-computation module)"
explicitly — the operator should see *why* a module needed
zero perms, not be left guessing.

Backed by HubAdmin.ModuleInfo. New widget FaiModuleSheet with a
small drag-handle, FutureBuilder for the load state, error
surfacing if the RPC fails.

Bumps fai_studio 0.5.0 -> 0.6.0.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-05 22:15:41 +02:00
parent 521a8baab8
commit b3fdd69139
4 changed files with 272 additions and 1 deletions

View file

@ -76,6 +76,20 @@ class HubService {
..sort((a, b) => a.name.compareTo(b.name));
}
/// Fully-detailed manifest for one installed module.
Future<ModuleDetail> moduleInfo(String name) async {
final r = await _client.moduleInfo(name);
return ModuleDetail(
name: r.name,
version: r.version,
capabilities: r.provides
.map((c) => '${c.namespace}.${c.name}@${c.versionReq}')
.toList(),
permissions: r.permissions,
directory: r.directory,
);
}
Future<List<AuditEvent>> recentEvents({
int limit = 50,
List<String> types = const [],
@ -216,6 +230,22 @@ class ModuleSummary {
});
}
class ModuleDetail {
final String name;
final String version;
final List<String> capabilities;
final List<String> permissions;
final String directory;
const ModuleDetail({
required this.name,
required this.version,
required this.capabilities,
required this.permissions,
required this.directory,
});
}
class AuditEvent {
final String eventId;
final DateTime timestamp;