Tier 0: render what the services already decided, honestly

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 00:24:30 -04:00
parent be0e55214b
commit 8b1205e4b8
38 changed files with 1474 additions and 260 deletions
@@ -8,41 +8,36 @@ SettingsCard {
objectName: "health-summary"
implicitHeight: 126
readonly property int observationCount: Health.summary.warnings + Health.summary.errors
readonly property string heroTitle: {
if (Health.diagnosticUnavailable)
return "Health check unavailable";
if (Health.checks.length === 0)
return "Checking the desktop";
if (Health.status === "error")
return "Action required";
if (Health.status === "warning")
return "Needs attention";
return "Healthy";
}
// The verdict itself is Health's, not this card's — see Health.headlineState
// for why it can only be decided in one place. This card renders it and
// adds the long-form detail underneath.
readonly property int observationCount: Health.observationCount
readonly property string heroTitle: Health.headline
readonly property string heroDetail: {
if (Health.diagnosticUnavailable)
switch (Health.headlineState) {
case "unavailable":
return Health.lastError || "The latest health check could not be completed.";
if (Health.checks.length === 0)
case "checking":
return "Checking the desktop services, tools, and integrations this app owns.";
if (Health.status === "error")
case "error":
return root.observationCount === 1
? "One part of the desktop needs action."
: `${root.observationCount} parts of the desktop need action.`;
if (Health.status === "warning")
case "warning":
return root.observationCount === 1
? "Your desktop is working. One feature needs a decision."
: `Your desktop is working. ${root.observationCount} features need a decision.`;
return "Desktop services and tools are working normally.";
default:
return "Desktop services and tools are working normally.";
}
}
readonly property color statusColor: {
if (Health.diagnosticUnavailable || Health.status === "error")
return Theme.danger;
if (Health.status === "warning")
return Theme.warn;
if (Health.checks.length === 0)
return Theme.fgMuted;
return Theme.ok;
switch (Health.tone) {
case "danger": return Theme.danger;
case "warn": return Theme.warn;
case "muted": return Theme.fgMuted;
default: return Theme.ok;
}
}
function scanTime(): string {