learn

Statistics and streaks

Consistency math over local entries.

Consistency counts scheduled check-ins completed through the current day — future days never dilute the score. Best weekday looks back thirty days. Per-habit screens reuse the same summaries with their own history view.

What it owns

  • Scheduled check-in consistency through today
  • Average weekly consistency for the month
  • Totals, streaks, and best weekday

Files

File list and purposes from the folder README.

FilePurpose
src/app/(tabs)/stats.tsxStatistics route.
src/app/statistics/[id].tsxPer-habit summary route.
src/app/statistics/history/[id].tsxMonth history route.
src/features/statistics/StatisticsUI.tsxScreen composition.
src/features/statistics/calculations.tsConsistency and weekday math.
src/features/statistics/analytics.tsHabit and overall summaries.
Statistics slice
ScreensFeaturesLocal dataDeviceCloudon-device datacloud sync

Talks to

Sources: src/features/statistics/calculations.ts, src/features/statistics/analytics.ts (documented at commit 99a2c3d)

On this page