Feature: Personal streaks and cadence achievements #41
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Gamification without badges or leaderboards.
Powered by the metrics engine (#31).
⏸ Needs Decision
Blocking factors:
Scope: medium Risk: low Spec: aligned Type: feature
Summary: Add private, opt-in streak tracking and milestone achievements for maintaining personal contact frequency goals with each person.
Suggestion: Implement as a pure computation layer (streak-engine.ts) deriving per-person streaks from existing Person.lastContact + contactFrequencyGoal + Interaction dates, then add per-person streak indicators to PersonDetail and aggregate milestone callouts to the dashboard. The referenced metrics engine (#31) doesn't exist yet, so skirt that dependency by computing directly from Dexie data using date-fns week-aligned comparisons. Keep it contained: ~5-8 files (new utility + types touch-up + UI components), no DB schema changes, no new IndexedDB tables.
Rationale: SCOPE medium because this is a new subsystem requiring a computation engine, per-person UI integration, and aggregate dashboard display (~5-8 files). RISK low: purely additive reads from existing Person and Interaction data — no data model changes, no breaking changes to core paths. SPEC aligned: contact frequency goals + overdue alerts already exist; streaks are a natural, privacy-preserving gamification extension. TYPE feature: entirely new capability. Key observation: metrics engine #31 is referenced but doesn't exist in the codebase — the implementation must either build it first or absorb its role directly.
Action: Review each blocking factor above. Remove
blocked:needs-decisionlabel to route back to triage.GSD VERIFY phase failed after 3 attempts.
Conformance failure: Expected files not modified: src/components/StreakBadge.tsx (new), src/components/StreakSection.tsx (new), src/components/tests/StreakBadge.test.tsx (new), src/lib/date-utils.ts, src/lib/db.ts; StreakSection.tsx line 40 has redundant
useStorecall (const personMap = useStore((s) => s.people)) duplicating thepeopleselector from line 21. This violates (g) - unnecessary code that createsImplemented in
209eb7c.What was built:
streak-engine.ts— pure computation: per-person weekly streaks + global milestones (4/8/12/24 weeks)StreakBadge— flame icon badge, color-coded by streak lengthMilestoneCallout— dashboard cards showing achieved/locked milestonesDesign: No DB schema changes. Entirely computed from existing Person + Interaction data. Private, no social comparison. 1.39 kB gzipped.