feat(debug): add bulk share image export and stadium visit tools

Adds debug-only DebugShareExporter that bulk-exports ~298 shareable
image variations (achievement cards, progress cards, trip cards, icons)
to Documents/DebugExport/ for visual QA. Also adds a button to populate
all stadium visits for testing the fully-unlocked app state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-09 12:39:20 -06:00
parent e6ed766ccd
commit 1a7ce78ae4
2 changed files with 642 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ struct SettingsView: View {
#if DEBUG
@State private var selectedSyncStatus: EntitySyncStatus?
@State private var showSyncLogs = false
@State private var exporter = DebugShareExporter()
@State private var showExportProgress = false
#endif
var body: some View {
@@ -348,12 +350,30 @@ struct SettingsView: View {
} label: {
Label("Reset Onboarding Flag", systemImage: "arrow.counterclockwise")
}
Button {
showExportProgress = true
Task {
await exporter.exportAll(modelContext: modelContext)
}
} label: {
Label("Export All Shareables", systemImage: "square.and.arrow.up.on.square")
}
Button {
Task { await exporter.addAllStadiumVisits(modelContext: modelContext) }
} label: {
Label("Add All Stadium Visits", systemImage: "mappin.and.ellipse")
}
} header: {
Text("Debug")
} footer: {
Text("These options are only visible in debug builds.")
}
.listRowBackground(Theme.cardBackground(colorScheme))
.sheet(isPresented: $showExportProgress) {
DebugExportProgressView(exporter: exporter)
}
}
private var syncStatusSection: some View {