Repository navigation
Release v1.6.0-beta.3
Pre-release
Pre-release
Added
- Health Connect strength set segments (Issue #737): Export completed strength workout sets as
ExerciseSegmententries with repetitions, load, exercise type, and set indexes. Existing Health Connect workouts receive a one-time idempotent payload upgrade that reuses their record identities. - Added a dedicated English/German About page with the creator's first-person project story, user-focused release timeline, shared site navigation and working theme/language controls.
- Added persistent right-side scroll indicators to workout history, body measurements, and nutrition statistics.
- Added an English User Guide section to the public documentation structure, with a task-based topic map for workouts, plans, nutrition, statistics, notifications, and data import/export.
- Added 13 practical English User Guide articles covering setup, workouts, plans, nutrition, measurements, statistics, Live Activities, notifications, import, CSV preparation, and backups/exports.
- Expanded the English User Guide with task pages for routines, exercise search, workout history, saved recipes, AI meal capture, food catalog settings, fluids, daily targets, weight goals, health data, widgets, and support/privacy settings; updated the guide navigation and generated documentation.
- Expanded Statistics guidance into hub, training, and Body & Nutrition articles, and clarified the independent periods and missing-data behavior in the health-data and measurement guides.
- Bundeslebensmittelschlüssel (BLS) 4.0 generic food catalog (Issue #718): Replaced the bundled generic-food source with the downloadable, offline BLS catalog while keeping Open Food Facts for branded products. Retained nutrient values, missing-value semantics, per-value provenance, source identifiers, CC BY 4.0 attribution, reviewed aliases, and compatibility with existing diary entries.
- Hevy and Strong workout-history imports (Issue #691): Added export guidance and a pre-import workout preview with duplicate and invalid-date counts. Recognized app-specific weight and distance units, localized semicolon CSV files, Hevy’s German month abbreviations, and Strong’s localized headers and rest rows. Added anonymized Hevy and Strong export fixtures, an onboarding entry point, and a localized import action in Data & Backup.
- Onboarding workout-history import prompt: Added a dedicated optional onboarding step to choose a Hevy, Strong, or generic workout export immediately, with a clear later option. Reuses the import preview and mapping flow; opt-in PostHog telemetry records only whether the prompt is started or skipped, never workout details.
- Screen Reader Accessibility for Segmented Controls (
AppSegmentedControl, PR #719): AddedSemanticswith button role, selection state, and mutually exclusive group indicators to segmented control segments for improved screen reader navigation (VoiceOver/TalkBack). - Previously Performed Exercise Filter & History Indicators (
ExerciseCatalogScreen,ExerciseFilterSheet,exercises_queries.dart,exercise.dart): Added a one-tap quick filter chip (Bereits trainiert) directly under the catalog search bar and a corresponding toggle in the filter sheet to instantly isolate exercises that have been logged in past workouts. Exercises with past workout history now display a distinct badge (Trainiert) and localized relative timestamps in the subtitle (e.g. "Heute trainiert", "Vor 3 Tagen", or "Zuletzt am [Datum]"). Updated SQL search ranking so any exercise ever performed receives a baseline history boost (+25), ensuring previously trained exercises consistently rank ahead of the 900+ never-performed catalog entries. - Live workout progression toggle: Added the static Neural Cloud mark without its satellite dot to the live workout keyboard accessory, allowing automatic training suggestions to be enabled or disabled without leaving set entry. Tapping it no longer triggers the cloud's color animation. The crossed-out, muted cloud indicates the disabled state; the next-field chevron uses a matching circular button, and every accessory control has a localized tooltip.
- Curated BLS food aliases: Imported the catalog repository's reviewed and candidate-only aliases into a replaceable local search index. Manual and AI food retrieval now return canonical BLS foods with alias language and match-scope evidence; broad aliases remain candidate evidence and never become exact identity matches.
- Automated iOS Internal Testing deployment (
script/deploy_ios_internal.sh): Added one command to generate the Flutter iOS configuration, build and archive the current version, upload it to TestFlight, and advance the pubspec build number after a successful upload. - Contextual JSON import for saved content: Routines, training plans, and recipes can now be imported from pasted JSON or a file from their overview or editor. Imports are validated and previewed before confirmation; replacing a saved item leaves completed workout history intact. Recipe actions are grouped in the overflow menu, and text-pasted JSON now enables the import action as expected.
- Scoped Exercise Notes (Issue #710): Added pinned exercise notes, pinned notes per routine exercise, and workout-only notes per exercise instance. Pinned notes prefill the live workout; note scopes are editable from the workout and exercise detail screens. Existing workout notes migrate without losing their text, and the new note data is preserved through backups, imports, exports, and workout sharing.
- Recipe Portions & Diary Grouping (Issue #686): Saved recipes now log as one expandable diary meal with the recipe title and linked ingredients. Recipes can store their serving count and cooked finished weight; logging lets you scale by grams or fractional servings, and saved recipes can be duplicated.
- Serverless Share Links (Issue #713): Added compressed, versioned URL-fragment links for routines, manual training plans, and saved recipes; native glass import previews with local import under fresh IDs; Android App Links and iOS Universal Links; and a static browser preview with app install links.
- Portable Sharing and Import (Issue #711): Added formatted text and versioned JSON exports for routines, manual plans, recipes, and completed workouts, with copy and file sharing. Added additive JSON import from Data & Backup and shared files, previewed before import. Web-link actions now appear only when their encoded URLs fit the 2,000-character limit; larger items remain available as text or JSON.
- Standardized Settings Row Component (
AppSettingsRow,app_settings_row.dart,common.dart): Created a unified, modern row widget providing standard typography, layout spacing, optional subtitle widgets, right-side action indicators (chevrons, platform switches, or custom action widgets), and tap interaction matching the design ofAppLinkRow. - Excel personal-data export: Added a multi-sheet Excel export that links personal-data sheets and includes BLS micronutrient facts, alongside the focused CSV exports and restorable backup format.
- Customizable Statistics Hub and nutrition analytics: Added reorderable, selectable statistics cards, an all-data view that keeps empty statistics visible, recovery readiness, hydration, and micronutrient analytics. Micronutrient summaries are explicitly limited to logged BLS foods. Added editable card selection and detailed macro, water, and micronutrient views.
- Manual plan refinements: Improved localization and simplified state handling in the manual-plan screen and editor, including more reliable routine selection.
- AI-assisted workout-routine guidance: Added verified OpenExerciseDB ID-to-
uuidguidance, import-field constraints, and a catalog-backed JSON example, linked from routine, exercise-catalog, import, and documentation entry points. - AI Overlay developer demo: Added a localized developer demo with a draggable and resizable AI cloud, safe-area resizing, live movement control, chat preview and input, fullscreen mode, generation status, and refined backdrop and selection colors.
- Documentation updates: Added testing guidance for imports, sharing, food search, and workout features, and expanded the User Guide with sharing workflows and AI integration guidance.
- Issue reporting: Added GitHub issue templates for bug reports and feature requests.
- Onboarding health settings: Added localized descriptions for the consolidated health settings and clarified the available health-data options.
Changed
- Unified Exercise Pause Timer & Notes Layout on Routine and Workout Detail Screens (
EditRoutineExerciseCard,EditRoutineScreen,WorkoutExerciseLogCard,WorkoutLogDetailScreen): Updated the routine and workout log detail screens to match the live workout screen's pause timer and inline exercise notes design. Moved edit-mode exercise actions (edit notes, edit pause timer, remove exercise) into a singlePlatformAdaptivePopupMenuoverflow menu (ellipsis_vertical), replaced the boxed note container with the inline note and primary-accent pause timer row below the exercise header, and added full pause timer display and editing support to the workout log detail screen. - Removed compact muscle visualization from workout exercise cards (
LiveWorkoutScreen): Removed the compact front/back muscle silhouette from exercise card headers on the live workout screen so exercise titles align consistently across live, routine, and workout detail screens. - Chart Point Aggregation Performance Optimization (
BodyNutritionNormalizedTrendChart, PR #720): Optimized chart point aggregation by replacing chained.map().reduce()iterations with single-pass loops and eliminating unnecessary closure allocations during chart rendering. - Pinned timeframe filters in analytics screens: Moved date-range chips into the app bar on macro statistics, body/nutrition correlation, muscle group analytics, consistency, steps, measurements, and sleep screens. Their filters remain visible while scrolling; the PR dashboard is unchanged.
- Workout screen controls and sharing: Added compact front/back muscle views beside non-cardio exercises, aligned the note prompt and pause timer on one row when no note exists, and moved note, timer, and remove actions into the platform-adaptive overflow menu. Pause text now uses consistent bold emphasis. Workout text, JSON, and image shares preserve workout and exercise notes and pause durations, JSON imports restore exercise notes, and share outputs link to
https://trainlibre.com. - Removed Divider Lines across Settings Screens (
SettingsScreen,AppearanceSettingsScreen,GoalNotificationSettingsScreen,AiSettingsScreen,HealthSettingsScreen,StepsSettingsScreen,PulseSettingsScreen,SleepSettingsScreen,HealthExportSettingsScreen,MeasurementImportSettingsScreen,CsvExportCard): Removed divider lines between settings rows, toggles, navigation links, and popups across the main settings screen and all sub-screens to achieve a clean, uninterrupted list design. - Unified Health Settings (
HealthSettingsScreen,SettingsScreen,StepsSettingsScreen): Consolidated steps, sleep, pulse, measurement import, and health export under one Apple Health / Health Connect settings page with per-feature switches, permission or export status, and relevant manual sync actions. Removed the advanced steps provider and source-policy controls; legacy selections now resolve to all providers with automatic dominant-source handling. - Settings UI Unboxing, Radio Standardization & Primary Icon Theming (
AppSettingsRow,AppInfoRow,AppLinkRow,AppSectionHeader,StepsSettingsScreen,DataManagementScreen,AiSettingsScreen,SettingsScreen,LocalDataDeletionCard,DataBackupCard,DataAutoBackupCard,ICloudSyncCard,CsvExportCard): Fully unboxed nested settings screens (DataManagementScreen,AiSettingsScreen,StepsSettingsScreen) out of legacySummaryCardcontainers into clean, direct list layouts flush withAppSectionHeader. Standardized radio selection options (such as step source policy and provider filter) intoAppSettingsRow.radioTilewith the radio indicator aligned in the leading slot. Unified leading icon theming across all nested settings screens to consistently use the primary theme green (theme.colorScheme.primary). Refined typography soAppSettingsRowtitles use the exact contrast styling ofAppInfoRow(pure#FFFFFFin dark mode, pure#000000in light mode), avoiding slightly tintedonSurfacedeviations. EnsuredAppSectionHeaderis always left-aligned with standard uppercase formatting across sub-screens. Converted AI Provider, Model, and Photo Storage Duration dropdowns into nativePlatformAdaptivePopupMenurows matching the rest of the settings system, and converted photo deletion into a clean destructive row. - Workout Keyboard Accessory (
LiveWorkoutScreen,EditRoutineScreen): Replaced the keyboard bar with compact floating glass controls using the same unfilled Liquid Glass settings and white/black text asGlassFab. The round hyphen button inserts-at the current selection in numeric workout fields, supporting rep ranges such as8-12without leaving the input flow. Added a conditional next-field button that appears only when another focusable input follows the current one. - Full Glass Button Hit Areas (
GlassFab,GlassPillButton,WorkoutKeyboardAccessoryBar): Made the complete visible bounds of glass buttons respond to taps, not just their text or icon. Avoided render-object access while checking focus traversal so rebuilding the workout keyboard controls does not throw when a focus element is being removed. - Settings Rows Alignment & Leading Icon Restoration (
AppSettingsRow,AppLinkRow,AppInfoRow,SettingsScreen,AppearanceSettingsScreen,GoalNotificationSettingsScreen,StepsSettingsScreen,SleepSettingsScreen,PulseSettingsScreen,HealthExportSettingsScreen,MeasurementImportSettingsScreen,DeveloperSettingsScreen): Aligned settings row content directly on the vertical guide ofAppSectionHeaderby matching internal horizontal padding (left: 4.0), eliminating excess indentation that previously resembled card insets. Restored leading icons across settings navigation items, switch rows, status indicators, andAppInfoRowinformational components. Implemented a fixed-width 32px slot for leading elements acrossAppSettingsRow,AppLinkRow, andAppInfoRowso rows without icons remain perfectly aligned with icon-bearing items. - Unified Settings UI & Unboxed Clean Layout (
SettingsScreen,AppearanceSettingsScreen,GoalNotificationSettingsScreen,StepsSettingsScreen,SleepSettingsScreen,PulseSettingsScreen,HealthExportSettingsScreen,MeasurementImportSettingsScreen,DeveloperSettingsScreen): Redesigned the main settings screen and all sub-screens to follow a consistent, unboxed, clean, and modern list style. RemovedSummaryCardcontainer boxes around settings sections so rows sit cleanly and directly under section headers on the background page, matching the lightweight style ofAppLinkRow("Developer" / "Telemetriedaten löschen"). Removed oversized leading icons from the left side across all settings sections to save horizontal real estate. Converted switches, navigation entries, action buttons, and popup pickers to useAppSettingsRow,AppSettingsRow.switchTile, andAppSettingsRow.navigation. Replaced legacy informational cards (such as the notification privacy box and pulse honesty banner) with standardizedAppInfoRowcomponents. - Privacy Policy & Legal Disclosures Update to Version 1.8 (
assets/privacy/privacy_policy_*.md,legal_screen.dart,docs/script.js,docs/privacy.html,docs/privacy-policy/index.html,docs/impressum.md): Updated the Privacy Policy (Datenschutzerklärung) from version 1.7 to version 1.8 across all supported languages (German, English, French, Italian, Japanese). Differentiated on-device processing via Apple Intelligence / Foundation Models (SystemLanguageModel.default, 100% offline, zero network requests, no API key, no model training) from cloud-based Bring-Your-Own-Key (BYOK) APIs (OpenAI, Gemini, Claude, Mistral, xAI Grok, Ollama) in Section 4 A to comply with GDPR Art. 13(1)(e) and EU AI Act Art. 50 transparency requirements. Explicitly disclosed health platform data imports (weight, body fat percentage, and waist circumference from Apple HealthKit and Google Health Connect) in Section 5 A, added Apple iCloud Backup privacy disclosures in Section 6 B, incrementedkCurrentLegalVersionto1.8, and synchronized all website documentation. - Redesigned AI Meal Settings Interface (
AiSettingsScreen): Streamlined the settings page into clean, purpose-driven cards. Separated global activation and LiDAR options into a dedicated "Status & Features" card, while isolating provider selection, API keys, and connection testing into an "AI Model & Provider" card. Removed the redundant static speech recognition info box and simplified Apple Intelligence into an unobtrusive, 1-line on-device status notice ("Funktioniert 100% offline auf dem Gerät"). Packed the 60-second request timeout slider into an expandable "Advanced Options" accordion. - Default AI Provider & Global Activation (
AiService.getSelectedProvider,ThemeService): Configured Apple Intelligence (appleFoundation) as the default out-of-the-box provider on compatible iOS devices when no provider has been explicitly selected yet. Set AI meal features to enabled by default (isAiEnabled = true). - AI Meal Scan Log Diagnostics Allowlist (
AiMealScanLogService): AddedappleFoundationto the allowed provider list in diagnostic telemetry and export sanitization, ensuring privacy-safe local diagnostics correctly retain the provider name for on-device scans. - Encapsulated Raw AI Debug Logs (
AiService,AiParsing): Guarded all raw AI response printouts and parsing diagnostic logs withkDebugModeto ensure food details and raw payloads are never printed to console logs in release builds. - AI Meal Review Header, Token Status & Vertical Spacing (
AiMealReviewScreen): Omitted unavailable token status ("KI-Nutzung: nicht verfügbar" / "wird aktualisiert...") so offline models and unmetered providers display cleanly without clutter. Fixed horizontal right-overflow on the timestamp row with flexible wrapping and truncation safety, and unified the content column within the photo translation offset to eliminate the excessive 48px gap between nutrition totals and the ingredients list. - Diary Progress Bars Decimal Formatting (
GlassProgressBar,DiaryScreen): Removed post-comma decimal values (decimalDigits = 0) from calorie and macronutrient progress indicators so whole rounded values are shown (e.g.2734 / 2986 kcalinstead of2734.0 / 2986 kcal). - Workout Set Type Dropdown & Unified Explanations Menu (
PlatformAdaptivePopupMenu,platform_adaptive_dropdown.dart,SetTypeMenu,showExplanationRichSetTypeSheet,LiveWorkoutScreen,WorkoutLogDetailScreen,EditRoutineScreen): Converted set type selection on all workout screens (LiveWorkoutScreen,WorkoutLogDetailScreen, andEditRoutineScreen) from opening a bottom sheet immediately to an inline dropdown menu using the sharedPlatformAdaptivePopupMenu. Added custom symbol support, divider support, and a dedicated "Info & Explanations" action in the dropdown that opens the explanation-rich bottom sheet with set type symbols, names, and detailed descriptions of how each type impacts volume and progression. - Restored AI Prompt Precision & Atomic Decomposition (
_AiPrompts,AiService,AppleFoundationPlugin.swift): Restored comprehensive prompt instructions and decomposition directives (atomic single-ingredient breakdowns such as bread, meat, tomatoes, and onions instead of monolithic composite dishes) alongside raw vs. cooked mass calibration, state hints, and 1–3 catalog search terms per item. Retains on-device speed throughAppleFoundationPluginpre-warmed session caching matching instructions on camera entry, ensuring high analysis accuracy while eliminating hallucinated dish names. - Streamlined Lightweight AI System & Repair Prompts (
_AiPrompts,AiParsing,AiSuggestedItem): Drastically simplified and shortened the meal analysis and repair prompts by ~60% across all AI providers. Replaced 11 verbose and confusing meta-rules (such as complex raw-vs-cooked conversion instructions that caused on-device models to underestimate portions into 200 kcal snacks) with 6 concise, laser-focused directives focusing on direct ingredient breakdown, realistic plate/pan scale calibration (300–600g for main dishes), and localized naming. Added resilient fallback parsing supportingestimatedGrams,grams, andservedGramsso all models parse reliably. - AI Model Pre-Warming on Camera Entry (
AppleFoundationPlugin.swift,AppleFoundationService,AiService,AiMealCaptureScreen): Pre-warms the active on-device AI model (Apple Foundation Models / Neural Engine) as soon as the user enters the AI Meal Capture screen in the background. The pre-warmed session is cached and reused immediately when tapping "Analysieren", drastically cutting first-token latency and eliminating the initial cold-start delay. - Separated System Prompt & Native Session Instructions for Apple Intelligence (
AppleFoundationPlugin.swift,AppleFoundationService,AiService): Updated the native Apple Foundation Models integration to passsystemPromptdirectly intoLanguageModelSession(instructions:)rather than concatenating it into a single user prompt string. This ensures Apple Intelligence separates behavioral system directives from the user prompt and attachments, matching Apple's FoundationModels architectural pattern and improving structured output consistency. - AI Model Download Verification Check (
LocalAiModelManager,AiService): Added explicit verification (ensureDownloadedand file existence check) before initiating inference with on-device models to prevent unhandled errors or missing weight files, giving descriptive user guidance to download the model if files are absent. - Connection Test Loading Spinner (
AiSettingsScreen,AppButton): Updated the "Verbindung testen" button in AI Settings to display an active circular loading spinner animation (isLoading: _isTesting) while testing is in progress instead of leaving the button static and disabled without visual feedback. - Raw AI Response Debug Logging & Plain-Text Fallback Parsing (
AiParsing,AiService,_AiPrompts): Added verbose console debug logging for the raw provider output and JSON parsing pipeline (debugPrint('[AiService] Provider raw output')anddebugPrint('[AiParsing] Attempting to parse')), making diagnostic information immediately available in the console. Added resilient fallback parsing for conversational or plain-text bulleted lists (e.g.- Bread\n- Tomato) when on-device models omit JSON wrappers, reliably converting them into logged ingredients. Re-anchored prompts to explicitly require raw JSON output. - Resilient AI Parser for Unbracketed JSON Sequences & Flexible Root Keys (
AiParsing): Enhanced the AI parser to handle edge cases produced by on-device models: (1) unbracketed comma-separated JSON object sequences (e.g.{"name":...},{"name":...}with omitted outer brackets), (2) alternative wrapper keys (meal,food_components,components,ingredients), and (3) plain string array elements, automatically resolving them into valid meal items. Re-anchored repair prompts to explicitly demand[and]. - Developer documentation audit: Rewrote architecture, state lifecycle, localization, and widget guides against current Dart/native implementations; corrected the Drift schema version to 40 and widget snapshot version to 2. Registered and linked the existing food-search guide in the public developer navigation, and refreshed contributor overview links.
- Updated all 15 Feature & Heuristics articles against the current implementation, including model formulas and gates, imported/exported data paths, provider-specific AI behavior, platform limits, persistence, telemetry, and non-clinical scope. Updated the documentation overview, public page list, registry metadata, and generated feature pages.
- Responsive layouts and localization: Improved nutrition previews and showcase layouts on smaller screens. Updated localized labels and descriptions for workout plans, health settings, statistics, and data export, plus export and backup descriptions, release notes, and User Guide navigation wording.
- iOS internal-testing deployment: Extended the deployment script to detect existing build numbers and increment them, clean previous builds, and handle IPA export failures while preserving the build and upload workflow.
Fixed
- UI & Design System Consistency (
main.dart,DesignConstants,LucideIcons,showDeleteConfirmation,showGlassBottomMenu,AppButton,GlobalAppBar,SummaryCard):- Replaced unregistered
fontFamily: 'Plus Jakarta Sans'overrides with the bundled'Inter'font family across 12 diary, AI meal capture/review, voice dictation, and onboarding tour files so text no longer falls back to the platform default font. - Fixed
MacroColorsinbaseLightThemeandbaseDarkTheme(main.dart) to referencelightScheme/darkSchemeinstead of the ancestorTheme.of(context).colorScheme, and added the missingenabledBorder(borderRadiusM) tobaseDarkTheme.inputDecorationThemeto match light mode. - Replaced stray Material
Icons.*withLucideIcons.*across workout, analytics, diary, AI overlay demo, and draggable AI cloud screens, and localized the tooltip inWorkoutHistoryAppBarButton. - Unified hardcoded
0xFFC9EF00lime values withDesignConstants.brandAccentColor/DesignConstants.brandAccentColorLightMode. - Replaced raw Material
AlertDialogs and plainshowModalBottomSheets withshowDeleteConfirmationandshowGlassBottomMenuinAiSettingsScreen,AiMealScanLogsSection,MealReviewValidationSummary, andMuscleGroupAnalyticsScreen. - Updated
DurationDetailPage,MealEditorScreen,MealIngredientsSummary, andMealReanalysisComparisonDialogto useSleepDetailUnavailablePage(GlobalAppBar),SummaryCard, andAppButton.
- Replaced unregistered
- Hid pause times and exercise notes on every live workout card while exercises are being reordered, keeping the compact drag view consistent with the dragged card.
- Unified website and documentation accent colors across light and dark themes, including navigation, links, controls, and diagram accents; the brand logo retains its fixed color.
- Fixed KaTeX rendering for bracketed LaTeX formulas in feature documentation and restored sticky docs navigation by removing the clipping scroll container; left navigation and the right table of contents now scroll independently from article content.
- Excessive Top Spacing on Statistics Hub Screen (
StatisticsHubScreen): Fixed excessive vertical spacing between the pinned app bar / timeframe filter chips and the first statistics section. Removed redundant double-counted app bar extension height, eliminated unconditionalSizedBoxspacers that accumulated when steps or recovery tracking were disabled, and ensured the first rendered section header uses tight top padding (isFirst: true). - Fixed fluid logging in Imperial mode so the entered fluid ounces are converted to milliliters when creating or editing an entry; existing entries now display in the selected unit.
- Exercise Mapping Screen Scrollbar Range & Layout (
ExerciseMappingScreen): Fixed the scrollbar indicator on the exercise mapping screen stopping ~1/3 down from the top and only covering a compressed portion of the screen even when at the very top. Relocated the bottom action button tobottomNavigationBarand allowedCupertinoScrollbarandListViewto span the full screen behind the frosted glass app bar, stretching the scrollbar track to the top edge of the app. - First-set progression below target rep range (Issue #723): Reduced the first-set weight recommendation when the previous performance falls below the next workout's repetition minimum, using the estimated load for that minimum instead of keeping the previous weight.
- SQL Injection Safeguard in Product Local Data Source (
ProductLocalDataSource, PR #708): Added strict alphanumeric and underscore regex validation to dynamic column names in SQLite nutrition log queries. - Beverage caffeine logging & BLS/Base Foods catalog mapping (
CaffeineCatalogResolver,BasisDataManager,FoodItem,ProductLocalDataSource,DiaryLocalDataSource,ArchiveService,QuantityDialogContent,AddFoodScreen,MealScreen,MealsScreen,NutritionHubScreen): Fixed caffeine values being missing or null (prompting 0 mg / 100ml) when logging beverages from the Bundeslebensmittelschlüssel (BLS 4.0) database (train_libre_base_foods.db). Standard BLS 4.0 analytical tables lack a caffeine component, leaving raw catalog rows with null values. IntroducedCaffeineCatalogResolverwith canonical barcode mappings (e.g.bls:N330000/bls:N331000for Colagetränk at 10.0 mg/100ml,bls:N410100for coffee at 40.0 mg/100ml,bls:N411100for espresso at 212.0 mg/100ml,bls:N630000for black tea at 20.0 mg/100ml,bls:N610100for green tea at 15.0 mg/100ml, and explicit 0.0 mg for decaf entries) alongside multilingual beverage keyword heuristics (energy drinks, colas, coffees, teas). Added bidirectional fallbacks betweencaffeine_mg_per_100mlandcaffeine_mg_per_100gin catalog mapping, database archiving, andFoodItem.effectiveCaffeinePer100ml. ConnectedQuantityDialogContentto pre-fill resolved beverage caffeine and auto-detect liquid intake when logging drinks, backfilled catalog values fromlegacy_food_mappingsduring BLS imports, and updated the BLS catalog build pipeline (tools/catalog.py) to emit populated caffeine and fluid flags. - Exercise catalog search enhancements (
exercises_queries.dart,ExerciseCatalogScreen):- Added German umlaut transliteration (
ae<->ä,oe<->ö,ue<->ü,ss<->ß) so typing without umlauts on keyboards (e.g.bankdruecken,ueberkopfdruecken,klimmzuege) reliably finds matching exercises and resolves names. - Expanded morphological singular/plural heuristics and fitness vocabulary synonyms: searching
klimmzügenow finds the base exerciseKlimmzug(Pull-Up),deadliftsfindsDeadlift/Kreuzheben,pushupsfindsPush-Up/Liegestütz, and variations likebeinbeuger/beinbeugen,facepull/face pull, andlunge/lungesresolve consistently. - Prioritized cross-language exact matching in SQL ranking: international search terms (e.g. typing
Bench PressorDeadliftwhile the app UI is set to German) now receive top exact-match priority (is_exact_match), ensuring canonical exercises immediately surface at rank #1 ahead of partial keyword hits. - Guarded short acronym searches (e.g.
RDL,OHP) to match whole words, parentheses, or search terms, eliminating false-positive substring hits on unrelated catalog words (e.g. DutchHardlopenforRDL). - Added an asynchronous generation counter (
_searchGeneration) inExerciseCatalogScreento discard outdated search results and prevent UI race conditions when typing or clearing queries quickly.
- Added German umlaut transliteration (
- Food search and AI catalog matching: Restored clear search result sections across
AddFoodScreenandGeneralFoodSelectionScreen(Grundnahrungsmittel, Eigene Lebensmittel, Weitere Treffer) and prioritized matching Bundeslebensmittelschlüssel (BLS) staple foods over branded products. Switched catalog queries to per-source SQL partitioning (ROW_NUMBER() OVER (PARTITION BY source ORDER BY relevance, ...)) so abundant Open Food Facts (OFF) brand entries cannot crowd out matching BLS base foods (e.g. "Orange roh", "Pilsner Bier") before return limits. Within each section, results maintain strict lexical ranking (exact name/identity alias > complete words > word prefixes > compact prefixes) and usage history. AI matching preserves conservative BLS preference for generic foods while respecting packaging evidence for packaged products. Unified Unicode tokenization, supported-language normalization, brand matching and curated aliases across manual, category and AI searches with maintained local FTS indexes. Added regressions for displacement with >50 OFF hits, section headers and hierarchy, and realistic BLS foods; documented the architecture indocumentation/developer/food_search.md. - Fixed the recurring catalog download prompt when an installed BLS catalog has a stale alias search index. The index is rebuilt from the local catalog during startup.
- Restored tapping and horizontal scrolling for date filter chips in app bars by including the filter row in the app bar's interactive layout height.
- Recipe sharing: Added the share action to saved recipes in the Nutrition Hub and resolved ingredients stored by product ID when exporting or opening a recipe.
- Settings Dropdown Menus Tap Recognition (
AppSettingsRow.navigation,SettingsScreen,AppearanceSettingsScreen): Fixed an issue where dropdown menus in settings (Theme Mode, Unit System, Experience Level, Training Progression, Overview Nutrient) failed to open upon tapping.AppSettingsRow.navigationpreviously required an activeonTapcallback which wrapped the item in an innerInkWell, intercepting taps before they could reachPlatformAdaptivePopupMenu's outer gesture trigger. MadeonTapoptional inAppSettingsRow.navigationand omitted it on menu triggers so tap events correctly trigger the dropdown. - Apple Intelligence Visual Input & Image Payload Forwarding (
AiService,AppleFoundationService,AppleFoundationPlugin.swift): Added complete visual image payload forwarding from Flutter through the platform channel down to Apple's native Foundation Models runtime. Decodes base64 photos intoCGImageinstances and connects them directly toLanguageModelSessionmultimodal prompt builders (Attachmenton iOS 27+), resolving the issue where meals were analyzed without image context. - AI Provider Dropdown Selection Persistence (
AiSettingsScreen,AiService,PlatformAdaptiveDropdownFormField): Fixed an issue where selecting an alternative AI provider (e.g.Apple IntelligenceorOn-Device (Hugging Face)) in settings reverted toOpenAIupon re-entering the screen or restarting the app. Synchronized provider state betweenSharedPreferencesandFlutterSecureStoragewith graceful fallback, and ensuredPlatformAdaptiveDropdownFormFielddynamically updates its selection value with a state-aware ValueKey. - AI Vision Prompt Hallucination Triggers (
AiPrompts,LocalModelPlugin.swift): Removed burger example references in meal analysis prompts that caused text-only runs to hallucinate burger components, and removed a mock fallback payload inLocalModelPlugin.swiftthat produced placeholder 0-calorie scans. - Local Model Download & Meal Analysis Screen Cancellation (
LocalAiModelManager,AiSettingsScreen,AiMealCaptureScreen,AiMealReviewScreen,MealAnalysisScreen): Fixed an issue where the "Abbrechen" button during local model downloads did not abort the active HTTP download stream, causing download state to immediately re-appear, and showing a false-positive failure snackbar. Added active client force-closing, stream interruption, temp file cleanup, and clean cancellation handling. Furthermore, fixed the "Abbrechen" button during meal analysis by removing thenavigator.canPop()guard in_dismissAnalysisScreen(), which had prevented the route from being dismissed due toPopScope(canPop: false), and switched backdrop hit testing totranslucentso button taps are never obstructed. - Local AI Vision Model Download URLs (
LocalAiModelManager): Fixed an issue where downloading curated on-device models (Qwen-3-VL-4B,Qwen-2.5-VL-3B, andSmolVLM-2.2B) failed withHttpException: HTTP status 404due to outdated repository paths and filenames. Updated download links to verified upstream Hugging Face repositories (Qwen/Qwen3-VL-4B-Instruct-GGUFandggml-org), configured explicit 302 redirect following, and set mobile client user-agent headers. - Localized Food and Meal Names Across Diary & Review Surfaces (
MealEntryCard,MealEntryScreen,AiMealReviewScreen,MealReanalysisComparisonDialog,_AiPrompts): Fixed an issue where ingredient names in meal entry cards and meal review screens showed unlocalized raw database or AI proposal strings instead of localized catalog names (only resolving properly upon openingFoodDetailScreen). Updated all meal item rows, summaries, and dialogs to querygetLocalizedNamewith the resolvedBaseFoodLanguage. Also updated AI prompts to explicitly instruct models to output the meal title (dishType) in the user's localized app language (e.g. "Gebratener Reis" instead of "fried rice"). - Apple Intelligence & AI Meal Component Truncation Bug in Repair Pass (
AiService.repairMealCaptureCandidate,AiParsing): Fixed a critical bug where scanning a complete meal (such as a Döner Kebab with bread, meat, tomatoes, red onions, parsley) was truncated to a single ingredient (e.g. only "Parsley Le Erbe Aromatiche") when a validation repair pass was triggered. InAiService.repairMealCaptureCandidate, non-semantic repair passes previously rebuilt the candidate with only the items returned by the repair call (repaired.length), inadvertently discarding all other detected food components. Updated the repair merger to preserve all initial candidate items and cleanly update only the targeted/repaired components. - Apple Intelligence Invalid JSON Tokens, Nested Scope Truncation & Multi-Object Parsing (
AiParsing,_AiPrompts): Fixed parsing failures with Apple Intelligence and compact on-device models: (1) flattened the prompt schema sodishType,expectedKcalRange, andcookingMethodare top-level properties alongsideitems, preventing models from closingmealContextprematurely, (2) added automatic pre-normalization repairing uncomma-separated adjacent objects within arrays (e.g.{"name": ...} {"name": ...}emitted by on-device models without commas) and repairing duplicate closing brackets (}]]}->}]}or]}}}->]}), (3) added a dedicated recovery extractor for outputs wheremealContextwas closed prematurely beforeitems, (4) sanitized placeholder tokens like[<100, 200]and[0%, 5%], (5) madecatalogSearchTermparsing resilient toListvalues, and (6) refinedsearchTermsinstructions to explicitly forbid generic broad category words like "fruit", "vegetable", "dairy", preventing staple foods (e.g. tomatoes) from accidentally matching candy or snack fruit catalogs. - Top-Level
dishTypeParsing intoAiMealContext(AiParsing._parseMealCandidateFromContentSync,_AiPrompts): UpdatedAiParsingto automatically extract top-level"dishType"from AI JSON output into anAiMealContextinstance if not wrapped under a nested"mealContext"object. This ensures the review screen displays the holistic dish title (e.g. "Döner Kebab") instead of falling back to the name of an individual ingredient. - Base Food Parenthetical Stem Prioritization in Search & AI Meal Recognition (
ProductLocalDataSource,EvaluateFoodSourceUseCase,MatchingLogic): Fixed an issue where generic exact name matches from Open Food Facts (e.g. unverified raw dry "Reis") took precedence over curated base foods with parenthetical descriptions (e.g. "Reis (weiß, gekocht)"). Added parenthetical qualifier stripping to exact match detection in SQL (searchProducts), candidate re-ranking (EvaluateFoodSourceUseCase), repair candidate selection, and deterministic AI scoring (MatchingLogic._matchScoreForQuery), ensuring staple foods and their cooked variants are accurately identified and prioritized over unverified third-party catalog entries. - Documentation-site routing: Fixed 404 navigation links so they resolve correctly from nested URLs.
- Asynchronous dialog navigation: Guarded navigation after preference updates so a dismissed dialog context is not reused.
- Small-screen and Dynamic Type layout: Fixed vertical overflow in
ColdStartEmptyState, horizontal overflow inRunningWorkoutBar, legend wrapping inBodyMetricsSectionCard, and text clipping inGlassProgressBarandNutritionSummaryWidget. Prevented empty call-to-action labels from leaving gaps and aligned trailing actions in routine-set rows. - Workout-provider and safe-area handling: Fixed
ProviderNotFoundExceptioninBottomContentSpacerwhen used outside the workout provider tree and prevented workout summary actions from overlapping the iOS home indicator. Added the missing Statistics Hub sleep-card title and navigation chevron.