Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions BitMatch-iPad/BitMatch_iPadApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ struct BitMatch_iPadApp: App {

init() {
SharedLogger.transferEvent(.appStarted, run: nil)
MetricKitCrashEvidenceCollector.shared.configure(
enabled: UserDefaults.standard.bool(forKey: LocalCrashEvidenceStore.consentKey))
UNUserNotificationCenter.current().delegate = notifDelegate
// Register background task handler (Info.plist contains permitted identifier)
registerBackgroundTasks()
Expand Down
4 changes: 4 additions & 0 deletions BitMatch-iPad/Views/ModularContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ struct SettingsSheetView: View {
.disabled(coordinator.isOperationInProgress || coordinator.isReplayingQueuedTransfer)
}

Section("Diagnostics") {
LocalCrashEvidenceSettingView(settings: generalSettings)
}

Section(GeneralSettingsPresentation.notificationsSection) {
Toggle(GeneralSettingsPresentation.notifyAttention, isOn: $generalSettings.notifyWhenCardNeedsAttention)
Toggle(GeneralSettingsPresentation.notifyFinish, isOn: $generalSettings.notifyWhenTransferOrQueueFinishes)
Expand Down
9 changes: 9 additions & 0 deletions BitMatch/App/BitMatchApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ struct BitMatchApp: App {
#else
let environment = MacAppEnvironment.make()
#endif
#if DEBUG
if !MacUnitTestHost.isRunning() {
MetricKitCrashEvidenceCollector.shared.configure(
enabled: UserDefaults.standard.bool(forKey: LocalCrashEvidenceStore.consentKey))
}
#else
MetricKitCrashEvidenceCollector.shared.configure(
enabled: UserDefaults.standard.bool(forKey: LocalCrashEvidenceStore.consentKey))
#endif
_environment = StateObject(wrappedValue: environment)
_updater = StateObject(wrappedValue: UpdaterController(coordinator: environment.coordinator))
appDelegate.coordinator = environment.coordinator
Expand Down
4 changes: 4 additions & 0 deletions BitMatch/Views/PreferencesWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ struct PreferencesWindow: View {
.disabled(coordinator.isOperationInProgress || coordinator.isReplayingQueuedTransfer)
}

Section("Diagnostics") {
LocalCrashEvidenceSettingView(settings: generalSettings)
}

Section("Updates") {
Toggle(
"Check for updates automatically",
Expand Down
3 changes: 3 additions & 0 deletions BitMatchTests/GeneralSettingsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct GeneralSettingsTests {
#expect(!settings.queueNewCardsAutomatically)
#expect(!settings.autoEjectWhenSafe)
#expect(!settings.playSounds)
#expect(!settings.collectLocalCrashEvidence)
#expect(!settings.notificationPromptWasAnswered)
}

Expand All @@ -64,6 +65,7 @@ struct GeneralSettingsTests {
migrated.queueNewCardsAutomatically = true
migrated.autoEjectWhenSafe = true
migrated.playSounds = true
migrated.collectLocalCrashEvidence = true
migrated.markNotificationPromptAnswered()

let restored = GeneralSettings(defaults: box.defaults)
Expand All @@ -73,6 +75,7 @@ struct GeneralSettingsTests {
#expect(restored.queueNewCardsAutomatically)
#expect(restored.autoEjectWhenSafe)
#expect(restored.playSounds)
#expect(restored.collectLocalCrashEvidence)
#expect(restored.notificationPromptWasAnswered)
}

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.

- Mac: The menu bar shows the current transfer and its destinations, or the most recent result when idle. Closing the main window during a transfer hides it while the work continues; Open BitMatch brings the same window back. Quit still asks before stopping active work.
- Expanded transfer details show bytes written and read back for each destination, with separate live rates. These are measurements of active file I/O, not a drive-health or verification verdict.
- Optional local Apple crash and hang summaries can be added to a diagnostics export. This is off by default, never uploaded by BitMatch, and Apple may not deliver a report.
- Keep copy and verification failures below 100% in live progress; the engine emits “Complete” only when all selected files pass the chosen mode. The final safety verdict still includes later ASC MHL and report steps.
- Ignore a disappearing root `.fseventsd` metadata directory during card scans without hiding ordinary files. A regular source file with that name now contributes to the source fingerprint.
- Bound saved JSON, MHL and adjacent checksum-manifest reads during loading. Damaged, oversized, conflicting or empty adjacent records are reported instead of silently falling back to partial evidence, including when another companion looks valid.
Expand Down
Loading
Loading