feat(printer): badge print queue, Pi worker, captive-portal setup, admin printing view
- 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 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
0f3720d48a
commit
00c89c1b48
55 files changed
+7406
-29
No files matched your search
@@ -1,3 +1,39 @@
|
||||
# Badge Print Queue Regression
|
||||
|
||||
After applying `20261018170000_badge_print_queue`, run the SQL suite **combined
|
||||
with the migration** in one transaction (the migration is idempotent, so the
|
||||
same stream also re-verifies an already-applied database):
|
||||
|
||||
```sh
|
||||
(echo 'begin;'; \
|
||||
cat supabase/migrations/20261018170000_badge_print_queue.sql; \
|
||||
sed '/^begin;$/d' supabase/tests/badge_print_tests.sql) \
|
||||
| docker exec -i supabase_db_Convivo psql -X -U postgres -d postgres -v ON_ERROR_STOP=1
|
||||
CONVIVO_ADMIN_URL=http://127.0.0.1:3001 npm test --prefix e2e -- printing.spec.ts --project=chromium
|
||||
pytest apps/printer/tests # worker unit tests (no hardware, no browser)
|
||||
```
|
||||
|
||||
The SQL fixture is rollback-only: **101 assertions** cover queue creation and
|
||||
migration idempotency, pgmq/API isolation, the self-contained payload shape and
|
||||
layout resolution (default-with-elements, fallback, none → no job), first-scan
|
||||
enqueue inside `welcome_checkin` (re-scan enqueues nothing), station token
|
||||
lifecycle (create shows the token once, only the SHA-256 digest is stored,
|
||||
rename, revoke → `28000`), claim/complete/fail semantics (visibility timeout,
|
||||
retry backoff, dead-letter after 3 reads, requeue/discard), the heartbeat
|
||||
(status cap, name echo) and admin/non-admin/anon authorization.
|
||||
The browser suite is API-mocked and covers the always-visible printer pill
|
||||
(ready / error / offline / mobile, click navigates), the offline Wi-Fi setup
|
||||
hint, add-station token-shown-once, inline rename, dead-letter Requeue/Discard,
|
||||
completed-job Reprint, the Registrations **Print** button (queue + toast,
|
||||
offline still queues, no-layout disabled state) and the 5 s overview polling.
|
||||
The pytest suite covers label composition (die-cut, endless, auto-rotate,
|
||||
`LayoutTooLarge`), the worker loop (job outcomes, sticky complete, paused
|
||||
printer), the RPC client error mapping, status mapping and the network-state
|
||||
reader. No real printer, Pi or attendee data is involved.
|
||||
|
||||
See [printing.md](./printing.md) for the feature reference and the
|
||||
[release record](../releases/2026-10-18.md) for results.
|
||||
|
||||
# Badge Editor Regression
|
||||
|
||||
After applying `20261015194531_badge_editor`, run:
|
||||
|
||||
Reference in new issue
Block a user