diff options
| author | Christian Cleberg <[email protected]> | 2026-04-22 09:47:24 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-22 09:47:24 -0500 |
| commit | 7b41195620eadd54d25fa98dcd36735cba906ba3 (patch) | |
| tree | 929a791a4c2fd3278f98c17c0ae5476940a01312 /DomainDig/WatchlistView.swift | |
| parent | 36ea668d7fc9070770973b0bc329f4319bf43cab (diff) | |
| download | domain-dig-7b41195620eadd54d25fa98dcd36735cba906ba3.tar.gz domain-dig-7b41195620eadd54d25fa98dcd36735cba906ba3.tar.bz2 domain-dig-7b41195620eadd54d25fa98dcd36735cba906ba3.zip | |
feat(v2.7.0): add provenance, confidence, and reproducibility metadata
* add result provenance across major sections
* introduce confidence levels for ambiguous outputs
* distinguish observed facts from inferred summaries
* expand snapshot metadata for reproducibility
* improve error classification and partial snapshot handling
* include provenance and confidence in export
* add local notes for tracked domains and history
Diffstat (limited to 'DomainDig/WatchlistView.swift')
| -rw-r--r-- | DomainDig/WatchlistView.swift | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/DomainDig/WatchlistView.swift b/DomainDig/WatchlistView.swift index 0874956..d58061f 100644 --- a/DomainDig/WatchlistView.swift +++ b/DomainDig/WatchlistView.swift @@ -334,6 +334,7 @@ struct TrackedDomainDetailView: View { @State private var noteDraft = "" @State private var isEditingNote = false + @State private var showRerunOptions = false private var liveTrackedDomain: TrackedDomain { viewModel.trackedDomains.first(where: { $0.id == trackedDomain.id }) ?? trackedDomain @@ -365,7 +366,7 @@ struct TrackedDomainDetailView: View { } Button { - viewModel.rerunInspection(for: liveTrackedDomain) + showRerunOptions = true } label: { Label("Re-run Inspection", systemImage: "magnifyingglass") } @@ -394,7 +395,14 @@ struct TrackedDomainDetailView: View { if !latestDiffSections.isEmpty { Section("Latest Diff") { - DomainDiffView(title: "Latest Snapshot vs Previous", sections: latestDiffSections, showsUnchanged: false) + DomainDiffView( + title: "Latest Snapshot vs Previous", + sections: latestDiffSections, + contextNote: latestSnapshots.count >= 2 + ? DomainDiffService.comparisonContextNote(from: latestSnapshots[1].snapshot, to: latestSnapshots[0].snapshot) + : nil, + showsUnchanged: false + ) } .listRowBackground(Color.clear) } @@ -430,6 +438,19 @@ struct TrackedDomainDetailView: View { .onChange(of: viewModel.rerunNavigationToken) { _, _ in dismiss() } + .confirmationDialog("Re-run inspection", isPresented: $showRerunOptions) { + Button("Run with Current Settings") { + viewModel.rerunInspection(for: liveTrackedDomain, useSnapshotResolver: false) + } + if latestSnapshots.first != nil { + Button("Run with Snapshot Resolver") { + viewModel.rerunInspection(for: liveTrackedDomain, useSnapshotResolver: true) + } + } + Button("Cancel", role: .cancel) {} + } message: { + Text(viewModel.resolverMismatchNote(for: liveTrackedDomain) ?? "Choose how to reproduce the most recent snapshot.") + } .sheet(isPresented: $isEditingNote) { NavigationStack { Form { |
