refactor(gamification): extract achievements builder out of the route

Move the day-series, completion-date, and streak helpers plus
buildAchievementsResult and the hidden-card spoiler shields into
src/lib/gamification/achievements-result.ts (verbatim). The route drops
from 1247 to 136 LOC and is now auth -> module gate -> cached ->
idempotent unlock-persistence -> apiSuccess (web + iOS format).

No behaviour change: the aggregation moved as-is, the cached factory
contract and the off-cache pendingUnlocks persistence are unchanged.
This commit is contained in:
Marc-André Bombeck committed 2026-06-16 23:28:55 +02:00
1 parent 9bd46ff25d
commit 03034339d6
2 files changed
+1137 -1116

No files matched your search

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff