Beans records for the triangular per-day reveal work (Nth habit check
of the day reveals N units): vibed-fdph (completed, with the shipped
implementation summary) and a duplicate vibed-i315 opened in the same
session. Retained for the historical task record.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Milestone vibed-f05l and its seven subtasks laying out a new Rust CLI
binary that queries howlongtobeat.com and prints completion times.
Covers project init, request/response types, CLI arg parsing, the
HTTP search call, output formatting, and a validation/smoke-test pass.
No implementation yet — planning only.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds .claude/settings.json opting bit-by-bit into the frontend-design
plugin for future UI/design work on the pixel-art tracker.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Drop the pixelsPerCheck calibration constant that scaled units to a
fixed "perfect month" pace regardless of image size. 1 unit now equals
1 pixel directly (Nth check of the day reveals N pixels, multiplied by
that day's streak length), so bigger images genuinely take longer and
the numbers in the UI match what's actually happening. Also removes
the now-obsolete "~N days to finish" upload estimate and corrects the
About copy, which previously implied the streak multiplier applied
directly to pixel counts.
6 days ago
14 changed files with 234 additions and 67 deletions
A Rust CLI binary that searches HowLongToBeat.com and prints completion times (Main Story / Main + Extras / Completionist) for any game. Single binary named `hltb`, uses reqwest + clap + serde + tokio.
Reward doing more habits in a single day: the Nth habit checked in a day reveals N units of pixels (1+2+3+... = triangular). Derive revealed pixels from the log per-day triangular sum instead of a flat checks counter; recalibrate pixelsPerCheck so a perfect month still finishes an image. Update DESIGN.md, README.md, ARCHITECTURE.md.
## Summary of Changes
Escalating daily reward implemented in `index.html`:
- Reveal is now **derived from the log** instead of a stored `checks` counter. New helpers `triangular(k)` and `revealedUnits(image)` sum `k·(k+1)/2` units per day (days ≥ startedAt). The Nth habit checked in a day is worth N units, so a 4-check day = 1+2+3+4 = 10 units.
- `pixelsPerCheckFor` recalibrated to `max(1, round(opaque / (triangular(habitCount) · 30)))` so a perfect month still fills the image (verified: ~30 days).
- `onHabitToggle`: snapshots `before` prior to mutating the log; uncheck path no longer touches a counter (past days can't un-reveal). Removed unused `computeFloor`.
- Dropped vestigial `checks` field from `normalizeImage`/`buildImageFromDef`; legacy saves load fine (field ignored, reveal recomputed).
- Upload day-estimate updated to use `triangular(habitCount)·ppc` per perfect day.
Validation: no external refs (grep http/https/fetch clean), `node --check` passes, pure-function simulation confirms 3/6/9/12-px escalation and ~30-day perfect-month finish. Not opened in a live browser (none available in this environment).
## Browser Verification (headless Firefox 152)
Drove the real app's DOM in headless Firefox with a seeded 4-habit / 4x4-opaque state (pixelsPerCheck=1). Checking habits 1–4 revealed running totals 1, 3, 6, 10 (deltas +1, +2, +3, +4) — escalating exactly as specified, day total = 10. Unchecking the 4th dropped 10→6 (only today's contribution shrank). No console or window errors (`errors: []`).
Reward doing more habits in a single day: the Nth habit checked in a day reveals N units of pixels (1+2+3+... = triangular). Derive revealed pixels from the log per-day triangular sum instead of a flat checks counter; recalibrate pixelsPerCheck so a perfect month still finishes an image. Update DESIGN.md, README.md, ARCHITECTURE.md.
@ -5,7 +5,7 @@ Everything lives in one file, `index.html`, organized into sections:
| Component | Responsibility |
|---|---|
| **State** | Single JSON document under localStorage key `bitbybit.v1`; load/save with corruption guards; versioned for future migration. |
| **Mechanics** | Habit check/uncheck logging, daily rollover, streak math, seeded (mulberry32) reveal-order permutation, `pixelsPerCheck` calibration, and log-derived reveal: each day earns `triangular(checks)` base units (the Nth check is worth N), multiplied by that day's streak length. |
| **Mechanics** | Habit check/uncheck logging, daily rollover, streak math, seeded (mulberry32) reveal-order permutation, and log-derived reveal: each day reveals `triangular(checks)` pixels (the Nth check reveals N), multiplied by that day's streak length. |
| **Rendering** | Canvas renderer for the artwork (revealed pixels, checkerboard for hidden, pop-in animation for deltas); DOM renderer for checklist, stats, settings. |
| **UI wiring** | Onboarding, settings dialog (habits / artwork / data / about), theme cycling (auto→light→dark via `data-theme` + CSS custom properties), export/import/wipe, confetti celebration, and a page footer disclosing authorship. |