Skip to content

feat(achievements): add 67 and 666 reading streak achievements#3986

Closed
idoshamun wants to merge 3 commits into
mainfrom
feat/reading-streak-achievements-67-666
Closed

feat(achievements): add 67 and 666 reading streak achievements#3986
idoshamun wants to merge 3 commits into
mainfrom
feat/reading-streak-achievements-67-666

Conversation

@idoshamun

Copy link
Copy Markdown
Member

What

Adds two new reading_streak milestone achievements:

Streak Name Points
67 What time is it? 35
666 Devil is impressed 50

Full reading-streak set is now 10, 50, 67, 365, 512, 666, 1024.

Changes

  • Migration AddMoreReadingStreakAchievements — inserts the two achievement rows (badges already uploaded to Cloudinary achievements/ folder).
  • Backfill bin/syncReadingStreakAchievements.ts — one-off script to retroactively unlock the new milestones for users whose maxStreak already qualifies. Idempotent (reuses updateUserAchievementProgress), scoped to the two new achievements and maxStreak >= 67.

Post-deploy

Run the backfill after this migration deploys (the rows must exist first):
npx ts-node bin/syncReadingStreakAchievements.ts

Notes

No new unit test: the CDC worker already covers the generic reading-streak unlock path; 67/666 exercise the identical evaluateAbsoluteValueAchievement code path. Migration verified by applying locally; existing streak tests pass.

idoshamun added 3 commits July 7, 2026 09:55
Extend ContributionRewardType with store_discount, suggest_causes,
council, patchy_picture, joke and trivia. Cores and plus_days already
grant automatically; the new types now:
- suggest_causes: grants the cause-suggestion right via a user flag
- store_discount, council: mark fulfilled and ping #contributions with
  the contributor's email so the team can send the coupon / invite
- patchy_picture, joke, trivia: content-only, mark fulfilled (payload
  rides on the tier metadata, rendered client-side)

Slack fires after the claim commits, so a failed claim never notifies
and a Slack outage never fails the claim.
Address review: use the Feature table (wired to the feature-flag system)
for the suggest_causes right instead of a User.flags field. Adds a
contribution_suggest_causes FeatureType, granted idempotently on claim.
Add contributionFoundingAward query returning totalSpots, claimedCount,
and the visitor's founding membership + 1-based number (null for
non-members/anon). Public like contributionStatus so the spots counter
renders for everyone. Frontend was showing hardcoded placeholders.
@idoshamun idoshamun closed this Jul 7, 2026
@idoshamun idoshamun deleted the feat/reading-streak-achievements-67-666 branch July 7, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant