Activity Chart Intensity Logic

Nucleic-Session: 76D64900-B16F-45BE-A6CB-E3D2EBC7C73A
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-06-27 19:14:40 -07:00
co-authored by Nucleic
parent 93d91b6c10
commit ca2a270fad
@@ -18,6 +18,12 @@ struct HomeView: View {
Dictionary(store.dashboard.activity.map { (Calendar.current.startOfDay(for: $0.day), $0.count) },
uniquingKeysWith: +)
}
/// Tokens used per day — the activity grid's primary intensity signal (falls back to message
/// count for days without recorded usage). Mirrors the Mac home.
private var tokensByDay: [Date: Int] {
Dictionary(store.dashboard.activity.map { (Calendar.current.startOfDay(for: $0.day), $0.tokens) },
uniquingKeysWith: +)
}
/// Current activity streak with streak freezes folded in — the run of consecutive active
/// days, where a banked freeze (one earned per five days) bridges a missed day. Shared with