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:15:37 -07:00
co-authored by Nucleic
parent 4c19bffc54
commit 7459276ec0
@@ -128,10 +128,14 @@ final class RemoteStore: ObservableObject {
let cal = Calendar.current let cal = Calendar.current
let today = cal.startOfDay(for: Date()) let today = cal.startOfDay(for: Date())
let activity = (0..<40).map { i -> ActivityDay in let activity = (0..<40).map { i -> ActivityDay in
ActivityDay(day: cal.date(byAdding: .day, value: -i, to: today)!, count: (i * 7) % 6) let count = (i * 7) % 6
// Sample tokens roughly track messages so the preview grid shades by usage.
ActivityDay(day: cal.date(byAdding: .day, value: -i, to: today)!,
count: count, tokens: count * 8_500 + (i * 137) % 4_000)
} }
dashboard = DashboardSnapshot( dashboard = DashboardSnapshot(
counts: DashboardCounts(projects: 2, chats: 5, activeChats: 2, messages: 142, activeDays: 9), counts: DashboardCounts(
projects: 2, chats: 5, activeChats: 2, messages: 142, activeDays: 9, tokens: 1_284_000),
activity: activity, activity: activity,
projects: [ projects: [
WireProject(id: p1, name: "nucleic", defaultBranch: "main", sessionCount: 3, activeCount: 2), WireProject(id: p1, name: "nucleic", defaultBranch: "main", sessionCount: 3, activeCount: 2),