You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vibed/.beans/vibed-4rql--per-habit-strea...

1.8 KiB

title status type priority created_at updated_at
Per-habit streaks: each habit scores its own streak value completed feature normal 2026-07-16T16:31:23Z 2026-07-16T16:37:00Z

Replace the single day-level streak + triangular(checks) reveal formula with per-habit streaks: each habit tracks its own consecutive-day streak, and checking it reveals pixels equal to that habit's current streak length (1st day = 1 pixel, 2nd consecutive day = 2, etc.), with no cross-habit multiplier. Remove the global streak header/stat chip entirely (per user decision) and show each habit's own streak inline on its row instead. Update DESIGN.md, README.md, ARCHITECTURE.md, and index.html (mechanics + About text + UI).

Summary of Changes

  • index.html: replaced the day-level triangular(checks) × streak-multiplier reveal with per-habit streaks. Added habitStreakEndingOn(log, habitId, day) and currentHabitStreak(log, habitId, today) (display, forgives an unchecked-yet today); revealedUnits() now sums each checked habit's own streak length per day. Removed triangular(), streakOnDay(), and the global computeStreak().
  • Removed the global "🔥 N-day streak" header label and stat chip entirely (per user decision); each habit row now shows its own inline streak badge (e.g. 🔥3) when > 0.
  • Updated the in-app About text and CSS (.habit-streak, removed .streak-label).
  • Updated docs/DESIGN.md (§2 mockup, §3.2, §3.4, §9), docs/ARCHITECTURE.md, and README.md to describe per-habit streak scoring instead of day-level/triangular + multiplier.
  • Validated with a Playwright smoke test (seeded localStorage, checkbox clicks) confirming reveal math, streak badges, and toast deltas; no console errors or non-file:// requests. Also captured a headless screenshot to confirm the UI layout.