fix(doctor): honest module count, temp-path audit warning, connection line
Some checks are pending
Security / Security check (push) Waiting to run
Some checks are pending
Security / Security check (push) Waiting to run
Three doctor-page findings from the usertest panel: - Module tile no longer counts the hub's built-in 'system' pseudo-module — a fresh hub shows 0 modules, matching the welcome checklist's definition of an install. Counting is a top-level function with unit tests. - When the audit DB lives in an OS-cleanable temp directory (/var/folders, /tmp, Windows Temp), the daemon-files panel says so instead of presenting the state as healthy. The classifier is a top-level function with unit tests. - The daemon card states who-talks-to-whom-how in one line: endpoint, transport security (TLS / unencrypted-local / unencrypted), and whether a bearer token is attached (length only) — the auditor's baseline the green dot cannot answer. Also syncs pubspec.yaml (0.70.0 -> 0.72.0) with kStudioVersion, which had drifted to 0.71.0 while pubspec stayed behind. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
afa3fa7eae
commit
703d961cec
10 changed files with 303 additions and 3 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/// Studio's own build version. Bump on every UI release so the
|
||||
/// running app self-identifies.
|
||||
const String kStudioVersion = '0.71.0';
|
||||
const String kStudioVersion = '0.72.0';
|
||||
|
||||
const String kProductName = 'Ch∆In Studio';
|
||||
const String kVendorName = 'Flemming.AI (F∆I)';
|
||||
|
|
|
|||
|
|
@ -1238,7 +1238,7 @@ class HubService {
|
|||
final paths = results[5] as DaemonPathsResponse;
|
||||
|
||||
// Module count = distinct module_name across capabilities.
|
||||
final moduleNames = <String>{for (final c in caps) c.moduleName};
|
||||
final moduleNames = installedModuleNames(caps);
|
||||
|
||||
// Per-source-kind breakdown (0.12+). Pre-0.12 hubs return
|
||||
// empty `source_kind` strings — group those under `kind`
|
||||
|
|
@ -1306,6 +1306,17 @@ class UpdateStatus {
|
|||
});
|
||||
}
|
||||
|
||||
/// Distinct installed-module names behind a capability list.
|
||||
/// Excludes the hub's built-in `system` pseudo-module
|
||||
/// (`builtin_capabilities` reports `module_name: "system"`):
|
||||
/// the welcome checklist already treats `system.*` as "built
|
||||
/// in, not an install", and the doctor tile must count the
|
||||
/// same way — a fresh hub shows 0 modules, not 1.
|
||||
Set<String> installedModuleNames(Iterable<CapabilityEntry> caps) => {
|
||||
for (final c in caps)
|
||||
if (c.moduleName != 'system') c.moduleName,
|
||||
};
|
||||
|
||||
class DoctorSnapshot {
|
||||
final int moduleCount;
|
||||
final int capabilityCount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue