mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
Add the Category -> Tag taxonomy the mood surface was missing and the free-text note the web form could never write, then surface both on the Insights mood page. Schema (migration 0101): a global MoodTagCategory -> MoodTag catalog plus a MoodEntryTagLink join, seeded with a default five-category set (i18n-keyed labels, Lucide icons). Purely additive — the legacy flat MoodEntry.tags JSON column, the GLP-1 quick-tags, and the Telegram / MoodLog sync are untouched; an entry can carry both axes. Capture: the mood-logging form and the edit sheet gain a Textarea for the note (model + API already accepted it) and an icon-chip picker over the taxonomy catalog (GET /api/mood/tags). Create / update resolve the picked keys to links; unknown keys drop silently against the catalog. Insights: a structured-tag breakdown (icon + per-tag avg-mood lift) and a notes timeline join the existing distribution / weekday / flat-tag sections. The aggregate extension also fixes the flat-tag axis, which read the raw JSON string and so never populated. i18n across all six locales. Tests cover the taxonomy aggregation, the note round-trip, the structured-tag schema, and the notes timeline.