Claude/gym tracking app offline 2qri5t - #51
Closed
fernando13a wants to merge 3 commits into
Closed
fernando13a wants to merge 3 commits into
fernando13a wants to merge 3 commits into
Conversation
…tion Scaffold the IronMind gym-tracking Android app (Kotlin, Compose, Hilt, Room) under IronMind/. This first stage delivers the persistence layer and the Clean Architecture package structure. Data layer (Room): - Entities: ExerciseEntity, RoutineEntity (RoutineSplit: Push/Pull/Legs…), RoutineExerciseCrossRef (many-to-many + prescription), WorkoutSessionEntity, SetLogEntity (weight, reps, RPE, and a free-form notes field for supplements / energy levels for later AI use). - Relations: RoutineWithExercises, SessionWithSets. - WorkoutDao: Flow-based reads, suspend writes, @transaction relation queries, "last set" lookup for progression. - Enum TypeConverters, DB definition with schema export, seed catalog. Architecture & wiring: - domain (pure models + WorkoutRepository contract), data (mappers + WorkoutRepositoryImpl), Hilt modules (Database, Repository, Coroutines). - Compose design tokens: pure-black surface, gold/cyan accents, glassmorphism. - Minimal Hilt Application + themed MainActivity placeholder so the app runs. - Unit test (mappers) + instrumented Room DAO tests. Build: Gradle 8.11.1 wrapper, version catalog, AGP 8.7.3, Kotlin 2.1.0, KSP, Room 2.6.1, Hilt 2.54, Compose BOM. minSdk 26 / target 35 / JDK 17. Note: verified with static checks only (version catalog parsed, sources reviewed); a full assembleDebug requires the Android SDK, absent in this environment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012YaiFyXHFt67jzX79tgvAx
Add the on-device intelligence layer. No network is used; inference runs entirely on-device via the Google AI Edge / MediaPipe LLM Inference API. - LlmInferenceService (domain port) + LlmInferenceManager (data impl): lazily loads the MediaPipe engine on Dispatchers.IO, opens a session per request, and streams the response as Flow<String> via callbackFlow (typewriter effect). AiConstants holds model path + sampling params. - ProgressionPromptBuilder (domain): pure, testable builder that frames the model as a strength coach and lays out the exercise's recent history. - GetProgressionSuggestionUseCase (domain): reads recent set logs from Room, builds the prompt, streams the answer, and emits SuggestionState. - SuggestionState sealed class: Loading / Success(text, isComplete) / Error; Success is re-emitted with accumulating text for the typewriter effect. - WorkoutDao/WorkoutRepository: add getRecentSetLogs(exerciseId, limit) for the AI history window. - AiModule (Hilt) binds the port to the MediaPipe manager. - Enable the mediapipe tasks-genai dependency. - Tests: ProgressionPromptBuilder + GetProgressionSuggestionUseCase (with fakes) covering streaming accumulation, no-history, missing-exercise and missing-model error paths. Note: MediaPipe API tracks tasks-genai 0.10.x; the progress listener is treated as emitting incremental chunks. Verified with static review only — a full build needs the Android SDK (absent here). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012YaiFyXHFt67jzX79tgvAx
…gress) Build the full Jetpack Compose interface on the dark glassmorphism system, wired to Room and the on-device AI via Hilt MVVM ViewModels. Theme & components: - Add Shapes to the theme; reusable components: GlassCard (frosted fill + gold→cyan glowing edge), GlowProgressBar, StatTile, SectionTitle, AccentButton, LabeledValue. - Navigation-compose graph (Dashboard → Session / Progress). Screens + ViewModels (StateFlow<UiState> + collectAsStateWithLifecycle): - Dashboard: training streak (StreakCalculator), live on-device AI suggestion panel (streamed), routine cards with weekly-progress bars. - Session tracking: pick exercise, log weight × reps in real time, sets grouped per exercise, rest timer with 60/90/120s presets (coroutine-driven). - Progress analysis: interactive LoadChart (Canvas) — cyan curve with glow + area fill over a gold field, tap-to-select a point — plus best mark and detailed history. Wiring & support: - DashboardViewModel / SessionViewModel / ProgressViewModel read Room Flows and the GetProgressionSuggestionUseCase; SavedStateHandle carries nav args. - Add WorkoutRepository.getSession(id) for finishing a session. - StreakCalculator (domain) + unit tests. - MainActivity now hosts the NavHost. Note: static review only — a full build/render needs the Android SDK (absent here). MediaPipe API still tracks tasks-genai 0.10.x. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012YaiFyXHFt67jzX79tgvAx
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.
No description provided.