project-bifrost-platform/tests
Jonathan Hvid 096cdb00b6 feat(pulse): two-column greeting + tenure-milestone copy
Replaces the single-column greeting block with a 1fr / 1fr row. The left
side holds the date label (MONDAY, 11 MAY in tracked uppercase 11px,
swapped from the bullet separator to comma per spec), the serif 36px
greeting line ('Good morning, Jonathan.') with the first name italic,
and a milestone-aware tenure line. The right side (only rendered when
the user has a member_number — i.e. cab members) shows 'MEMBER · NNN'
zero-padded above 'Founding circle' in serif.

tenureMilestone(days) is the new helper that produces the milestone copy
through seven buckets: 0 / 1–6 / 7–20 / 21–55 / 56–180 / 181–364 / 365+.
The 1–6 bucket renders 'Day 2.', 'Day 3.' etc. (day count is days-since-
join; day one is the first 24 hours after joining). The months bucket
uses Math.floor(days/30) with a min of 2 to avoid a one-day-after-21
reading '1 months in.'. Years pluralise normally.

daysSince(iso) — small wrapper that handles SQL date strings ('YYYY-MM-DD
HH:MM:SS' or pure dates) and returns whole-day UTC delta. Same UTC
coercion the rest of the page uses.

Tests: 7 cases for tenureMilestone at the boundary days 0/1/7/22/60/200/
400 (plus an extra 730 to exercise the year plural). 43/43 passing.

This block replaces the in-line <MembershipCard> idea that was floating
around in earlier passes; the dark indigo card stays in src/components
for /members/:slug, but on /pulse the two-line stamp is enough.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 10:48:50 +02:00
..
dispatches.test.ts feat(component): DispatchesSection + reusable Avatar + tests 2026-05-11 15:57:52 +02:00
focus-tags.test.ts feat(db): dispatches + member-number allocation + focus-tags parser 2026-05-11 15:55:35 +02:00
home-route.test.ts test: vitest suite — pulse status, vote uniqueness, home route 2026-05-11 14:45:55 +02:00
member-number.test.ts feat(db): dispatches + member-number allocation + focus-tags parser 2026-05-11 15:55:35 +02:00
pulse-status.test.ts test: vitest suite — pulse status, vote uniqueness, home route 2026-05-11 14:45:55 +02:00
setup.ts test: vitest suite — pulse status, vote uniqueness, home route 2026-05-11 14:45:55 +02:00
tenure-milestone.test.ts feat(pulse): two-column greeting + tenure-milestone copy 2026-05-12 10:48:50 +02:00
vote-count.test.ts feat(pulse): nav restructure, white surfaces, membership card, dispatches 2026-05-11 16:02:46 +02:00
votes.test.ts test: vitest suite — pulse status, vote uniqueness, home route 2026-05-11 14:45:55 +02:00