mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 23:12:04 +00:00
Render the day around a workout instead of linking away from it
The "That day" card took the workout, dropped it, and offered three chips to Pulse, Sleep and Mood. None of those pages accepts a date, so every chip landed on an all-time trend surface with the day nowhere in sight. Replace it with the day itself: the intraday pulse chart pinned to the session's day, the night the person woke from into it, and that day's mood entries. All three reads are addressed by the server-resolved dayKey, so nothing here decides which day a workout belongs to. The two outbound links that remain are undated and say what they lead to, Sleep trends and Mood history. Sleep and the intraday chart mount only when their module is on, so a switched-off module cannot paint as a failed read, and a query that has not answered yet shows a skeleton rather than claiming the night was empty. The detail page also drops the description it borrowed from the list.
This commit is contained in:
1 parent
0094445f07
commit
76b407b6de
15 files changed
+492
-111
No files matched your search
@@ -32,6 +32,16 @@ export const moodKeys = {
|
||||
params.sortDir,
|
||||
] as const,
|
||||
|
||||
/**
|
||||
* v1.34.3 — every mood entry logged on ONE local day, read by the
|
||||
* workout detail page's day context. Rides under the `["mood-entries"]`
|
||||
* prefix so `moodDependentKeys` reaches it on a mood write, and carries
|
||||
* its own `"day"` scope segment so it can never share a slot with
|
||||
* `moodEntriesList` — same key with a different response shape silently
|
||||
* poisons the cache.
|
||||
*/
|
||||
moodEntriesDay: (date: string) => ["mood-entries", "day", date] as const,
|
||||
|
||||
moodAnalytics: () => ["mood-analytics"] as const,
|
||||
/**
|
||||
* v1.8.5 — pre-computed mood-insights aggregates (heatmap, distribution,
|
||||
|
||||
Reference in new issue
Block a user