Remove #if DEBUG guards for TestFlight, polish weekly digest and insights UX

- Remove #if DEBUG from all debug settings, exporters, and IAP bypass so
  debug options are available in TestFlight builds
- Weekly digest card: replace dismiss X with collapsible chevron caret
- Weekly digest: generate on-demand when opening Insights tab if no cached
  digest exists (BGTask + notification kept as bonus path)
- Fix digest intention text color (was .secondary, now uses theme textColor)
- Add "Generate Weekly Digest" debug button in Settings
- Add generating overlay on Insights tab with pulsing sparkles icon that
  stays visible until all sections finish loading (content at 0.2 opacity)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-04-04 11:15:23 -05:00
parent ab8d8fbdc0
commit 329fb7c671
16 changed files with 232 additions and 117 deletions

View File

@@ -4,8 +4,6 @@
//
// Exportable insights views with sample AI-generated insights for screenshots.
//
#if DEBUG
import SwiftUI
// MARK: - Sample Insights Data
@@ -377,4 +375,3 @@ struct ExportableInsightsContainer<Content: View>: View {
.background(backgroundColor)
}
}
#endif

View File

@@ -5,8 +5,6 @@
// Exportable watch views that match the real watchOS layouts.
// These views accept tint/icon configuration as parameters for batch export.
//
#if DEBUG
import SwiftUI
// MARK: - Watch Export Configuration
@@ -362,4 +360,3 @@ struct ExportableComplicationContainer<Content: View>: View {
.clipShape(isCircular ? AnyShape(Circle()) : AnyShape(RoundedRectangle(cornerRadius: 12, style: .continuous)))
}
}
#endif

View File

@@ -5,8 +5,6 @@
// Exportable widget views that match the real WidgetKit widgets pixel-for-pixel.
// These views accept tint/icon configuration as parameters for batch export.
//
#if DEBUG
import SwiftUI
// MARK: - Widget Theme Configuration
@@ -691,4 +689,3 @@ struct ExportableWidgetContainer<Content: View>: View {
.clipShape(RoundedRectangle(cornerRadius: 24, style: .continuous))
}
}
#endif

View File

@@ -5,7 +5,6 @@
// Debug utility to export insights view screenshots with sample AI data.
//
#if DEBUG
import SwiftUI
import UIKit
@@ -100,4 +99,3 @@ class InsightsExporter {
}
}
}
#endif

View File

@@ -5,7 +5,6 @@
// Debug utility to export sharing template screenshots.
//
#if DEBUG
import SwiftUI
import UIKit
@@ -173,4 +172,3 @@ class SharingScreenshotExporter {
return false
}
}
#endif

View File

@@ -6,7 +6,6 @@
// Uses the exportable watch views from ExportableWatchViews.swift.
//
#if DEBUG
import SwiftUI
import UIKit
@@ -247,4 +246,3 @@ class WatchExporter {
}
}
}
#endif

View File

@@ -6,7 +6,6 @@
// Uses the real widget view layouts from ExportableWidgetViews.swift.
//
#if DEBUG
import SwiftUI
import UIKit
@@ -389,4 +388,3 @@ class WidgetExporter {
}
}
}
#endif