From 91529227fd42739de79d4029bc17c47263a31814 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:45:31 +0000 Subject: [PATCH 1/3] docs: add PRD for always-on multi-scale Life Blocks panel Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/0880a772-945e-4763-8d3a-99603695b920 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> --- docs/prd-life-blocks-always-on.md | 177 ++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 docs/prd-life-blocks-always-on.md diff --git a/docs/prd-life-blocks-always-on.md b/docs/prd-life-blocks-always-on.md new file mode 100644 index 0000000..cb3a252 --- /dev/null +++ b/docs/prd-life-blocks-always-on.md @@ -0,0 +1,177 @@ +# PRD: Always-On Life Blocks — Automatic Multi-Scale Countdown + +**Status:** Draft +**Section affected:** Life Blocks (`#life-blocks-section`, `script.js`, `styles.css`) + +--- + +## 1. Problem + +The current Life Blocks section requires the user to click through four drill-down levels (days → hours → minutes → seconds) to see the real-time granular destruction of time. +Most users never reach the seconds view — the most viscerally compelling level — because the interaction model is hidden behind clicks and a breadcrumb they may not notice. + +--- + +## 2. Goal + +Deliver the full emotional impact of time being consumed **without any user interaction**, while keeping the existing drill-down view intact for users who want to explore manually. + +--- + +## 3. Proposed Solution: Always-On Temporal Stack + +Add a new **"Now" panel** directly below the existing Life Blocks heading. +The panel renders six compact, labelled rows of blocks — one row per time scale — all visible simultaneously, all animating in real time as soon as the section enters the viewport. + +| Row | Unit | Blocks | Block = | +|-----|------|--------|---------| +| Years | 1 row | 10 blocks | 1 year each (past decade, current, future) | +| Months | 1 row | 12 blocks | 1 month of the current year | +| Days | 1 row | 31 blocks | 1 day of the current month | +| Hours | 1 row | 24 blocks | 1 hour of today | +| Minutes | 1 row | 60 blocks | 1 minute of the current hour | +| Seconds | 1 row | 60 blocks | 1 second of the current minute | + +Each row always shows **dead** (elapsed), **dying** (current), and **future** blocks using the existing visual vocabulary (`lb-dead`, `lb-dying`, `lb-future`, `lb-exploding`). +The dying block in every row fills progressively and explodes at its natural boundary (second, minute, hour, day, month, year). + +The existing click-through drill-down panel is **preserved unchanged** below the new panel, with its own heading and breadcrumb. + +--- + +## 4. User Experience + +### 4.1 Scroll-to-activate +- Activate on IntersectionObserver (threshold ≈ 20 % visible) — no click required. +- RAF loop for the new panel starts on first intersection, pauses when the section leaves the viewport (performance). + +### 4.2 Visual hierarchy +- New panel sits inside `#life-blocks-section`, before the existing `#lb-container`. +- A single shared section heading and intro paragraph describe both panels. +- The new panel uses a slightly subdued palette (reduced opacity on future blocks, narrower block size) so it reads as a quick overview rather than the full interactive grid. + +### 4.3 Animations +- Reuse `lb-exploding` keyframe and `lb-pulse-dying` animation from existing CSS. +- At the seconds boundary: the dying second block explodes, the next becomes dying. +- At the minutes boundary: the dying minute AND second rows both refresh simultaneously (explosion on the minute's dying block, new second row redraws). +- Same cascade applies up the chain at hour, day, month, year boundaries. + +### 4.4 Row labels +Each row has a short left-aligned label (`YEARS`, `MONTHS`, `DAYS`, `HOURS`, `MINS`, `SECS`) in the existing monospace font at subdued opacity, sized to match the existing `.lb-info` style. + +### 4.5 Accessibility +- Each row is a `
` inside a `
`. +- Dying blocks carry a live `aria-label` updated each second (e.g., `"Second 42 of 60 — active"`). +- The entire always-on panel has `aria-live="polite"` with update throttling (update aria labels at most once per second). + +--- + +## 5. Out of Scope + +- No click/drill-down behaviour on the new panel's blocks. +- No changes to the existing drill-down panel's logic or data model. +- No new npm dependencies. +- No changes to `death-clock-core.js` (pure functions are already sufficient). + +--- + +## 6. Technical Design + +### 6.1 New DOM structure (in `index.html`) + +```html + +
+
+
+
+
+
+
+
+``` + +Placed in `index.html` immediately before `