feat(activity): improve weightlifting exercise selection - #460
timothydjon wants to merge 4 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: OpenStrap/edge/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe strength catalogue combines 18 hand-written entries with generated wger data. It supports localized search, attribution, and offline exercise selection. Live strength sessions restore and persist exercise plans. Users can add or change exercises, and set logging requires an active selection. History retrieval and summary labels use updated paths. ChangesStrength Exercise Catalogue and Workouts
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant User
participant StrengthScreen
participant ExercisePicker
participant Catalogue
User->>StrengthScreen: Choose, add, or change exercise
StrengthScreen->>ExercisePicker: Open picker with mode and exercise keys
ExercisePicker->>Catalogue: Search or filter exerciseLibrary
Catalogue-->>ExercisePicker: Return matching exercises
User->>ExercisePicker: Select exercise
ExercisePicker-->>StrengthScreen: Return selected exercise key
Merge Risk: ⚪ Minimal · up to The offline catalogue and exercise-selection changes have no identified merge-blocking issue in the supplied evidence. Merge after normal checks confirm the generated catalogue and workout behavior. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 4 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Sorry @timothydjon, your pull request is larger than the review limit of 150,000 diff characters
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
One critical and four moderate unresolved issues affect catalogue trust, picker correctness, persistence, scope, and localization.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds an offline, searchable strength-exercise catalogue with localized labels, exercise switching, draft persistence, and batched history loading.
Changes:
- Vendors and validates attributed wger catalogue data.
- Adds search, category filters, replacement, and multi-exercise plans.
- Updates history queries, summaries, localization, notices, and tests.
Review findings:
- Critical —
tool/update_wger_exercises.dart: redirects can bypass the wger-only trust boundary. - Moderate —
lib/ui2/activity/exercise_picker.dart: search ignores the selected category filter. - Moderate —
lib/ui2/activity/live.dart: plan and active index persistence is not atomic. - Moderate —
tool/update_wger_exercises.dart: non-strength activities are included in the strength picker. - Moderate —
tool/update_wger_exercises.dart: Hindi translations are omitted despite Hindi being supported.
| File | Description |
|---|---|
tool/update_wger_exercises.dart |
Generates and validates the offline exercise catalogue. |
test/ui2_activity_test.dart |
Tests catalogue, picker, and session behavior. |
test/db_strength_schema_test.dart |
Tests strength-history query behavior. |
NOTICE.md |
Documents wger attribution and licensing. |
lib/ui2/screens/workout_screen.dart |
Loads batched history and localized exercise names. |
lib/ui2/activity/summary.dart |
Displays localized exercise summaries. |
lib/ui2/activity/live.dart |
Manages exercise plans, switching, and draft restoration. |
lib/ui2/activity/exercise_picker.dart |
Provides searchable exercise selection and filters. |
lib/ui2/activity/catalogue.dart |
Defines catalogue models and legacy exercises. |
lib/l10n/app_zh.arb |
Adds picker translations for Chinese. |
lib/l10n/app_hi.arb |
Adds picker translations for Hindi. |
lib/l10n/app_fr.arb |
Adds picker translations for French. |
lib/l10n/app_es.arb |
Adds picker translations for Spanish. |
lib/l10n/app_en.arb |
Adds picker translations for English. |
lib/l10n/app_de.arb |
Adds picker translations for German. |
lib/data/db.dart |
Adds aggregate strength-history queries. |
docs/notice.html |
Publishes catalogue attribution details. |
.gitattributes |
Marks generated catalogue data. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| final request = await client.getUrl(next); | ||
| request.headers.set(HttpHeaders.acceptHeader, 'application/json'); | ||
| final response = await request.close(); |
9b6b8cd to
00ecd05
Compare

Why
Weightlifting tracking has a short exercise list and no clear way to change an exercise after choosing it. This adds a searchable offline lifting catalogue and a safe change/add flow within strength sessions.
Scope
The additions are lifting/resistance exercises, confined to the existing sets-based strength flow. Edge already shares that flow between weight training, powerlifting, bodyweight, calisthenics, and functional sessions; this PR keeps that routing. The main workout/activity catalogue and the running, cycling, swimming, yoga, and HIIT screens are unchanged. No cardio, stretching, yoga, or breathing entries are added to the exercise picker.
Behavior
Catalogue
tool/wger_weightlifting_selection.dart. Refreshes cannot automatically add unreviewed records, even if wger places them in a lifting-related category. Missing records, renamed labels, duplicate UUIDs, or non-lifting categories stop the refresh for review.The generated snapshot is 5,398 lines / 156,079 bytes and is marked as generated for GitHub review. Retained records are unchanged from the earlier snapshot; this revision removes unrelated activities rather than adding fresh upstream content.
Implementation
Validation
flutter test --no-pub --concurrency=1: 4,146 passed, 462 skipped.flutter analyze --no-pub: no issues found.git diff --check: clean.Summary by CodeRabbit