Skip to content

feat: Watch app UI upgrade, engine fixes, and production readiness#10

Merged
cortexark merged 4 commits intomainfrom
feature/watch-app-ui-upgrade
Mar 15, 2026
Merged

feat: Watch app UI upgrade, engine fixes, and production readiness#10
cortexark merged 4 commits intomainfrom
feature/watch-app-ui-upgrade

Conversation

@cortexark
Copy link
Copy Markdown
Owner

Summary

  • Watch app UX redesign with complications, Siri shortcuts, and live face view
  • Premium Baymax character with 8 mood-specific animations
  • Nudge conflict guard between systems + engine bug fixes
  • Production readiness tests, crash probes, and real-world data tests
  • Buddy interactions, UI polish, and shared app intents

What's included

  • 4 rebased commits on top of latest main (all CI fixes incorporated)
  • Backup branch: backup/watch-app-ui-upgrade-2026-03-14

Test plan

  • swift test passes (ThumpTests + ThumpTimeSeriesTests)
  • xcodebuild iOS build succeeds
  • xcodebuild watchOS build succeeds
  • CI pipeline passes on this PR

- 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
@cortexark cortexark merged commit b9f754e into main Mar 15, 2026
1 check failed
@cortexark cortexark deleted the feature/watch-app-ui-upgrade branch March 15, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant