Summarise this report on every report (2.0.1)

The eight reports that list people get the AI summary too, sent as
anonymised totals built on the screen (aiReportData.ts): no names,
contact details, notes or comments; consent and medical only as counts.
The server refuses personal columns on those reports and logs each
summary in the access log (ai_report; sensitive for consent and medical).

Roadmap §18: 2.0.1, then crosscode.co.za, then 2.1.0 (AI helpers on the
Consent log and Access log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 18:42:27 +02:00
co-authored by Claude Opus 5.5
parent 75d10f6078
commit 89eab66145
20 changed files with 359 additions and 48 deletions
+57 -4
View File
@@ -22,7 +22,9 @@ providers), maintainable (tests, CI, typed backend, versioned API), and with
| 3 | The five helpers (§15) with their buttons, an eval set, privacy notice text | 2.0.0 | ✅ eval 19/19 through a local Hub (2026-10-30) |
| 4 | v1 removed (webhook paths and old message links keep working); clean-ups: Argon2id passwords with rehash-on-login, `node-fetch` gone, React Compiler lint rules back to errors | 2.0.0 | ✅ |
| 5 | Migration guide (`MIGRATING-TO-2.md`), docs | 2.0.0 | ✅ |
| 6 | Marketing site: Cross Code with a Cross Events page (§17) | `joshua/crosscode-site` | to do — decided 2026-11-02 (§17); content and logo from Joshua |
| 6 | Marketing site: Cross Code with a Cross Events page (§17) | `joshua/crosscode-site` | to do — decided 2026-11-02 (§17); content and logo from Joshua. **Done before 2.1.0** (§18) |
| 7 | 2.0.1: Summarise this report on every report (people reports as anonymised totals) | 2.0.1 | ✅ (§18) |
| 8 | 2.1.0: AI helpers on the privacy pages (Consent log, Access log) | 2.1.0 | planned (§18), after the marketing site |
The full version list is in [HANDOVER.md](./HANDOVER.md) and the [build order](#suggested-build-order) below.
@@ -80,8 +82,9 @@ Removed from scope (2026-10-28): Wallet passes (§7) and languages (§10).
15. [AI helpers (2.0 headline)](#15-ai-helpers-20-headline)
16. [AI: later stages](#16-ai-later-stages)
17. [Marketing site (Cross Code)](#17-marketing-site-cross-code)
18. [Suggested build order](#suggested-build-order)
19. [Decisions](#decisions-2026-10-22)
18. [After 2.0: 2.0.x, the site, then 2.1.0](#18-after-20-20x-the-site-then-210)
19. [Suggested build order](#suggested-build-order)
20. [Decisions](#decisions-2026-10-22)
---
@@ -1070,6 +1073,53 @@ Part of 2.0 (decided 2026-10-30): a **simple static HTML site** for selling, not
---
## 18. After 2.0: 2.0.x, the site, then 2.1.0
Decided 2026-11-02. Order: **2.0.1** → **the marketing site (crosscode.co.za, §17)** → **2.1.0**.
The site comes first: 2.1.0 isn't started until crosscode.co.za is live.
### 2.0.1: Summarise this report on every report ✅
2.0.0 had the button only on the 11 reports without people in them, so churches couldn't
summarise payments, attendees, master orders and the rest. 2.0.1 puts it on **all** reports. The
eight that list people (payments, attendees, revenue detailed, master orders, cashup audit trail,
parental consent, feedback summary, medical list) are sent as **anonymised totals** built on the
screen — per event and method, status or option; no names, contact details, notes or comments;
consent and medical only as counts. The server refuses any personal column on those reports, and
each such summary goes in the access log (sensitive for consent and medical). The POPIA promise in
§15 is unchanged: no names, contact details, medical or children's information is sent.
### Marketing site (before 2.1.0)
crosscode.co.za as decided in §17 (repo `joshua/crosscode-site`, Joshua's own server, contact
form to info@crosscode.co.za, privacy notice and terms, no cookies). Placeholders until Joshua
sends the logo, colours, wording and screenshots.
### 2.1.0: AI helpers on the privacy pages
AI buttons on **Privacy → Consent log** and **Privacy → Access log** (admins and the information
officer), reusing the Hub proxy, caps, `<AiButton>` and the `summarise_report` pattern from §15 —
probably as new helpers so they can be switched on and off on their own in Site settings → AI.
- **Consent log — "Summarise consent":** how consent has moved over a period, per purpose and
channel (opt-ins against opt-outs, WhatsApp STOPs, unsubscribes after a broadcast, spikes), and
anything to act on (a purpose many people are leaving, consent given on an older notice text).
Sent as counts per purpose, channel, action and day — never who.
- **Access log — "Review access":** a plain-language review for the information officer: what was
looked at or exported, how much, by which role, and **what looks unusual** (a bulk export at
night, many medical-list views by one person, someone exporting much more than usual, sensitive
entries). Spotting one person's unusual access needs entries grouped per staff member, so staff
are sent as **pseudonyms** ("Staff 1", "Staff 2") that the screen turns back into names — the same
idea as the `[[CONTACT1]]` placeholders — with only their role sent.
- **To decide when it's picked up:** separate helpers or one "summarise a log" helper; how far
back each looks (default 30 days?); whether the access-log review could also run on a schedule
and email the information officer (an automatic monthly check); whether summarising the access
log itself goes in the access log (probably yes, as `ai_access_review`).
- Same as every helper: eval cases, help content, CHANGELOG / WHATS-NEW, the privacy notice only
if what is sent changes.
---
## Suggested build order
| Phase | Version | Features | Why |
@@ -1088,6 +1138,7 @@ Part of 2.0 (decided 2026-10-30): a **simple static HTML site** for selling, not
| 11 | 1.51.0 ✅, 1.51.1 ✅, 1.51.2 ✅, 1.51.3 ✅ | TypeScript backend + OpenAPI + `/api/v2` alongside v1: 1.51.0 foundations (build, launcher, route declarations, errors, paging, OpenAPI at `/docs/v2`, first read endpoints); 1.51.1 registrations and payments as TS services, typed frontend calls; 1.51.2 check-in and accounts; 1.51.3 Express 5, the scanner on v2, v1 deprecation headers, v2-shaped shared middleware | The breaking-change groundwork |
| 11b | 1.51.4 ✅ – 1.51.16 ✅ | **Every endpoint on v2 before 2.0** (decided 2026-10-29): 1.51.4 dependency audit and Node 24 LTS; 1.51.5 Next.js 16 and ESLint 10 (ESLint 9 is out of support); 1.51.6 the complete command palette and ExcelTS instead of exceljs; 1.51.7 setting events up (the staff list, create, change, deactivate, copy-from, notification recipients) and pg-boss 11; 1.51.8 the rest of event set-up (the event in full, ticket options and variants, attachments, sections, costs, uploads, calendar file, alias); 1.51.9 series, season passes, bundles, coupons and campuses; 1.51.10 managing registrations (the staff lists, status, at the door, bulk actions, items, coupons, attendees, attendee forms); 1.51.11 money, staff side (payments, cashup, provider transactions, waitlist, sponsorship, consent, form builder, feedback); 1.51.12 tickets and attendance, staff side (tickets, scan locks, attendance, allocations); 1.51.13 kids check-in and volunteer rosters; 1.51.14 people and messaging (users, WhatsApp, broadcasts, scheduled emails, automations, banner, saved filters, dashboard, stats, analytics, reports); 1.51.15 privacy and admin (privacy, admin, settings, setup, Hub, outbound webhooks, backups); 1.51.16 **incoming webhooks and links in sent messages**: Yoco, PayFast and WAWP webhooks and the links in emails and WhatsApp (unsubscribe, consent, ticket transfer, calendar feeds, waitlist offers) get v2 URLs — new messages and provider registrations use them, and the v1 paths keep answering (links by a 308 redirect to v2, provider webhooks handled by the same code, since providers may not follow a redirect on a POST). Each puts its area's endpoints on v2 (1.51.1 – 1.51.10 by moving the logic into TS services; from 1.51.11 by `v1Route`, which runs the v1 handler behind a v2 route — moving those handlers into TS services is a 2.x clean-up that doesn't change the API), its screens onto `apiV2`, and its v1 routes into `SUCCESSORS`. Then 1.51.17, a security fix (forgot password and sign-in don't reveal accounts) | 2.0 can then remove v1 |
| 12 | **2.0.0** ✅ | **AI helpers** (§15 — headline feature: draft an event, summarise reports and feedback, draft messages, improve text; through the Hub with a rand cap per licence), v1 removed (all of it is on v2 by then; the old webhook URLs and links already sent in messages keep forwarding to v2), migration guide, docs, and the marketing site (§17: a static Cross Code site with a Cross Events page). Released 2026-11-02 (built on `release/2.0` in parts); the marketing site follows in its own repo | The release. AI needs the Hub (phase 6) for the key, metering and caps |
| 13 | 2.0.1 ✅ → marketing site → **2.1.0** | Summarise every report (2.0.1); crosscode.co.za (§17); AI on the Consent log and Access log (2.1.0, §18) | Decided 2026-11-02: the site before 2.1.0 |
Each phase should add matching help content (`frontend/src/content/help/`),
audit log entries, Jest tests, a CHANGELOG entry, and updates to FEATURES.md
@@ -1151,4 +1202,6 @@ feature.
## Still open
- **Marketing site (§17):** everything is decided; waiting on Joshua for the logo, colours, text
about Cross Code, photos and screenshots (built with placeholders meanwhile).
about Cross Code, photos and screenshots (built with placeholders meanwhile). Must be done
before 2.1.0 (§18).
- **2.1.0 (§18):** the open questions on the Consent log and Access log helpers.