From ceac99c05f180d9008b75c9329822466ff60255b Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 22 Apr 2026 11:28:28 -0500 Subject: feat(v2.9.0): add risk scoring and deterministic insight engine * introduce domain risk assessment with transparent factors * add insight engine for actionable observations * implement cross-domain insights for workflows * improve DNS, subdomain, email, and TLS interpretation * classify change impact severity * include insights and risk in export --- DomainDig/BatchResultsView.swift | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'DomainDig/BatchResultsView.swift') diff --git a/DomainDig/BatchResultsView.swift b/DomainDig/BatchResultsView.swift index 51f6415..c8dde42 100644 --- a/DomainDig/BatchResultsView.swift +++ b/DomainDig/BatchResultsView.swift @@ -73,6 +73,9 @@ struct BatchResultRowView: View { HStack(spacing: 10) { AppStatusBadgeView(model: AppStatusFactory.availability(result.availability)) + if let riskScore = result.riskScore, let riskLevel = result.riskLevel { + Text("Risk \(riskScore) \(riskLevel.title)") + } Text(result.primaryIP ?? "No IP") Text(result.timestamp.formatted(date: .abbreviated, time: .shortened)) } @@ -85,6 +88,12 @@ struct BatchResultRowView: View { .foregroundStyle(.secondary) } + if let changeClassification = result.changeClassification { + Text("Impact: \(changeClassification.title)") + .font(appDensity.font(.caption2)) + .foregroundStyle(changeClassification == .critical ? .red : (changeClassification == .warning ? .yellow : .secondary)) + } + if let errorMessage = result.errorMessage { Text(errorMessage) .font(appDensity.font(.caption2)) @@ -114,10 +123,10 @@ struct BatchResultRowView: View { case .running: return .init(title: "Running", systemImage: "arrow.clockwise", foregroundColor: .cyan, backgroundColor: .cyan.opacity(0.16)) case .completed: - if result.changeSeverity == .high || result.certificateWarningLevel == .critical { - return .init(title: "High", systemImage: "exclamationmark.octagon.fill", foregroundColor: .red, backgroundColor: .red.opacity(0.16)) + if result.changeClassification == .critical || result.certificateWarningLevel == .critical || result.riskLevel == .high { + return .init(title: "Critical", systemImage: "exclamationmark.octagon.fill", foregroundColor: .red, backgroundColor: .red.opacity(0.16)) } - if result.changeSeverity == .medium || result.certificateWarningLevel == .warning { + if result.changeClassification == .warning || result.changeSeverity == .medium || result.certificateWarningLevel == .warning { return .init(title: "Warning", systemImage: "exclamationmark.triangle.fill", foregroundColor: .yellow, backgroundColor: .yellow.opacity(0.16)) } if result.quickStatus == "Changed" { -- cgit v1.2.3