User story
As a user, I want to see a compact 30-day heatmap and a "X / 7 this week" summary for each habit, so that I can spot patterns like always skipping weekends at a glance.
Acceptance criteria
Definition of done
npm test and npm run build pass; UI additions are confined to src/main.ts and src/style.css; no business logic added outside src/habits.ts.
Source: REQ-002 (vault/02 - Requirements/REQ-002 - Insight heatmap and weekly stats.md)
User story
As a user, I want to see a compact 30-day heatmap and a "X / 7 this week" summary for each habit, so that I can spot patterns like always skipping weekends at a glance.
Acceptance criteria
src/main.tsrenders a 30-cell CSS-grid heatmap showing the last 30 days (today = rightmost cell).last7Count(habit, today)fromsrc/habits.ts.completionsInRange(habit, fromDay, toDay)(or per-day lookups using the same pure helpers) — no inline date arithmetic duplicated insrc/main.ts.titleattribute with the ISO date it represents.npm testandnpm run buildboth pass with no new type errors.Definition of done
npm testandnpm run buildpass; UI additions are confined tosrc/main.tsandsrc/style.css; no business logic added outsidesrc/habits.ts.Source: REQ-002 (vault/02 - Requirements/REQ-002 - Insight heatmap and weekly stats.md)