A streak is brutal by design: miss a week and it’s back to zero. That’s what makes it work, and it’s also why people quit after breaking one. So each habit has a second number, strength, in the spirit of Loop Habit Tracker’s habit score: slow to rise, slow to fall.
The first version was wrong
Strength started as a rolling average over days. The problem showed up on Mondays: a three-days-a-week habit, freshly into a new week with nothing done yet, looked like it was failing. The number dipped every week at exactly the point where nothing had gone wrong.
Weeks, not days
It’s now an average over weeks of how much of each week’s target you met:
values = [min(1.0, c.days / c.target) for c in weeks
if c.status != "paused" and (c.status != "open" or c.days >= c.target)]
score = values[0]
for value in values[1:]:
score += 0.25 * (value - score)
- Each week counts as the fraction of its target you met.
- The week in progress only counts once it’s met, so a Monday isn’t a failure.
- Paused weeks are skipped.
- Each new week moves the score a quarter of the way, so it has about a month of memory.
A missed week dents it; it doesn’t erase months. The habit page says exactly that under the number, because a score nobody can explain is a score nobody trusts.
AlzyWelzy
Building PaceStreak. GitHub
Related
ProductHabits on chosen days, and pausing just one
A habit can now be planned for specific weekdays, and paused on its own while everything else carries on. Both had to mean the same thing to the streak, the reminders and the badge.
2 min
Security & PrivacyOne grid: training and habits look the same on purpose
Training sessions and habits render on the identical week grid, with the identical marker X. The product doesn't visually distinguish 'important' streaks from 'personal' ones, because that distinction is exactly what would make a habit legible to anyone glancing at the screen.
2 min
DesignThe weekly target leaves room for rest
A daily streak has no concept of a planned day off: every rest day looks identical to a missed one. Counting weeks against a target you set yourself is what lets rest be a decision instead of a risk.
2 min