mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
feat(mood): curate default tag catalog
Deactivate the redundant default tags happy, excited, hydrated
("Wasser getrunken") and music; re-activate overtime in the work
category (0126 had retired it); add a new default work tag praise
("Lob" / "Praise", Lucide ThumbsUp) with i18n across all six locales.
factor_sleep_quality stays a RATED factor: its removal was premised on
a dedicated sleep-quality slider that does not exist in the capture
surface, so dropping it would lose the signal with no replacement.
Reference-data only — is_active flips plus an idempotent keyed upsert,
no schema change, no per-user data touched; historical tag links keep
resolving their labels.
This commit is contained in:
1 parent
588a3a4a8d
commit
7b0688b37e
7 files changed
+53
-6
No files matched your search
+2
-1
@@ -654,7 +654,8 @@
|
||||
"factorStress": "Stress",
|
||||
"factorConflict": "Konflikt",
|
||||
"factorFamily": "Familie",
|
||||
"factorSadness": "Traurigkeit"
|
||||
"factorSadness": "Traurigkeit",
|
||||
"praise": "Lob"
|
||||
},
|
||||
"filterBySource": "Nach Quelle filtern",
|
||||
"sourceManual": "Manuell",
|
||||
|
||||
+2
-1
@@ -654,7 +654,8 @@
|
||||
"factorStress": "stress",
|
||||
"factorConflict": "conflict",
|
||||
"factorFamily": "family",
|
||||
"factorSadness": "sadness"
|
||||
"factorSadness": "sadness",
|
||||
"praise": "praise"
|
||||
},
|
||||
"filterBySource": "Filter by source",
|
||||
"sourceManual": "Manual",
|
||||
|
||||
+2
-1
@@ -654,7 +654,8 @@
|
||||
"factorStress": "estrés",
|
||||
"factorConflict": "conflicto",
|
||||
"factorFamily": "familia",
|
||||
"factorSadness": "tristeza"
|
||||
"factorSadness": "tristeza",
|
||||
"praise": "elogio"
|
||||
},
|
||||
"filterBySource": "Filtrar por fuente",
|
||||
"sourceManual": "Manual",
|
||||
|
||||
+2
-1
@@ -654,7 +654,8 @@
|
||||
"factorStress": "stress",
|
||||
"factorConflict": "conflit",
|
||||
"factorFamily": "famille",
|
||||
"factorSadness": "tristesse"
|
||||
"factorSadness": "tristesse",
|
||||
"praise": "compliment"
|
||||
},
|
||||
"filterBySource": "Filtrer par source",
|
||||
"sourceManual": "Manuel",
|
||||
|
||||
+2
-1
@@ -654,7 +654,8 @@
|
||||
"factorStress": "stress",
|
||||
"factorConflict": "conflitto",
|
||||
"factorFamily": "famiglia",
|
||||
"factorSadness": "tristezza"
|
||||
"factorSadness": "tristezza",
|
||||
"praise": "elogio"
|
||||
},
|
||||
"filterBySource": "Filtra per fonte",
|
||||
"sourceManual": "Manuale",
|
||||
|
||||
+2
-1
@@ -654,7 +654,8 @@
|
||||
"factorStress": "stres",
|
||||
"factorConflict": "konflikt",
|
||||
"factorFamily": "rodzina",
|
||||
"factorSadness": "smutek"
|
||||
"factorSadness": "smutek",
|
||||
"praise": "pochwała"
|
||||
},
|
||||
"filterBySource": "Filtruj według źródła",
|
||||
"sourceManual": "Ręcznie",
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
-- v1.16.13 — operator mood-tag catalog curation.
|
||||
--
|
||||
-- Reference-data only on top of 0101 / 0118 / 0119 / 0126. No schema
|
||||
-- change, no per-user data touched, no destructive delete — every change
|
||||
-- is an `is_active` flip or an idempotent upsert keyed by `key`, so a
|
||||
-- re-run is a no-op and historical `mood_entry_tag_links` rows keep
|
||||
-- resolving their labels (the insights read joins the catalog row by id
|
||||
-- and does NOT filter `is_active`).
|
||||
--
|
||||
-- Operator walked the capture sheet and asked for:
|
||||
-- - deactivate the redundant default tags `happy`, `excited`,
|
||||
-- `hydrated` ("Wasser getrunken") and `music`;
|
||||
-- - keep `overtime` active — 0126 had deactivated it as a low-signal
|
||||
-- day-type tag, but the operator wants it back in the work picker;
|
||||
-- - add a new default tag `praise` ("Lob" / "Praise") under the work
|
||||
-- category, Lucide `ThumbsUp` (already in the iOS Lucide→SF table).
|
||||
--
|
||||
-- factor_sleep_quality is deliberately LEFT untouched: the curation note
|
||||
-- premised its removal on a dedicated sleep-quality slider elsewhere, but
|
||||
-- no such slider exists in the capture surface. It stays one of the three
|
||||
-- surviving RATED factors (work / sleep quality / sadness) seeded by 0126.
|
||||
|
||||
-- ─── Deactivate the four redundant default tags ──────────────────────
|
||||
UPDATE "mood_tags"
|
||||
SET "is_active" = false
|
||||
WHERE "key" IN ('happy', 'excited', 'hydrated', 'music');
|
||||
|
||||
-- ─── Re-activate overtime in the work category ───────────────────────
|
||||
UPDATE "mood_tags"
|
||||
SET "is_active" = true
|
||||
WHERE "key" = 'overtime';
|
||||
|
||||
-- ─── New default tag: praise (work) ──────────────────────────────────
|
||||
-- Sort after the existing work tags (productive 0, overtime 1, day_off 2,
|
||||
-- travel 3, sick_day 4). ThumbsUp keeps the iOS render native (no app
|
||||
-- update needed). Idempotent upsert by `key`, mirroring 0101 / 0118.
|
||||
INSERT INTO "mood_tags" ("id", "category_id", "key", "label_key", "icon", "sort_order", "is_active")
|
||||
VALUES ('mt_praise', 'mtc_work', 'praise', 'mood.tag.praise', 'ThumbsUp', 5, true)
|
||||
ON CONFLICT ("key") DO UPDATE SET
|
||||
"category_id" = EXCLUDED."category_id", "label_key" = EXCLUDED."label_key", "icon" = EXCLUDED."icon",
|
||||
"sort_order" = EXCLUDED."sort_order", "is_active" = EXCLUDED."is_active";
|
||||
Reference in new issue
Block a user