Commit graph

4 commits

Author SHA1 Message Date
9800d0a448 feat(pulse): two-box Fenja+poll, prominent hero, single-bg council, more air
Layout (per the v4 follow-up spec):

1b. Latest from Fenja is now a two-box layout when there's an attached
    poll: article on the left (wider), poll widget on the right. Without
    a poll, the article box takes the full row. Both boxes are surfaced
    on --surface-card with the same generous padding so they read as
    sibling pieces.

1c. Featured excerpt is extended to ~720 chars (was ~520) via a wider
    threshold on dispatchLongPreview. Below the article+poll row, the
    next two most-recent published dispatches render as minimalist rows
    — just title + kind + relative time, separated by ghost borders.

2.  Hero event: date column is now 150px wide (was 110px); grid uses
    align-items: center so the date+detail columns are vertically aligned
    rather than top-stuck. Day number scaled up to 3.5rem (was 2.75).
    Outer card padding bumped from --space-7 to --space-10. Hero title
    bumped to 2rem.

3.  More air: page-level section gap --space-10 → --space-12. Each
    on-page card has been re-padded; outer page horizontal padding goes
    down to --space-16 from --space-20 to match the narrower canvas.

6.  Council members no longer have individual card chrome. One outer
    --surface-card wraps the whole grid; each member cell is just an
    avatar + name + title + company stack with no background or border.
    Cells use a larger 6/8 grid gap so they don't crowd each other.

Inline poll widget on /dispatches/[slug]: when a dispatch has an
attached pulse, the article body is followed by a compact poll card
matching the /pulse-side widget. Vote POST handled inline; the page
re-renders with the locked + result-bar state.

scripts/seed-demo.js: the existing 'Which milestone should we anchor Q3
around?' pulse now attaches to the decision dispatch ('We are
deprioritising public-cloud parity for Q3') via pulse_id. Other
dispatches stay poll-free.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 10:19:00 +02:00
6b30593abb chore(seed): fake email domains + extend wipe chain
Swaps real-looking organisation domains in seed fixtures for the
virkN.dk placeholder pattern, so demos and screenshots can't be misread
as implying real-world relationships with the originals.

- mette@ssi.dkmette@virk1.dk
- lars@rigspolitiet.dklars@virk2.dk
- jonathan@fenja.aijonathan@studio.test (separate fake domain for the
  team account, kept distinct from the council virkN namespace)
- anna@kommune.dkanna@virk3.dk
- soren@energinet.dksoren@virk4.dk
- henriette@dnv.dkhenriette@virk5.dk

Organisation strings get the same treatment ('Virksomhed 1' …).

Also fixes two latent bugs surfaced while re-seeding:
- seed.js's INSERT didn't populate the slug column added in migration
  0003. After a re-seed the three base users had NULL slugs. Add a
  kebab-from-name fallback in the INSERT so slugs round-trip.
- seed.js's DELETE chain pre-dated the Phase 1/2 schema additions and
  failed FK constraints (pulses/dispatches/events/votes/activity/
  join_requests/roadmap_attributions). Extend the wipe order so all
  user-referencing tables clear before users.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:12:47 +02:00
ed2c272d3a chore: Studio hours rename + Phase 2 demo seed
Studio hours rename pass (one commit, grep-driven):
  - /pulse right-card eyebrow: 'Office hours' → 'Studio hours'
  - scripts/seed-demo.js: event title + description match the spec
    ('Studio hours with Jonathan' · '30-minute slots. Open agenda. Drop in
    when you've got something to talk through.')
  - No code-level enum changes — the kind value office_hours is preserved
    for back-compat; display labels switch wherever surfaced (admin form
    select, /pulse eyebrow, /events list and meta)

scripts/seed-demo.js — Phase 2 demo state. Destructive in scope (wipes the
data tables it owns then re-inserts), idempotent on re-run:
  - 4 cab members: Lars (existing) + Anna Kjær / Søren Vedel / Henriette
    Rask. cab_joined_date staggered 24/6/4/2 weeks ago so tenures vary.
    title, pull_quote, focus_tags populated per spec. member_number
    backfilled via the same SQL pattern as migration 0004 (deterministic).
  - 1 active pulse with 2 of 4 council members voted. Vote count on /pulse
    now reads '2 of 4 council members have weighed in.' — the line voted
    test was designed to lock down.
  - 4 roadmap items: Traceability layer (shipping, attributed to Lars),
    Document ingestion (beta, attributed to Anna + Søren), Contextual
    memory (exploring, attributed to Henriette), Agentic query mode
    (exploring, unattributed).
  - 3 contributions, most recent ('inline annotations' idea by Søren) has
    3 reactions — populates the RecentlyFromTheCouncil card.
  - 4 published dispatches at 2/5/9/12 days ago covering all four kinds
    (decision / behind_the_scenes / update / note). Real-ish prose so the
    excerpt cutter has actual sentence boundaries to find.
  - Events: hero dinner 5w out, Studio hours 2w out, a working_session 3w
    out (exercising the new kind), April roundtable 3w ago with a
    notes_url, March launch dinner 7.5w ago without notes (exercises both
    past-card thumb modes). Hero dinner has 1 confirmed RSVP (Lars) to
    drive the avatar pile at small scale.
  - Activity rows for the (now-hidden but still-written) feed so admin's
    Activity tab has something to display.

Smoke (curl as Lars): /pulse renders 'Good afternoon, Lars.' · COUNCIL · 001
· '2 of 4' · Latest from the studio · Recently from the council · Studio
hours. /members shows all four members with pull quotes + focus pills.
/events shows the dinner hero, 'Save your seat →', Studio hours +
working session in 'also coming up', April and March in 'past gatherings'.
/dispatches lists all four; /dispatches/{slug} renders body + adjacent
prev/next.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 16:16:24 +02:00
fe27811d16 chore(demo): seed-demo.js + utc fix for last_seen_at
scripts/seed-demo.js — one open Pulse with realistic context, marks
"Traceability layer" as shipping with shipped_at -2 days and attributes
it to the cab user, two events (dinner in 5 weeks, office hours in 2
weeks), six hand-crafted activity rows mixing all 5 activity kinds so
the ticker has something to scroll on first load. Idempotent: skips if
any pulses exist. Backdates Lars's cab_joined_date so the greeting
renders "2 years, 4 months". Wired to db:setup and db:seed:demo.

Also fixes a parse bug on /pulse: SQL stores last_seen_at as
'YYYY-MM-DD HH:MM:SS' UTC, but new Date(string) parses that as local
time — on a non-UTC server the freshness check was wrong by the server's
offset. Coerce to UTC ISO before parsing. Manual smoke as Lars now shows
two member chips in "online now"; admin tabs all render.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:04:11 +02:00