Skip to content

feat(leaderboard): swap coarse N-days tile for a mini D/H/M countdown#291

Merged
0800tim merged 1 commit into
mainfrom
feat/leaderboard-mini-countdown
Jun 5, 2026
Merged

feat(leaderboard): swap coarse N-days tile for a mini D/H/M countdown#291
0800tim merged 1 commit into
mainfrom
feat/leaderboard-mini-countdown

Conversation

@0800tim

@0800tim 0800tim commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Tim 2026-06-05: the third hero tile on /leaderboard read "7 DAYS / TO KICKOFF" while the actual remaining time was 6 days and change (the old logic ceil-rounded the day count, inflating by one for most of any given day). Replaced with a mini countdown using the home-page aesthetic but at tile scale; days / hours / minutes only, ticks once a minute, snaps to "Live" past the kickoff instant.

  • New inline MiniCountdownTile component in the page
  • .vt-lb-hero-card--countdown styles in leaderboard.css with the same radial-gold wash as the home banner
  • Drops the now-unused daysToKickoff state + kickoffLabel memo

Same kickoff target as the home page (2026-06-11T19:00:00Z).

…untdown

Tim 2026-06-05: the third hero tile on /leaderboard read "7 DAYS / TO
KICKOFF" when the actual remaining time was 6 days and change. The
old logic was `Math.ceil((kickoff - now) / 86_400_000)` which rounds
UP, so anything strictly less than a whole day inflated by one. With
five days to kickoff this would have read "7 days" for most of the
last week of the runway.

Swapped it for a mini countdown styled to echo the home-page banner
(gold-on-dark cells, Fraunces digits, mono labels), but at hero-tile
scale and showing days/hours/minutes only. No seconds because the
tile is glanced at, not stared at, and a one-minute tick avoids any
pulse animation distracting from the leaderboard below.

* Drops the `daysToKickoff` state + `kickoffLabel` memo from the
  page; the static "brackets locked" + "syndicates running" tiles
  stay as before.
* Adds a small `MiniCountdownTile` component (with three
  `MiniCell`s) inline in the page file. Seeds `now` from the
  kickoff timestamp so SSR + first client render agree, suppresses
  the expected hydration mismatch on the digit nodes only.
* Adds `.vt-lb-hero-card--countdown` + `.vt-lb-mini-countdown` styles
  to leaderboard.css, sharing the radial-gold wash with the home
  page banner but at smaller cell sizes.
* When the kickoff instant passes, the tile reads "Live" + "to
  kickoff" (instead of an all-zeros grid) to match the
  `pastLabel` semantics of the main banner.

Same target instant as the home page: 2026-06-11T19:00:00Z.

Refs: docs/internal/home-polish-spec.md
Signed-off-by: Tim Thomas <0800tim@gmail.com>
@0800tim 0800tim merged commit 849a363 into main Jun 5, 2026
11 of 12 checks passed
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

DRY-RUN — this verdict is informational; CI is not blocked.

Auto-triage: GREEN — auto-triage clear

Risk score: 0/100

Metric Value
Files changed 2
Lines added 122
Lines removed 27
Apps touched apps/web
New dependencies 0
New 3rd-party hosts 0

No flags raised by the automated scanners. A human reviewer will still take a look.

Labels applied: area:web, auto-triage:green

Posted by @vtorn/pr-triage-bot. How this works: docs/security/01-pr-triage-process.md. Disagree with the verdict? Comment /triage override <reason> and a maintainer will re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant