Introduces a comprehensive sleep scoring module with detailed calculation logic and integration into health sleep creation and editing endpoints. Refactors HealthSleep model and schema to use integer types for heart rate, SpO2, respiration, and sleep stress fields. Updates related tests and documentation to reflect the new scoring system and data type changes.
Changed heart rate, SpO2, respiration, and stress level fields from Decimal to Integer in backend models and schemas for consistency. Updated frontend modal to support unmeasurable sleep and removed nap time, aligning form fields and API payloads with backend changes. Adjusted data processing and validation logic to match new types and constraints.
Refactored backend health_sleep CRUD, models, router and schema for improved type safety, docstrings, and response structure. Added HealthSleepListResponse for paginated and total-count responses. Updated router endpoints to return total counts and records, and improved error handling. Added new route and CRUD function for deleting sleep and added frontend support for it. Simplified array update on update and delete actions for steps, weight and sleep on HealthView.vue alongisde i18n translations for new strings
Refactored backend health_targets CRUD, models, router and schema for improved type safety, docstrings, and response structure. Added comprehensive unit tests for health_targets CRUD, models, and router. Added missing emit in HealthSleepZone.vue
Refactored backend health_steps CRUD, models, router, schema, and utils for improved type safety, docstrings, and response structure. Added HealthStepsListResponse for paginated and total-count responses. Updated router endpoints to return total counts and records, and improved error handling. Added comprehensive unit tests for health_steps CRUD, models, and router. Updated frontend service and view to match new API response format.
Refactored backend health_weight CRUD, models, router, schema, and utils for improved type safety, docstrings, and response structure. Added HealthWeightListResponse for paginated and total-count responses. Updated router endpoints to return total counts and records, and improved error handling. Added comprehensive unit tests for health_weight CRUD, models, and router. Updated frontend service and view to match new API response format.
Replaces FastAPI BackgroundTasks with a ThreadPoolExecutor for bulk activity import, queuing all files for processing in a single thread pool task. Adds process_all_files_sync to handle sequential file processing and database session management, improving scalability and resource usage. #399
Changed DATA_DIR to use BACKEND_DIR for consistency in config.py and removed unused import in fit/utils.py. Added documentation for FRONTEND_DIR, BACKEND_DIR, DATA_DIR, and LOGS_DIR environment variables in advanced-started.md to clarify their usage.
Introduces parsing of the FIT file_id frame to extract manufacturer, product, serial number, and creation time. Updates activity object creation to include tracker manufacturer and model, and propagates file_id data through parsing and splitting functions for improved device metadata handling.
Updates the pace calculation logic to handle cases where split_summary and lengths are missing for lap swimming activities, defaulting to the standard pace calculation.
Introduces parsing and handling of 'length' frames from FIT files, storing their data in a new 'lengths' array. Updates relevant functions to include and utilize 'lengths', particularly for more accurate swimming pace calculations based on active lengths.
Refactored backend Garmin sleep processing to robustly handle enum validation and avoid errors from unknown values. Updated frontend sleep list to conditionally render the timeline chart only if sleep stages exist. Reverted change to HealthWeightLineChartComponent.vue
Expanded the HealthWeightLineChartComponent to display additional metrics (BMI, body fat, body water, bone mass, muscle mass) alongside weight, each with its own dataset and axis. Improved tooltip formatting and axis labeling. Also refactored and cleaned up UsersListComponent markup for readability, and improved type annotations in UsersListComponent. Backend health_utils.py now includes stricter validation for Garmin data fields to prevent errors from invalid or missing values.
Added new cards for sleep, resting heart rate, and skin temperature deviation to the health dashboard. Expanded HealthSleepListTabsComponent with detailed tabs for heart rate, SpO2, respiratory rate, and additional sleep metrics, including improved handling of missing data. Updated i18n files for new labels and units, and adjusted HealthSideBarComponent navigation order. Minor backend and script fixes for field naming and test data.
When no `split_summary` is provided, treat `lap_swimming` activities active throughout the whole activity (thus, use the same calculation for pace as for other activity types).
Moved the creation and removal of the health_sleep table from a separate migration file into the main v0_16_0_migration.py. Deleted the now-redundant v0_16_0_migration_health_sleep.py migration file to consolidate schema changes.
Introduces avg_sleep_stress and sleep_stress_score fields to the HealthSleep database model, schema, and migration. Updates health_utils to process and store these new sleep stress metrics from Garmin data.
Extended backend models, schema, and migration to support new sleep metrics such as HRV status, resting heart rate, skin temperature deviation, and sleep score breakdowns. Updated Garmin health utils to process and store these new fields. On the frontend, refactored HealthSleepListComponent to use a new HealthSleepListTabsComponent for tabbed sleep details, updated prop names for clarity, and added new i18n resources for the updated UI.
Introduces health sleep tracking with new backend API endpoints, database schema updates, and CRUD logic. Adds frontend components for displaying, listing, and visualizing sleep data, including bar and timeline charts. Updates i18n resources and refactors health steps and weight components for consistency. Adds chartjs-adapter-date-fns and date-fns dependencies for improved chart date handling.
Introduces backend support for health sleep data, including new models, CRUD operations, and schema in the health_sleep module. Adds Alembic migration for sleep data, updates Garmin health utilities, and integrates sleep data retrieval in aux_gc_getbcstats.py. Frontend sidebar and i18n files updated to reflect new health sleep features.
Introduces the ability for users to set and update their weight target. Adds a new modal for weight target input, updates the backend API with a PUT endpoint for health targets, and connects the frontend to this endpoint. Also includes related i18n updates and minor UI improvements for integration modals.
Consolidates Alembic migrations for health_steps and health_weight into a single migration, removing redundant migration files. Refactors models and schemas to use a unified 'source' field (replacing garminconnect_body_composition_id) for both health_steps and health_weight, and updates related backend and frontend code to use this new field. Adds 'steps' to health_targets and updates enum usage for source fields. Frontend components now check 'source' for Garmin integration display.
Implemented full CRUD API endpoints for health steps in the backend, including create, update, and delete operations. Added new frontend components for managing, displaying, and visualizing health steps, including modals, bar chart, and list components. Updated dashboard and i18n files to support the new health steps feature. Also improved weight input UI and refactored some frontend scripts to use <script setup>. #404
Introduces backend models, CRUD, API routes, and Alembic migration for health steps tracking. Updates Garmin data processing to include daily steps, and adds frontend services, dashboard, and sidebar components for displaying and managing step data. Also refines health weight deletion, improves i18n, and updates related logic for better health data management.
Migrates all health data functionality to a new health_weight module, including models, CRUD, utils, and API routes. Updates database schema and Alembic migration to use health_weight, removes the old health_data files, and updates all references throughout the backend and frontend. Adjusts API endpoints, i18n, and services to reflect the new health_weight naming and structure.
Uncommented and integrated body composition fields (body_fat, body_water, bone_mass, muscle_mass, physique_rating, visceral_fat, metabolic_age) in the HealthData schema and processing logic. Updated backend to handle these fields and adjusted frontend to handle possible null BMI values. #401
Introduces 'Inline skating' as a new activity type (ID 45) across backend and frontend. Updates schemas, utility mappings, i18n files, UI components, and search functionality to handle inline skating activities. #411
Introduces 'Snow shoeing' as a new activity type (ID 44) across backend and frontend. Updates schema, activity mappings, goal calculations, developer documentation, i18n files, activity utilities, and UI components to support the new activity. Ensures snow shoeing is selectable, filterable, and properly displayed throughout the application. #411
Introduces Sailing (type 43) as a supported activity throughout the backend and frontend. Updates activity mappings, i18n files, UI dropdowns, and utility functions to include Sailing. Adjusts search and filtering logic to handle the new activity type and corrects some error message keys in SearchView. #411
Introduces kayaking as a new activity type (ID 42) in backend and frontend. Updates activity mappings, i18n labels, UI components, and search logic to support kayaking alongside rowing where appropriate. #411
Introduces an optional activity_name parameter to GPX, TCX, and FIT file parsing utilities, allowing the activity name to be set from external sources (such as Garmin Connect). Updates related function signatures and usages throughout the codebase to propagate this parameter. Also adds windsurf to ActivityDistances schema and improves type annotations and error handling in activity utilities.
Introduces the optional is_hidden field to the ActivityEdit Pydantic schema and updates the ActivityView to handle this field when editing activities #391
Introduces 'Cardio training' as a new activity type (ID 41) across backend and frontend. Updates activity mappings, enums, goal logic, UI components, and i18n files to support the new type. Also fixes goal list initialization in SettingsUserGoals.vue.