HRV baseline band from Garmin + dashboard HRV colours + route name on recent activities + sync-now race fix
Build and push images / validate (push) Successful in 7s
Build and push images / build-backend (push) Successful in 1m9s
Build and push images / build-worker (push) Successful in 5s
Build and push images / build-frontend (push) Successful in 10s

This commit is contained in:
2026-06-16 00:13:16 +01:00
parent e7123ee5db
commit d01f66223b
10 changed files with 98 additions and 45 deletions
+12
View File
@@ -125,6 +125,16 @@ class Activity(Base):
named_route = relationship("NamedRoute", back_populates="activities")
laps = relationship("ActivityLap", back_populates="activity", cascade="all, delete-orphan")
@property
def named_route_name(self):
"""Name of the associated NamedRoute, or None. Reads the relationship only
if it was eager-loaded (selectinload) so it never triggers a lazy load in
the async request context — returns None when unloaded."""
from sqlalchemy import inspect as sa_inspect
if "named_route" in sa_inspect(self).unloaded:
return None
return self.named_route.name if self.named_route else None
class ActivityDataPoint(Base):
__tablename__ = "activity_data_points"
@@ -254,6 +264,8 @@ class HealthMetric(Base):
hrv_nightly_avg = Column(Float, nullable=True)
hrv_5min_high = Column(Float, nullable=True)
hrv_5min_low = Column(Float, nullable=True)
hrv_baseline_low = Column(Float, nullable=True) # Garmin balanced range lower bound (balancedLow)
hrv_baseline_upper = Column(Float, nullable=True) # Garmin balanced range upper bound (balancedUpper)
sleep_duration_s = Column(Float, nullable=True)
sleep_deep_s = Column(Float, nullable=True)
sleep_light_s = Column(Float, nullable=True)