feat: Watch app UI upgrade, engine fixes, and production readiness#10
Merged
feat: Watch app UI upgrade, engine fixes, and production readiness#10
Conversation
- Golden thriving with bodybuilder flex arms (connected to body) - Green content with static golden monk halo - Amber nudging, orange stressed with big sweat drop - Purple tired on cot with pillow, closed eyes, Zzz particles - Green celebrating with sparkles - Red active with energy rings - Golden conquering with flag and confetti - 1.5x bigger eyes with Baymax signature connecting line - Dual sparkle highlights per eye for depth - No spinning auras — all static ambient effects - Arms render behind body (Duolingo wing technique) - Remove temporary Buddy gallery tab, restore Home as default
… polish Watch complications (6 total): - Readiness gauge (circular), Quick Breathe launcher (circular) - HRV trend sparkline (rectangular), Coaching nudge (inline) - Stress heatmap with Activity/Breathe actions (rectangular) - All widgets refresh via shared UserDefaults app group Siri shortcuts (AppIntents): - "How's my stress?" — returns stress level + suggestion - "Start breathing" — opens app for guided breathing - "What's my readiness?" — returns score + coaching tip Watch app screens (6-screen architecture): - Screen 0: Hero score + buddy + nudge - Screen 1: Readiness 5-pillar breakdown - Screen 2: Walk suggestion with step count + ThumpBuddy nudging - Screen 3: Stress indicator with buddy emoji + heatmap + breathe on active stress - Screen 4: Sleep with ThumpBuddy tired + hours + quality - Screen 5: Trends with HRV/RHR + coaching + streak ThumpBuddy interactions: - Tap to cycle through all 8 moods with haptic + squish bounce + speech bubble - Long press to pet: inflates 2.08x, eyes close, reverts after 2s - Cycle persists across auto-reverts (no more tap-timing bug) - Speech bubbles with mood-aware random lines Visual fixes: - Removed all flickering AngularGradient rings from auras and sphere - Static rim highlight replaces rotating innerLightPhase ring - Sleep Z's on both sides, 3x larger, clear of face - Daily check-in disappears after selection (no persistent card) - Removed all "Baymax" references from codebase Infrastructure: - App group entitlements for iOS + watchOS - AppIntents framework added to both targets - ThumpSharedKeys moved to Shared/ for cross-target access
NudgeGenerator fixes: - Fix Date() wall clock in selectLowDataNudge — now uses current.date for deterministic selection matching all other select methods - Fix .moderate category misuse in lowDataNudgeLibrary — onboarding prompts now use .seekGuidance (they're "wear watch to sleep" / "check sync", not exercise recommendations) SmartNudgeScheduler conflict guard: - Add readinessGate parameter to recommendAction/recommendActions - When readiness is .recovering, suppress .activitySuggestion and replace with .restSuggestion — prevents contradicting NudgeGenerator's safety decisions - Stress-driven actions (journal, breathe, bedtime) always pass the guard — they're acute responses, not contradictions Cross-system wiring: - DashboardViewModel broadcasts readiness level via NotificationCenter when assessment updates - StressViewModel listens and passes readinessGate to scheduler - Both systems now agree: if readiness says rest, no activity suggestion appears on any screen Widget/complication fixes: - HRV Trend widget now receives data (updateHRVTrendWidget fetches today's HRV from HealthKit and accumulates 7-day rolling values) - Readiness widget uses recoveryContext.readinessScore when available - Siri StartBreathing sets deep link flag, MainTabView navigates to Stress tab on foreground New tests: - Regression + recovering readiness must NOT return .moderate - Regression + primed readiness allows full library - Low-data nudge determinism for same date - Anomaly 0.5 boundary (positive vs default path)
Watch App: - 7→6 screen architecture based on competitive research (WHOOP/Oura/Athlytic) - Score-first hero screen (48pt cardio score + buddy + nudge pill) - New readiness breakdown screen (5 animated pillar bars) - Simplified stress (buddy emoji + 6hr heatmap), sleep (big hours + trend bars), trends (HRV/RHR + coaching + streak) Engine Fixes (BUG-056 to BUG-063): - ReadinessEngine: activity balance fallback when yesterday missing - CoachingEngine: pass referenceDate to weeklyZoneSummary - NudgeGenerator: remove moderate from regression library, add readiness gate - HeartTrendEngine: accept real stressScore parameter (was hardcoded proxy) - BioAgeEngine: use actual height when available (heightM added to HeartSnapshot) - SmartNudgeScheduler: widen sleep estimation for shift workers (wake 3-14, was 5-12) - NudgeGenerator: deterministic low-data nudge selection Tests: - 46 new tests (ProductionReadinessTests + RealWorldDataTests) - 10 clinical personas + real Apple Watch export data (32 days) - Edge cases: sensor spikes, gap days, weekend warrior, medication start - 773 total tests, 0 failures
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
What's included
backup/watch-app-ui-upgrade-2026-03-14Test plan
swift testpasses (ThumpTests + ThumpTimeSeriesTests)xcodebuildiOS build succeedsxcodebuildwatchOS build succeeds