mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
feat(achievements): definitions for v1.4.18 expanded set + hidden Easter-eggs
Lifts the roster from 38 to 59. Adds three buckets: - mood (4 badges): first entry, 7-day diarist, 30-day diarist, brighter-week (mood mean improved by ≥1.0 vs prior 7-day mean) - vitals counts (7): first/50/200 weigh-ins, first/50/200 BP readings, first pulse log - engagement (4): consistent month (≥25 distinct days in a calendar month), entry-streak 7d/30d, weekend warrior Plus 6 hidden Easter-eggs: night-owl, early-bird, leap-day, doctor-PDF export, locale-flip, bug-buddy (≥5 reports). Hidden achievements never leak their conditions to the DOM — locked cards paint a generic "Hidden achievement" placeholder. Adds `EarnabilityFlags` + `applyDiscoveryFilter` so a public locked achievement only renders when the user has the underlying data (e.g. a mood-streak badge stays hidden until they log their first mood). Hidden Easter-eggs ignore the flags. Already-unlocked badges always render so deleting data doesn't make completed achievements disappear. EN+DE strings for every new badge plus the hidden-card placeholder copy and the hidden-unlock toast strings. CATEGORY_LABEL_KEY now covers mood + hidden so the discriminated-union check passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e73813ad7c
commit
19b08442b4
8 files changed
+1183
-67
No files matched your search
@@ -63,6 +63,7 @@ const baseAchievement: AchievementProgress = {
|
||||
unlocked: true,
|
||||
progressPercent: 100,
|
||||
completedAt: "2026-04-15T12:00:00.000Z",
|
||||
isHidden: false,
|
||||
};
|
||||
|
||||
describe("pickRecentUnlocks", () => {
|
||||
|
||||
Reference in new issue
Block a user