feat(illness): add date-less day-log list and full-history timeline

The episode day-logs endpoint only accepted a single `date`, so the
detail timeline could anchor on today alone. Add a date-less LIST variant
to GET /api/illness/episodes/{id}/day-logs: when no `date` is given,
return the episode's day-logs newest-first with limit/offset/sortDir
paging and meta.total (mirrors the Labs list envelope). The single-date
read stays intact, selected by the param's presence.

Wire the detail timeline onto the list for a full historical scroll
instead of today only, keeping the neutral palette and retrospective
copy. Register the list response in the OpenAPI contract for the iOS
client.
This commit is contained in:
Marc-André Bombeck committed 2026-06-17 14:07:16 +02:00
1 parent b5c1d1fc4e
commit cdf43c3669
16 files changed
+482 -104

No files matched your search

+8
View File
@@ -18,6 +18,14 @@ export const illnessKeys = {
illnessEpisode: (id: string) => ["illness", "episode", id] as const,
illnessDayLog: (episodeId: string, date: string) =>
["illness", "day-log", episodeId, date] as const,
/**
* v1.18.3 — the date-less day-log LIST for an episode (full historical
* scroll on the detail timeline + iOS healthlog-iOS#30). Distinct slot from
* the single-day read above; an illness write evicts the whole `["illness"]`
* prefix so both repaint together.
*/
illnessDayLogList: (episodeId: string, sortDir: string) =>
["illness", "day-log-list", episodeId, sortDir] as const,
/**
* v1.18.1 P3 — the per-episode retrospective correlation findings
* (pre-onset scan, nadir, recovery-gap). Server-authoritative; the read