feat(sessions): import language tag from Sessionize Language category
Sabrina's backlog: show a per-session delivery language in the sessions
overview. Sessionize has no native language field (verified live), so the
sidecar now resolves each session's categoryItems against a session
category titled "Language" (Sessionize's own demo-endpoint pattern) and
ships it as a plain string; a native session.language wins if it ever
appears.
- migration 20261021090000: sessions.language + re-created
get_agenda / sync_sessionize_event / sync_sessionize_excel. Language
upserts with the same coalesce(excluded, existing) rule as level/area,
so a source without language never erases it. get_agenda is dropped +
re-created (OUT shape change) and re-granted to anon/authenticated.
- sidecar: transform extracted to sessionize-transform.js (unit-tested);
Excel import gains Language / Sprache / "Sprache / Language" headers.
- attendee app: third agenda filter dropdown ("All languages", only
rendered when values exist) + language pill in SessionDetail.
- admin app: Sessions search + subtitle include language.
- seed: English for all talks, German for the two German-titled sessions.
- tests: session_language_tests.sql (8 assertions, all pass),
sessionize-transform.test.js (7), transform-excel Language case; 43/43
sidecar tests, date-guard/gridsmart/session-persistence suites green.
- docs: schema.md sessions columns + next-steps.md completion entry.
Organizer precondition (Sabrina): define the "Language" category AND
enable session custom fields on the event's API/Embed page, otherwise
live syncs keep language null (Excel import is the fallback).
Co-authored-by: Stephan Charles <[email protected]>
Co-authored-by: Amelia Hernandez <[email protected]>
Co-authored-by: Markus Franz <[email protected]>
Co-authored-by: Sabrina Hota <[email protected]>
Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
07ee05e1cd
commit
ec23da9bb9
16 files changed
+922
-60
No files matched your search
@@ -163,6 +163,9 @@ Unpaid sponsors are hidden from non-admins (RLS).
|
||||
| `description` | `text` | nullable |
|
||||
| `room` | `text` | "Main Stage" / "Room A" / "Room B" |
|
||||
| `capacity` | `integer` | nullable (not enforced) |
|
||||
| `level` | `text` | nullable — free-text level (100/200/300 or Beginner/…), imported |
|
||||
| `area` | `text` | nullable — free-text topic/area, imported |
|
||||
| `language` | `text` | nullable — delivery language, imported from the Sessionize "Language" session category (custom fields must be enabled on the endpoint) or the Excel `Language` column; see `20261021090000_session_language.sql` |
|
||||
| `average_feedback` | `numeric` | maintained by `submit_feedback` |
|
||||
| `ai_generated_feedback` | `text` | AI-feedback state (stub) |
|
||||
| `material_path` | `text` | nullable — storage object path for session material |
|
||||
|
||||
@@ -555,6 +555,45 @@ printing was evaluated and skipped by decision** — no printing feature was bui
|
||||
- **Activity → Session feedback** gains a compact **per-session aggregate
|
||||
header** (average + count per session).
|
||||
|
||||
## Session language tag (Sabrina's backlog) — ✅ complete (2026-10-21)
|
||||
|
||||
Migration `20261021090000_session_language.sql` + sidecar + both apps. Sessions
|
||||
now carry a **`language`** tag shown everywhere level/area are.
|
||||
|
||||
**Where the data comes from.** Sessionize has **no first-class language field**
|
||||
(verified against the live GPB endpoint + their docs). Organizers model it as a
|
||||
session **category titled "Language"** — Sessionize's own demo endpoint does
|
||||
exactly this. Two consequences:
|
||||
|
||||
- The sidecar (`sessionize-transform.js`) resolves each session's
|
||||
`categoryItems` against the top-level `categories` array (title match on
|
||||
"Language", case-insensitive; bare item ids on `/view/All`, full objects on
|
||||
other views) and sends a plain `language` string. A native `session.language`
|
||||
wins if Sessionize ever adds one.
|
||||
- **Organizer precondition:** categories only appear on the API endpoint when
|
||||
session custom fields are ticked on the event's API/Embed page. Until Sabrina
|
||||
has the GPB organizer (a) create a "Language" category with items and tag the
|
||||
sessions, and (b) enable custom fields on the endpoint, live syncs keep
|
||||
`language` null and the UI filter stays hidden (same render-when-present
|
||||
pattern as level/area). The Excel import (`Language` / `Sprache / Language`
|
||||
column) is the fallback that works without touching the endpoint.
|
||||
|
||||
**Plumbing.** `sync_sessionize_event`/`sync_sessionize_excel` upsert language
|
||||
with the same `coalesce(excluded, existing)` rule as level/area — sources that
|
||||
don't publish it never erase it. `get_agenda()` returns it (drop + recreate —
|
||||
OUT shape changed — plus re-grants). Seed sets English for all talks + German
|
||||
for the two German-titled sessions so the feature is demoable locally.
|
||||
|
||||
**UI.** Agenda gains a third filter dropdown ("All languages") and a 🌐 pill in
|
||||
SessionDetail; APPE Admin's Sessions search + cell subtitle include language.
|
||||
Free-text values are kept verbatim ("German" ≠ "DE" ≠ "Deutsch" are distinct
|
||||
filter entries) — normalization to ISO codes is a possible follow-up.
|
||||
|
||||
**Tests.** `supabase/tests/session_language_tests.sql` (8 assertions),
|
||||
`apps/sidecar/tests/sessionize-transform.test.js` (7) + a Language-column case
|
||||
in `transform-excel.test.js`; verified against the real Sessionize demo payload
|
||||
(10/11 sessions get a language, service sessions stay null).
|
||||
|
||||
## Known work (open as of 2026-10-19)
|
||||
|
||||
- **E2E seed drift — 42 specs currently red.** The pretix reseed removed the
|
||||
|
||||
Reference in new issue
Block a user