Bug fixes: UI rubric tests, HealthKit retry, flaky tests, swipe bypass, dead buttons#18
Merged
Bug fixes: UI rubric tests, HealthKit retry, flaky tests, swipe bypass, dead buttons#18
Conversation
Add per-engine timing and trace upload to Firestore for remote quality baselining. Each dashboard refresh records computed scores, confidence levels, and durations — never raw HealthKit values — tied to a SHA256- hashed Apple Sign-In user ID. - Add Firebase SDK (FirebaseFirestore) to iOS target via SPM - Create PipelineTrace model with per-engine sub-structs - Create EngineTelemetryService singleton for Firestore uploads - Create FirestoreAnalyticsProvider for general analytics events - Instrument DashboardViewModel.refresh() with per-engine timing - Add telemetry consent toggle in Settings (always on in DEBUG) - Initialize Firebase and telemetry service at app startup
…l docs - Add launch free year: all users get full Coach access for 1 year from first sign-in with no subscription required - Add LaunchCongratsView shown once after first sign-in - Update Settings subscription section to show free year status with days remaining instead of upgrade button - Add Firestore telemetry integration tests that upload mock health data through all 9 engines and read back to validate - Add privacy policy and terms of service covering HealthKit, Firebase telemetry, push notifications, and solo dev protections - Add GoogleService-Info.plist to .gitignore
- Add FeedbackService for bug report and feature request upload to Firestore - Add in-app feature request sheet in Settings (replaces external link) - Upload bug reports to Firestore alongside email fallback - Add InputSummaryTrace for categorized health stats in telemetry (HealthKit 5.1.3 compliant) - Add debug trace JSON export with raw data + engine outputs via share sheet - Change Trends metric picker from horizontal scroll to two-row grid - Show numerical scores in Thump Check status pills (Recovery, Activity, Stress) - Add E2E Firestore integration tests for feedback uploads
- Split HeartModels.swift (1,797→646 lines) into 4 domain files: StressModels, ActionPlanModels, UserModels, WatchSyncModels - Extract StressView.swift (1,251→470 lines) into 3 sub-view files: StressHeatmapViews, StressTrendChartView, StressSmartActionsView - Extract InsightsHelpers pure functions from InsightsView - Add ThumpFormatters shared DateFormatter enum (DRY fix for 8 duplicates) - Add 10 new test files with 223 tests covering models, services, ring buffer, observability, performance, and stability - Bump CI MIN_TEST_COUNT from 833 to 1,050 - Shared HKHealthStore singleton, swiftlint fixes, access control fixes
- Recovery context banner now navigates to Stress tab on tap - Readiness badge opens pillar breakdown sheet instead of Insights - Add metric explainer text in Trends chart card (RHR, HRV, etc.) - Switch metric picker to LazyVGrid for even spacing across 3 columns
- Add week-over-week RHR and recovery trend banner in Thump Check card - Show metric impact labels on buddy recommendations (e.g. "Improves VO2 max") - Add CardButtonStyle with press feedback for tappable cards - Make How You Recovered card and trend banner navigate to Trends tab - Replace .buttonStyle(.plain) with CardButtonStyle on metric tiles and buddy cards
New test files covering all clickable elements, data accuracy rules, Design A/B parity, edge cases, and component views across 12 screens. Includes RubricV2CoverageTests (104 tests), ClickableDataFlowTests (101), DesignABDataFlowTests (52), plus model/VM test suites with simulator fallback support.
After onboarding, HealthKit authorization may not have fully propagated by the time the dashboard fires concurrent queries. Add retry-once logic that re-requests authorization and waits 500ms before retrying snapshot and history fetches on device.
- testPartialNilMetrics: provide non-nil HRV to avoid simulator fallback replacing the test snapshot with mock data - testReadiness_missingPillars: engine derives activityBalance from sleep-only snapshot, so 2 pillars are produced (not 1)
Add DragGesture consumer to block horizontal swipe navigation and an onChange gate that clamps currentPage back to 1 if the user hasn't granted HealthKit access yet.
Both buttons fell through to default:break in handleGuidanceAction, doing nothing on tap. Focus Time now starts a breathing session, Stretch shows a walk/movement suggestion.
cortexark
added a commit
that referenced
this pull request
Mar 19, 2026
…s, dead buttons (#18) * feat: add Firebase Firestore engine telemetry Add per-engine timing and trace upload to Firestore for remote quality baselining. Each dashboard refresh records computed scores, confidence levels, and durations — never raw HealthKit values — tied to a SHA256- hashed Apple Sign-In user ID. - Add Firebase SDK (FirebaseFirestore) to iOS target via SPM - Create PipelineTrace model with per-engine sub-structs - Create EngineTelemetryService singleton for Firestore uploads - Create FirestoreAnalyticsProvider for general analytics events - Instrument DashboardViewModel.refresh() with per-engine timing - Add telemetry consent toggle in Settings (always on in DEBUG) - Initialize Firebase and telemetry service at app startup * feat: 1-year free launch offer, Firestore integration tests, and legal docs - Add launch free year: all users get full Coach access for 1 year from first sign-in with no subscription required - Add LaunchCongratsView shown once after first sign-in - Update Settings subscription section to show free year status with days remaining instead of upgrade button - Add Firestore telemetry integration tests that upload mock health data through all 9 engines and read back to validate - Add privacy policy and terms of service covering HealthKit, Firebase telemetry, push notifications, and solo dev protections - Add GoogleService-Info.plist to .gitignore * feat: feedback forms, telemetry summaries, debug export, UI fixes - Add FeedbackService for bug report and feature request upload to Firestore - Add in-app feature request sheet in Settings (replaces external link) - Upload bug reports to Firestore alongside email fallback - Add InputSummaryTrace for categorized health stats in telemetry (HealthKit 5.1.3 compliant) - Add debug trace JSON export with raw data + engine outputs via share sheet - Change Trends metric picker from horizontal scroll to two-row grid - Show numerical scores in Thump Check status pills (Recovery, Activity, Stress) - Add E2E Firestore integration tests for feedback uploads * refactor: code quality improvements, model domain split, 223 new tests - Split HeartModels.swift (1,797→646 lines) into 4 domain files: StressModels, ActionPlanModels, UserModels, WatchSyncModels - Extract StressView.swift (1,251→470 lines) into 3 sub-view files: StressHeatmapViews, StressTrendChartView, StressSmartActionsView - Extract InsightsHelpers pure functions from InsightsView - Add ThumpFormatters shared DateFormatter enum (DRY fix for 8 duplicates) - Add 10 new test files with 223 tests covering models, services, ring buffer, observability, performance, and stability - Bump CI MIN_TEST_COUNT from 833 to 1,050 - Shared HKHealthStore singleton, swiftlint fixes, access control fixes * feat: readiness breakdown sheet, metric explainers, and layout fixes - Recovery context banner now navigates to Stress tab on tap - Readiness badge opens pillar breakdown sheet instead of Insights - Add metric explainer text in Trends chart card (RHR, HRV, etc.) - Switch metric picker to LazyVGrid for even spacing across 3 columns * feat: week-over-week trends, metric impact tags, and UX affordance fixes - Add week-over-week RHR and recovery trend banner in Thump Check card - Show metric impact labels on buddy recommendations (e.g. "Improves VO2 max") - Add CardButtonStyle with press feedback for tappable cards - Make How You Recovered card and trend banner navigate to Trends tab - Replace .buttonStyle(.plain) with CardButtonStyle on metric tiles and buddy cards * Add comprehensive UI rubric test coverage (1,530 tests) New test files covering all clickable elements, data accuracy rules, Design A/B parity, edge cases, and component views across 12 screens. Includes RubricV2CoverageTests (104 tests), ClickableDataFlowTests (101), DesignABDataFlowTests (52), plus model/VM test suites with simulator fallback support. * Fix HealthKit auth race condition with retry on dashboard refresh After onboarding, HealthKit authorization may not have fully propagated by the time the dashboard fires concurrent queries. Add retry-once logic that re-requests authorization and waits 500ms before retrying snapshot and history fetches on device. * Fix 2 flaky test expectations - testPartialNilMetrics: provide non-nil HRV to avoid simulator fallback replacing the test snapshot with mock data - testReadiness_missingPillars: engine derives activityBalance from sleep-only snapshot, so 2 pillars are produced (not 1) * Prevent swipe bypass on HealthKit onboarding page Add DragGesture consumer to block horizontal swipe navigation and an onChange gate that clamps currentPage back to 1 if the user hasn't granted HealthKit access yet. * Fix dead Focus Time and Stretch guidance buttons on Stress screen Both buttons fell through to default:break in handleGuidanceAction, doing nothing on tap. Focus Time now starts a breathing session, Stretch shows a walk/movement suggestion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan