mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
fix(apple-health): count readings entered here before calling a type quiet (#1247)
Weight, blood pressure and blood glucose are written back to the phone while their entry is bidirectional. A reading entered here goes to Apple Health and never arrives back, so a person who keeps those readings here saw the type go quiet after two weeks. The Apple Health status read now adds `lastEnteredHereAt` to each written-back type, the newest reading from any source other than Apple Health, and `stale` counts it; the card shows it as "Last entered here". The value is resolved on the server so a client renders it as sent.
This commit is contained in:
1 parent
2b61762962
commit
0497685db0
16 files changed
+271
-21
No files matched your search
@@ -289,6 +289,12 @@ const appleHealthMetricFreshnessEntry = metricFreshnessEntry
|
||||
.describe(
|
||||
'v1.43 — when a batch with `syncTrigger: "backfill"` last carried this type. A backfill moves only this and `syncProgress`, never `lastReceivedAt`, `lastTrigger`, `lastBackgroundAt` or the account-level sync stamps, so catching up history does not read as a run of healthy daily syncs. Absent on older servers.',
|
||||
),
|
||||
lastEnteredHereAt: isoDateTime()
|
||||
.nullable()
|
||||
.optional()
|
||||
.describe(
|
||||
"v1.43.7 — present only on a type the app writes back to Apple Health (weight, blood pressure, blood glucose while their entry is `bidirectional` or `writeOnly` and enabled): when the newest reading of the type was entered here rather than arriving from Apple Health, or null when none was. Such readings go to the phone and never come back as an arrival, so `stale` already counts them: the type is quiet only when both this and `lastSeenAt` are. Show it as the server sends it; do not recompute `stale`.",
|
||||
),
|
||||
})
|
||||
.meta({
|
||||
id: "AppleHealthMetricFreshnessEntry",
|
||||
|
||||
Reference in new issue
Block a user