- useAsyncAction: the run(key,fn){busy;error;refresh} pattern was copy-pasted
across 8 team components. Extract one hook (SSOT); adopt it in the 3 new
coordination components (Goals/Metrics/JoinButton).
- Placeholder Dana → David (Dani = Daniel; keep gender). Email + seed updated;
stale "Platzhalter surname is the marker" comment corrected (email domain is
the only marker now).
- scripts/db/seeds/team-coordination-examples.sql: example goals + KPIs on the
Reparatur team so the hub isn't empty (idempotent; editable rows).
Verified: typecheck + lint (0 errors). Prod DB updated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename the 15 placeholders from "<First> Platzhalter" to "<First> <rock legend>"
(Vera Hendrix, Rezo Hetfield, …). First name still starts with the same letters
as the real teammate so who-is-who stays clear; the @placeholder.revamp-it.ch
email remains the systematic not-yet-claimed marker. Applied to prod via UPDATE.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migration 130 adds the 4 teams the Teamsliste has beyond 129's first four:
verkauf, lager, reparatur, and fundraising (seeded is_active=false — crossed
out on the source; kept for history, not deleted). mail_folders left empty
(source listed none for these) — fill via /admin/teams, never guess an address
onto the wrong team.
Seed (scripts/db/seeds/team-placeholders.sql, NOT a migration → never runs in
CI/fresh dev) creates 15 locked placeholder members + 30 memberships across all
8 teams. Placeholders are password_hash NULL (cannot log in until claimed),
surname "Platzhalter" + @placeholder.revamp-it.ch domain (findable/claimable
markers). Real people onboard later by claiming their row via a registration
link. Georgy is the only real account (georgy.butaev@revamp-it.ch), never
pseudonymised. Roles map the Teamsliste's Haupt/Vertretung → lead/deputy.
Applied + recorded on prod; verified all 8 teams read correctly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Until now, the /workshops list and the "what we need" cards on
/projects/upcycling showed German DB content (workshop titles, durations,
levels, categories, need titles + descriptions) regardless of locale —
because those fields were single TEXT columns with one German value.
Migration 088 adds sibling JSONB columns `<field>_i18n` of shape
{ en, fr, es, it, ja, ko, ru → translated string } on:
- workshops: title, description, short_description, duration, level, category
- project_needs: title, description, target_unit
Each column nullable, no default — empty = the helper falls back to the
canonical DE column. Idempotent (ADD COLUMN IF NOT EXISTS), already
applied to Neon production.
New helper src/lib/i18n/db-content.ts → `pickI18n(canonical, jsonb, locale)`
encapsulates the picking strategy in ONE place (SSOT). `de` → canonical.
Other locales → JSONB[locale] if present, else canonical. NULL safety
built in so callers pass raw rows.
Two consumers updated at the data boundary so the client never touches
JSONB:
- src/app/[locale]/workshops/page.tsx — accepts params.locale, selects
all the *_i18n columns, runs each row through pickI18n before passing
to WorkshopBrowseClient
- src/app/api/projects/[slug]/needs/route.ts — resolves visitor locale
from URL prefix or NEXT_LOCALE cookie, applies pickI18n on the way
out, same shape as before
Seed data:
- scripts/db/seeds/001_workshops_and_needs_i18n.sql — hand-translates
all 6 active workshops (Linux/Open-Source/Computerreparatur/
Bitcoin/AI/Kreatives Programmieren) and all 7 open project_needs
(CE engineer, electronics, sheltered workshop, facility mgmt, 24"+
monitors, LCA funding, per-model docs) into 7 locales. Applied
to production immediately.
Result: /ru/workshops now reads "Семинар по Linux · 2 дня · От начинающего
до продвинутого", /fr/workshops reads "Atelier Linux · 2 jours · Débutant
à avancé", etc. /ru/projects/upcycling needs cards read in Russian.
CI gate: any future locale missing here means the visitor sees DE — not
a leak (the schema permits it intentionally as a fallback). New rows
inserted via admin UI need translations entered alongside; future admin-
UI work can surface the seven locale fields per text column. Out of scope.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>