- migration 20261018170000: pgmq badge_print/badge_print_dlq, print_stations, token-gated printer RPCs (claim/complete/fail/heartbeat), admin RPCs, welcome_checkin enqueue; badge_print_tests.sql (101 assertions) - apps/printer: Python worker (Playwright render -> brother_ql via pyusb), comitup captive-portal (Wi-Fi + HTTPS endpoint + anon key + token), arm64 image build + idempotent Pi setup/install scripts, 77 pytest - apps/admin: Printing view, station management/DLQ, global printer status pill, Print button on Registrations, standalone print renderer entry (print.html -> dist-print) with bundled fonts - docs: printing.md + architecture/schema/rpcs/tests/admin-app updates, apps/printer/AGENT.md operating manual - e2e: printing.spec.ts
11 KiB
Attendee Feedback Polish (2026-10-18)
Three fixes requested by Sabrina after hands-on testing of convivo.appe.at.
All presentation-layer (attendee app only) — no migration, no RPC, no admin or
sidecar change.
1. Session description collapsed into one block
Symptom. The session detail sheet rendered multi-paragraph descriptions as a single unreadable wall of text.
Root cause. The feed carries real line breaks: the sidecar passes Sessionize
s.description through untouched (apps/sidecar/src/server.js), so the DB
holds \n / \n\n (19 of the 33 seeded local sessions are multi-line). The
sheet's description <div> used a plain inline style, and default CSS collapses
newlines into spaces.
Fix. New .sd-desc class (apps/convivo/src/styles.css):
white-space: pre-line; line-height: 1.55; overflow-wrap: anywhere, applied to
the #sd-desc block in apps/convivo/src/components/SessionDetail.tsx. The
AI feedback summary got the same treatment via
.feedback-review .fr-text. No markdown parser added — the feed is plain text.
2. "Your session feedback" shown on service sessions
Symptom. Staff opened a Break/Lunch card and saw the speaker feedback review ("⭐ Your session feedback", stars, AI summary) — nonsense on a break.
Root cause. _assign_service_session_speakers links every staff
registration as a speaker of every service slot (by design, so service
sessions have a speaker set). SessionDetail showed the review whenever
isSpeaker && status === 'done', so any staff member hit it on every finished
service card. Attendees can't check in to service sessions, so the
"You weren't checked in" note was equally noise there.
Fix. const showFeedback = !isService; in SessionDetail.tsx; all three
feedback surfaces (review block, Give feedback ⭐ button, "not checked in"
note) are gated on it. The sheet itself stays — service cards remain openable
(title, time, room, "No pick needed for this slot.").
3. "🎬 Demo clock" badge removed from Home
The simulated clock (use_realtime_clock = false, the default) is an internal
demo aid; attendees were never meant to see it. The badge is gone from the Home
header (apps/convivo/src/screens/Home.tsx, clockMode dropped from the
useEvent() destructure — noUnusedLocals requires it). useEvent() still
exposes clockMode; the admin Events toggle is unchanged.
Already fixed before this round (no code change)
- Pick → detail instead of routing to Agenda and duplicated "Slot" time —
shipped in
ef0446d, live since the 2026-10-16 deploy. - Filters keep service sessions — on purpose (confirmed with the user): Level/Area filters apply to talks; service slots always show. Documented in screens.md.
- "No picks" text next to existing picks — shipped in
999527b, live since 2026-10-17 (verified present in the served bundleindex-CRttiV1E.js). The screenshot predates that deploy;index.htmlis servedno-cacheand there is no service worker, so a reload picks it up.
Verification
convivo-admin-entry.spec.ts: three new API-mocked cases — service session detail shows no feedback UI for a staff speaker, keeps the paragraph breaks of a multi-line description (assertswhite-space: pre-line, exacttextContentnewlines preserved, and that the block renders taller than the same text with collapsed whitespace —toHaveTextnormalises whitespace and would pass trivially), and a no-"Demo clock"-badge assertion appended to each existing demo-clock scenario. 45/45 against the local dev server (:3000).npm run build --prefix apps/convivoclean; bundle grep confirmsDemo clockabsent and.sd-desc/.fr-textin the CSS.- Docs synced in the same commit: screens.md, app-structure.md, tests.md, next-steps.md.
Deployment (2026-10-18)
Attendee-only deploy of commit 6bde90a — three files (SessionDetail.tsx,
Home.tsx, styles.css). No migration, no admin/sidecar/DB change, no data
touched.
- Drift guard: all three prod files matched the
1e3c969baseline exactly (caecaf06…,15f5059f…,5b2f531a…) → whole-file copy from HEAD was safe; applied files matched6bde90a(1e03aa2e…,a46cb004…,88ff0b55…). - Backup
/home/APPE/convivo-backups/fbpolish-6bde90a-20261018T162520Z(baseline source, payload, before/after sha, container inventory, build log) + rollback tagconvivo-app:rollback-fbpolish-6bde90a-20261018T162520Z. - Build-before-
up; onlyconvivo-apprecreated (new container48d7c1c024b5).UNRELATED_CONTAINERS_UNCHANGED— admin, sidecar and everysupabase_*container kept their IDs.nginx -tok; both apps HTTPS 200. - Live bundle
index-DRSsD1hj.js/index-4X1LaDjo.css— byte-identical to a clean local build of6bde90a(sha25607723429…/82324185…), proving a faithful production build. The previous bundleindex-CRttiV1E.jsnow 404s. Note: assets are served gzip'd by nginx, so compare withcurl --compressed. - Markers:
.sd-descand.fr-textpresent in the served CSS,Demo clockabsent from the served JS,give-feedbackstill present (non-service path). - 45/45 mocked Playwright checks against
https://convivo.appe.at.
Badge Printing End-to-End (2026-10-18)
Welcome-desk badge printing on a Raspberry Pi: scan a lanyard QR, the badge prints seconds later. Full reference: backend/printing.md. Status: local only — production deployment pending at the time of writing.
What shipped
- Database — migration
20261018170000_badge_print_queue.sql:pgmqqueuesbadge_print/badge_print_dlq, theprint_stationstable (SHA-256 token digests, RLS with no policies), the self-containedconvivo.badge-print/v1payload,welcome_checkinre-created to enqueue the badge on a first check-in in the same transaction, seven admin RPCs (reprint, station create/rename/revoke, overview, DLQ requeue/discard) and four token-gated printer RPCs (claim / complete / fail / heartbeat). - Admin — the Printing view (stations, queue counters, recent jobs with
Reprint, dead letters with Requeue/Discard), the always-visible sidebar
printer status pill with staff-facing hints, the Print button on
Registrations rows, and the standalone print renderer entry (
print.html→window.renderBadge, built bynpm run build:print) sharing the editor'sBadgeRendercode and bundled @fontsource fonts, so preview = print on any machine. - Worker —
apps/printer/: Python in Docker (repo-root build; a Node stage builds the renderer into the Playwright Chromium runtime image). Long-polls the queue with the station token, screenshots the badge at 300 dpi, composes it onto the detected roll (die-cut exact canvas / endless cut-to-length / auto-rotate /LayoutTooLarge→ DLQ), prints on a Brother QL-1110NWB over USB with status read-back, and heartbeats every 10 s (the station name comes from the heartbeat response, so renames apply without re-provisioning). - Station rename —
rename_print_stationRPC + inline rename in the Printing view. - Pi provisioning + Wi-Fi portal —
apps/printer/pi/setup.sh+install.sh(idempotent, staged): Docker, watchdog,usblp/ipp-usbhandling, the worker container, and comitup providing the open APConvivo-Printer-<nnnn>with a captive portal at http://10.41.0.1: pick any Wi-Fi + optional Convivo settings (URL / anon key / station token) from a phone. A comitup callback writes/run/convivo/network.jsonfor the worker. Operational detail:apps/printer/AGENT.md. - Status labels (opt-in) —
STATUS_LABELS=1(default off) prints locally-drawn "ready" / "needs Wi-Fi" labels on the printer itself, since the Pi has no screen. - Fixes found on real hardware — claim long-poll clamped to 2 s
(Supabase
anonhas a 3 sstatement_timeout; 10 s caused HTTP 50057014); setup re-execs systemd only on config change and restarts comitup after (a baredaemon-reexecbroke the hotspot's DHCP); Docker restarted only ondaemon.jsonchange (a bounce re-ran the worker on the old image); install uploads to/var/tmp(the Pi's/tmpis a ~1 GB tmpfs);ipp-usbmasked (it grabbed the printer's USB interfaces — "Resource busy").
Validation
- SQL:
supabase/tests/badge_print_tests.sql— rollback-only, run combined with the migration: 101/101 assertions (payload shape, layout resolution, first-scan enqueue, token lifecycle, retry/backoff/DLQ, heartbeat, role guards, idempotent re-apply). - Worker: pytest
apps/printer/tests— 77 passing (56 test functions, 77 with parametrized label cases; no hardware or browser required). - Browser:
e2e/tests/printing.spec.ts— 15/15 API-mocked Playwright tests (pill states + mobile, token-shown-once, rename, requeue/discard, reprint, Print button, 5 s polling). - Real Pi end-to-end: a provisioned Pi 4 with a QL-1110NWB printed live badges against the local Supabase stack — welcome check-in → queue → print → archive, plus reprint, revoke (token rejected immediately), rename visible on the next heartbeat, and the DLQ path.
- Portal: joined the open
Convivo-Printer-<nnnn>AP from a phone, picked a Wi-Fi network at http://10.41.0.1, and the worker reconnected and resumed claiming on the new network. - Neighbour regression green:
badge_layout_tests.sql(15 assertions — the print payload reuses badge layouts).
Deployment
Deployed to production 2026-10-18 (commit a2fe724, admin-only + DB migration).
- Migration
20261018170000_badge_print_queue.sqlapplied to prod in a single transaction withON_ERROR_STOP=1and recorded in the ledger (ledger 38 → 39).pgmq 1.5.1was already available on the prod image (noshared_preload_librarieschange needed); the queuesbadge_print/badge_print_dlq,print_stations, and all admin/printer RPCs are present. Backup/home/APPE/convivo-backups/printqueue-20261018T201701Z(pg_dump, counts, runtime admin source, rollback tagconvivo-admin:rollback-printqueue-…). - SQL regression
badge_print_tests.sqlrun rollback-only against prod in the same transaction as the migration: 101/101 assertions, then rolled back —print_stations/queues/events/counts unchanged afterwards. - Admin rebuilt from HEAD with a baseline drift guard (all 9 changed prod
files byte-identical to
HEAD~1→ whole-file copy safe). Onlyconvivo-adminrecreated; every unrelated container ID preserved. Live bundleindex-pPo7RVlo.jsis byte-identical to the local HEAD build. - Station
Welcome deskprovisioned in prod (token shown once, only its SHA-256 stored).printer_heartbeatreturns 200 over PostgREST with the anon key + bearer token. - Pi reconfigured from the local dev stack to
https://convivo.appe.at(BADGE_CHECKIN_ORIGIN=https://admin.appe.at); the running worker image already matched HEAD, so no rebuild was needed — only.envswap +docker compose up -d --force-recreate. The station now heartbeats to prod (last_seen_atfresh,last_statusreporting printer ready).
Troubleshooting lessons are collected in printing.md §11.