FEATURE: Complete Apple Intelligence workout summary integration - #6
Merged
Conversation
🤖 Added comprehensive AI-powered workout analysis with: - Weekly workout data fetching and processing - Apple Intelligence API integration with structured prompts - Real-time streaming UI with partially generated content - Beautiful card-based summary layout with insights 📊 Key Features: - Fetches completed workouts from past 7 days via DayStorage - Generates personalized insights, trends, and recommendations - Displays key stats, personal records, and areas of concern - Streaming UI updates as AI generates content - Apple Intelligence themed design with floating clouds 🔧 Technical Implementation: - WorkoutSummarizer: Apple Intelligence session management - WorkoutDataFetcher: SwiftData integration with proper date handling - AISummaryView: Comprehensive UI with PartiallyGenerated support - WorkoutSummary: Structured data models for AI analysis 💡 AI Analysis Includes: - Weekly performance overview and key achievements - Volume, strength, and consistency trends - Personal record detection and celebration - Form issues and recovery recommendations - Specific actionable advice for next week 🎨 UI Components: - Motivational headlines and progress summaries - Visual trend indicators and severity markers - Personal record celebration cards - Issue tracking with priority levels - Actionable recommendation cards 🐛 Fixes: - Resolved SwiftData predicate compilation errors - Fixed PartiallyGenerated array handling - Corrected date format matching for DayStorage - Removed unnecessary session breakdown for cleaner UI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review: Apple Intelligence Workout Summary Integration✅ Strengths
🔍 Issues & Recommendations1. Missing Input Validation (Security)
2. Force Unwrapping & Error Handling
3. Performance Concerns
4. Hard-coded Values
5. Missing Test Coverage
|
…rrors 🔄 Reverted Apple Intelligence integration to stable working state: - Removed data compression that was causing context window issues - Restored original detailed workout data format for AI analysis - Removed strategic prewarming optimizations - Back to simple, reliable AI summary generation ✅ Working Features Restored: - Real-time streaming AI workout summaries - Full workout data analysis with detailed set information - Beautiful card-based UI with smooth animations - Error-free generation without context window limits 🎯 Current State: - Stable Apple Intelligence integration - All streaming UI functionality intact - Original prewarm call in setupDataFetcher - Full workout detail preservation for accurate AI insights 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
🤖 Added comprehensive AI-powered workout analysis with:
📊 Key Features:
🔧 Technical Implementation:
💡 AI Analysis Includes:
🎨 UI Components:
🐛 Fixes:
🤖 Generated with Claude Code