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.
| File | Purpose |
|---|---|
src/app/(tabs)/stats.tsx | Statistics route. |
src/app/statistics/[id].tsx | Per-habit summary route. |
src/app/statistics/history/[id].tsx | Month history route. |
src/features/statistics/StatisticsUI.tsx | Screen composition. |
src/features/statistics/calculations.ts | Consistency and weekday math. |
src/features/statistics/analytics.ts | Habit and overall summaries. |
Laying out Statistics slice…
ScreensFeaturesLocal dataDeviceCloudon-device datacloud sync
Talks to
Sources: src/features/statistics/calculations.ts, src/features/statistics/analytics.ts (documented at commit 99a2c3d)